<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aniket Agrawal on Medium]]></title>
        <description><![CDATA[Stories by Aniket Agrawal on Medium]]></description>
        <link>https://medium.com/@anikets43?source=rss-d2dc2b72f54c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DVCoVSHe3kCDyPrX.</url>
            <title>Stories by Aniket Agrawal on Medium</title>
            <link>https://medium.com/@anikets43?source=rss-d2dc2b72f54c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:55:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anikets43/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Agent Observability in GenGuardX: See What Your AI Agents Did in Production]]></title>
            <link>https://medium.com/@anikets43/agent-observability-in-genguardx-see-what-your-ai-agents-did-in-production-5daa5443802c?source=rss-d2dc2b72f54c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5daa5443802c</guid>
            <category><![CDATA[ai-governance]]></category>
            <category><![CDATA[ai-testing]]></category>
            <category><![CDATA[ai-observability]]></category>
            <category><![CDATA[llm-observability]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Aniket Agrawal]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 17:55:12 GMT</pubDate>
            <atom:updated>2026-11-09T17:55:12.450Z</atom:updated>
            <content:encoded><![CDATA[<p>Your agent gave a wrong answer in production. Which step went wrong?</p><p>Without a record of what the agent did, you are left guessing. Agent observability in GenGuardX is built to answer that. It shows what your agents did in production, and it lives under Monitor &amp; Track, in Tracing.</p><p><a href="https://genguardx.ai/">GGX</a> records each request as a trace. A trace covers every LLM call, tool call, retrieval and autonomous agent decision. Traces nest in three levels: a session is one conversation, a trace is one request, and a span is one step, such as a model call, a retrieval or a tool call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LF1czG9EZkMWAR8PijTuQA.jpeg" /><figcaption>One conversation, three levels: session, trace and span. Source: docs.genguardx.ai</figcaption></figure><p>Each span records timing, status, inputs and outputs, token counts, errors and cost. Inputs and outputs are masked under your project’s data masking policy. Each trace also links back to the project, deployment and agent version that produced it. You can send traces through the Python SDK, your own tools, agent frameworks, or any OpenTelemetry exporter.</p><p>On top of traces, GGX adds a few layers. Evaluators are judges that record a verdict on live traffic. Monitors let you set thresholds on traffic, latency, cost and quality, and send alerts when they are crossed. Reviewers can score traces, and your application can send end-user feedback. GGX also files findings when it detects a risk in your traces.</p><p>To dig in, the Search, Analytics and Export area has a query language, a Spans tab, charts, saved views and export.</p><p>For an agent that makes a tool call and a retrieval before it answers, one trace shows each step with its own timing, cost and result. That is the difference between knowing the answer was wrong and knowing where it went wrong.</p><p>How do you debug your agents in production today?</p><p>Docs: <a href="https://docs.genguardx.ai/agent-observability/">https://docs.genguardx.ai/agent-observability/</a></p><p>Learn more about GenGuardX: <a href="https://genguardx.ai/">https://genguardx.ai</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5daa5443802c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Evaluation and LLM as Judge in GenGuardX]]></title>
            <link>https://medium.com/@anikets43/ai-evaluation-and-llm-as-judge-in-genguardx-bed4dc6b58ff?source=rss-d2dc2b72f54c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bed4dc6b58ff</guid>
            <category><![CDATA[responsible-ai]]></category>
            <category><![CDATA[ai-governance]]></category>
            <category><![CDATA[ai-evals]]></category>
            <category><![CDATA[ai-evaluation]]></category>
            <category><![CDATA[llm-as-a-judge]]></category>
            <dc:creator><![CDATA[Aniket Agrawal]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 17:50:14 GMT</pubDate>
            <atom:updated>2026-11-09T17:50:14.447Z</atom:updated>
            <content:encoded><![CDATA[<p>How do you grade an AI answer when there is no exact right answer?</p><p>Rules and exact-match metrics work for some checks. But “is this answer relevant?” or “is this grounded in the source?” are harder. That is where an LLM judge helps. It is a language model that grades another AI system’s output and returns a structured verdict.</p><p>In GenGuardX, each judge is a Python file that declares its prompt and model. The prompt is the rubric: the criteria, the scoring anchors, and the required output format. The model can be OpenAI, Gemini, Anthropic or Bedrock. Outputs are validated against a pydantic model, so results can be aggregated and monitored at scale.</p><p>The catalog has 11 judges in five groups. Agent: Tool Call Accuracy. Faithfulness: Factual Accuracy. Query Quality: Query Clarity. Response Quality: Answer Relevancy, Response Coherence and Summary Quality. Safety: Bias, Jailbreak, PII, Prompt Injection and Toxicity detection.</p><p>The docs are clear that these are starting points, not ground truth. A judge can be sensitive to your domain, data and scoring conventions. So validate it on your own task, ideally against human-labeled examples, and adapt the prompt, scale or model if needed.</p><p>That is why GenGuardX pairs automated evaluation with human review. Annotation queues let experts label live outputs. Recurring failure patterns found there can become new judges, and the same labels serve as ground truth to validate them.</p><p>Evaluation then feeds the approval workflow. Results go to defined reviewers for sign-off, and an approved object is locked before it goes to production.</p><p>Are you using LLM judges today? What do you check them against?</p><p>Docs: https://docs.genguardx.ai/llm-judges/ow do you grade an AI answer when there is no exact right answer?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bed4dc6b58ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing One-to-Many Relationships in Flask with SQLAlchemy and Marshmallow]]></title>
            <link>https://medium.com/@anikets43/managing-one-to-many-relationships-in-flask-with-sqlalchemy-and-marshmallow-5725aa269355?source=rss-d2dc2b72f54c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5725aa269355</guid>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[flask-sqlalchemy]]></category>
            <category><![CDATA[marshmallow]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Aniket Agrawal]]></dc:creator>
            <pubDate>Sat, 03 May 2025 08:36:24 GMT</pubDate>
            <atom:updated>2025-05-03T08:47:04.794Z</atom:updated>
            <content:encoded><![CDATA[<p>Building APIs often requires modeling real-world one-to-many relationships - such as a department with multiple employees, a blog post with multiple comments or a project with multiple tasks. This guide demonstrates how to set up, <strong>serialize</strong>, and <strong>deserialize </strong>such relationships using <strong>Flask</strong>, <strong>SQLAlchemy</strong>, and <strong>Marshmallow</strong>, with a complete working example.</p><h3>✅ Quick Summary — What Marshmallow Can Do</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e82282e52b105577feeefd0f8f56e01e/href">https://medium.com/media/e82282e52b105577feeefd0f8f56e01e/href</a></iframe><h3>🧱 Models: SQLAlchemy Setup</h3><p>We’ll model two entities: Department and Employee. Each department can have many employees.</p><pre>class DepartmentModel(db.Model):<br>    __tablename__ = &quot;departments&quot;<br><br>    id = db.Column(db.Integer, primary_key=True)<br>    name = db.Column(db.String(100), nullable=False)<br><br>    employees = db.relationship(<br>        &quot;EmployeeModel&quot;, cascade=&quot;all, delete-orphan&quot;, backref=&quot;department&quot;<br>    )<br><br>    @classmethod<br>    def find_by_id(cls, _id: int):<br>        return cls.query.get(_id)<br><br>    @classmethod<br>    def find_all(cls):<br>        return cls.query.all()<br><br>    def save_to_db(self):<br>        db.session.add(self)<br>        db.session.commit()<br><br>    def delete_from_db(self):<br>        db.session.delete(self)<br>        db.session.commit()</pre><p>Employee Model</p><pre>class EmployeeModel(db.Model):<br>    __tablename__ = &quot;employees&quot;<br><br>    id = db.Column(db.Integer, primary_key=True)<br>    name = db.Column(db.String(100), nullable=False)<br>    department_id = db.Column(<br>        db.Integer, db.ForeignKey(&quot;departments.id&quot;), nullable=False<br>    )<br><br>    @classmethod<br>    def find_by_id(cls, _id: int):<br>        return cls.query.get(_id)<br><br>    def save_to_db(self):<br>        db.session.add(self)<br>        db.session.commit()</pre><h3>🧪 Serialization: Marshmallow Schemas</h3><p>Employee Schama</p><pre>from flask_marshmallow import Marshmallow<br>from marshmallow_sqlalchemy import SQLAlchemyAutoSchema, auto_field<br>from marshmallow_sqlalchemy.fields import Nested<br><br>ma = Marshmallow()<br><br>class EmployeeSchema(ma.SQLAlchemyAutoSchema):<br>    class Meta:<br>        model = EmployeeModel<br>        include_fk = True<br>        load_instance = True<br><br>    id = auto_field()<br>    name = auto_field()<br>    department_id = auto_field()</pre><p>🔸 Department Schema with Nested Employees</p><pre>class DepartmentSchema(ma.SQLAlchemyAutoSchema):<br>    class Meta:<br>        model = DepartmentModel<br>        load_instance = True<br><br>    id = auto_field()<br>    name = auto_field()<br>    <br>    # Nested list of employees (read-only by default)<br>    employees = Nested(EmployeeSchema, many=True, exclude=(&quot;department_id&quot;,))</pre><h3>🔄 Sample Use in Flask Routes</h3><h3>🔹 Create Department with Employees (POST)</h3><pre>@app.route(&quot;/departments&quot;, methods=[&quot;POST&quot;])<br>def create_department():<br>    data = request.get_json()<br>    schema = DepartmentSchema()<br><br>    try:<br>        department = schema.load(data)<br>        db.session.add(department)<br>        db.session.commit()<br>        return schema.dump(department), 201<br>    except ValidationError as err:<br>        return {&quot;errors&quot;: err.messages}, 400</pre><p>Sample Payload</p><pre>{<br>  &quot;name&quot;: &quot;Engineering&quot;,<br>  &quot;employees&quot;: [<br>    {&quot;name&quot;: &quot;Alice&quot;},<br>    {&quot;name&quot;: &quot;Bob&quot;}<br>  ]<br>}</pre><p>🔹 Get Department with Nested Employees (GET)</p><pre>@app.route(&quot;/departments/&lt;int:id&gt;&quot;, methods=[&quot;GET&quot;])<br>def get_department(id):<br>    department = DepartmentModel.find_by_id(id)<br>    if not department:<br>        return {&quot;message&quot;: &quot;Not found&quot;}, 404<br>    schema = DepartmentSchema()<br>    return schema.dump(department)</pre><p>Sample Response</p><pre>{<br>  &quot;id&quot;: 1,<br>  &quot;name&quot;: &quot;Engineering&quot;,<br>  &quot;employees&quot;: [<br>    {&quot;id&quot;: 1, &quot;name&quot;: &quot;Alice&quot;},<br>    {&quot;id&quot;: 2, &quot;name&quot;: &quot;Bob&quot;}<br>  ]<br>}</pre><p>🧠 Summary</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/826e4d2e2d3c85f287ad92e356852060/href">https://medium.com/media/826e4d2e2d3c85f287ad92e356852060/href</a></iframe><h3>🚀 What’s Next?</h3><ul><li>Add pagination to large relationships.</li><li>Use different schemas for input and output for more control.</li><li>Add validation with marshmallow.validate.</li><li>Integrate with Flask-RESTful or Flask-Restx for clean API routing.</li></ul><p><strong>Ref Links:</strong></p><p>Marshmallow: <a href="https://marshmallow.readthedocs.io/en/latest/">https://marshmallow.readthedocs.io/en/latest/</a></p><p>Flask-Marshmallow: <a href="https://flask-marshmallow.readthedocs.io/en/latest/">https://flask-marshmallow.readthedocs.io/en/latest/</a></p><p>Marshmallow-sqlalchemy: <a href="https://marshmallow-sqlalchemy.readthedocs.io/en/latest/">https://marshmallow-sqlalchemy.readthedocs.io/en/latest/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5725aa269355" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Javascript Capsule: Nullish Coalescing (??) vs Logical OR(||) operators]]></title>
            <link>https://medium.com/@anikets43/javascript-capsule-nullish-coalescing-vs-logical-or-operators-b362a27340f2?source=rss-d2dc2b72f54c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b362a27340f2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[undefined]]></category>
            <category><![CDATA[operators]]></category>
            <category><![CDATA[null]]></category>
            <category><![CDATA[null-safety]]></category>
            <dc:creator><![CDATA[Aniket Agrawal]]></dc:creator>
            <pubDate>Wed, 04 Aug 2021 19:26:15 GMT</pubDate>
            <atom:updated>2021-08-04T19:30:57.154Z</atom:updated>
            <content:encoded><![CDATA[<p>Got confused the difference between ?? and ||, don’t worry it’s for the last time.</p><h3>Null Coalescing operator(??)</h3><p>It returns the right hand side value when its left hand side is either `null` or `undefined`.</p><pre>const result = (a !== null &amp;&amp; a !== undefined) ? a : b;</pre><p>can be rewritten as</p><pre>const result = a ?? b;</pre><pre>console.log(null ?? 5); // Output: 5<br>console.log(undefined ?? 5); // Output: 5<br>console.log(0 ?? 5); // Output: 0<br>console.log(10 ?? 5); // Output: 10</pre><h3>Logical OR operator(||)</h3><p>It returns the right hand side value when its left hand side is any falsy value including 0 and empty string.</p><pre>const name = &#39;&#39;;<br>console.log(name || &#39;Javascript&#39;); // Output: Javascript<br>console.log(null || &#39;Javascript&#39;); // Output: Javascript<br>console.log(undefined || &#39;Javascript&#39;); // Output: Javascript</pre><p>For more insights:</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator</a></p><p><a href="https://javascript.info/nullish-coalescing-operator">https://javascript.info/nullish-coalescing-operator</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b362a27340f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Magic of ES6 Arrow Function]]></title>
            <link>https://medium.com/@anikets43/magic-of-es6-array-function-9ac2fc3c0de9?source=rss-d2dc2b72f54c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ac2fc3c0de9</guid>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[es6-in-depth]]></category>
            <dc:creator><![CDATA[Aniket Agrawal]]></dc:creator>
            <pubDate>Fri, 01 Dec 2017 07:06:34 GMT</pubDate>
            <atom:updated>2017-12-01T07:07:25.015Z</atom:updated>
            <content:encoded><![CDATA[<p>ES6 provides various features to make the developer’s life easier. Arrow function is one of the extensively used features provided in ES6 or ECMAScript 2015.</p><p>Arrow function is the new ES6 syntax for defining a JavaScript function. It saves few keystrokes and also makes code look cleaner compared to ES5 syntax. It is often referred as ‘Fat Arrow Function’, and syntax is similar to C# anonymous function.</p><p>It uses <strong>=&gt; </strong>token referred as ‘maps to or goes to’ symbol to define the function.</p><p>The keywords <strong>function</strong> and <strong>return</strong> keywords are avoided when using arrow function. When the definition contains multi-line, then { } curly braces are mandatory.</p><p>Let’s see some of the examples to understand better.</p><h3>Function Usage</h3><h3>Parameterless Function</h3><pre>// ES5 syntax<br>function print()<br>{<br>   return &#39;Hello World&#39;; <em>// Output: &#39;Hello World&#39;</em><br>}</pre><pre>// ES6 syntax<br>var print = () =&gt; &#39;Hello World&#39;;</pre><h3>Function with Parameter with one Parameter</h3><pre>// ES5 syntax<br>function print(name)<br>{<br>   return name; <br>}<br><br>print(&#39;Hello World!&#39;); <em>// Output: &#39;Hello World&#39;</em></pre><pre>//ES6 syntax<br>var print = (name) =&gt; name;</pre><h3>Function with Parameter with Multiple Parameters</h3><pre>// ES5 syntax<br>function getProduct(a, b)<br>{<br>   return a * b; <br>}<br>getProduct(5,6); <em>// Output: 30</em></pre><pre>// ES6 syntax</pre><pre>var print = (name) =&gt; name;</pre><h3>Object Literals</h3><p>Arrow function can be used to return object literals containing variables and functions. But there are some differences in which <strong>this</strong> keyboard is processed. Arrow function uses lexical scoping(<strong>inner functions contain the scope of parent functions even if the parent function has returned</strong>) to determine the value of <strong>‘this’</strong> keyword.</p><p>When using ES5, syntax, this keyword returns the current context but in case of arrow function, it returns the global context.</p><p>Let’s take an example,</p><pre>var calculate = {<br>	var multiplier: 10;<br>	getProduct: function(){<br>	console.log(this);<br>}<br><br>calculate.getProduct(); <em>//  Object { multiplier: 10}</em></pre><p>Using Arrow function</p><pre>var calculate = {<br>	var multiplier: 10;<br>	getProduct: () =&gt; console.log(this);<br>}<br><br>calculate.getProduct(); <em>//  Window{}</em></pre><p><strong>Function returning function</strong></p><pre>var calculate = {<br>	Var multiplier: 10;<br>	getProduct: function(){<br>		return () =&gt; console.log(this.multiplier);<br>        }<br>}<br>calculate.getProduct()(); <em>// 10</em></pre><p>It returns 10 because getProduct is the function here and that’s the context we are working with.</p><p>Bind, Call and Apply methods don’t operate with arrow function, it ignores updating the object without claiming any error.</p><pre>var calculate = {<br>	var multiplier: 10;<br>	getProduct: function(){<br>		return () =&gt; console.log(this.multiplier);<br>        }<br>}<br><br>var newObject = {<br>	multiplier: 20<br>}<br><br>calculate.getProduct().bind(newObject); <em>//   10</em></pre><h3>Dealing with Event Handler</h3><p>In ES5, when dealing with an event handler, the calling object passes the current element’s context to the callee, which makes it difficult to access the global <strong>this</strong>.</p><pre>document.addEventListerner(&#39;click&#39;, function(){<br>	    console.log(this); <em>// #document</em><br>    }<br>)<br><br>document.addEventListener(&#39;click&#39;, () =&gt; console.log(this)); <em>// Window{ }</em></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ac2fc3c0de9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>