<?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 Tanishq Singh on Medium]]></title>
        <description><![CDATA[Stories by Tanishq Singh on Medium]]></description>
        <link>https://medium.com/@workrelated2501?source=rss-9efdf03a06cb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5846QuJl-JB9JA6fDIaf2g.png</url>
            <title>Stories by Tanishq Singh on Medium</title>
            <link>https://medium.com/@workrelated2501?source=rss-9efdf03a06cb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 16:03:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@workrelated2501/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[How Andrew Ng’s OpenWorker Orchestrates Context]]></title>
            <link>https://medium.com/@workrelated2501/how-andrew-ngs-openworker-orchestrates-context-d73d44851f73?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/d73d44851f73</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[andrew-ng]]></category>
            <category><![CDATA[openworker]]></category>
            <category><![CDATA[context-engineering]]></category>
            <category><![CDATA[agent-orchestration]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 11:59:48 GMT</pubDate>
            <atom:updated>2026-09-29T11:59:48.501Z</atom:updated>
            <content:encoded><![CDATA[<p>The interesting part is not the usual model → tool → result loop. Most agent frameworks already do that.</p><p>The part where I think you should focus at is how OpenWorker handles <strong>context</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u3Z05W49zvLu6a9z.png" /></figure><p>When the main agent needs to inspect a large codebase, it can call an explore tool. That creates another TurnEngine with a fresh context window.</p><p>Now you should be thinking, what is thissss explore tool, and what exactly is a TurnEngine? 🤯</p><p>So, in a very simplistic sense, <strong>TurnEngine is the thing running the agent loop</strong>. It takes the current conversation, sends it to the model, executes whatever tool calls the model asks for, feeds those results back, and keeps doing this until the task is complete or the iteration limit is reached.</p><p>And explore is simply one of the tools available to that main agent. The only difference is that instead of reading a file or running a search directly, calling explore spins up another TurnEngine.</p><p>Basically:</p><pre>Main TurnEngine<br>      |<br>      | calls explore(...)<br>      v<br>New TurnEngine<br>+ fresh context window<br>+ restricted read-only tools<br>      |<br>      v<br>explores the codebase<br>      |<br>      v<br>final report<br>      |<br>      v<br>Main TurnEngine</pre><p>The explorer gets read-only tools for things like file search, file reading and git inspection. It can go through a large amount of code without polluting the main agent’s context. Once it is done, only the final report comes back to the parent agent.</p><p>You can loosely relate this to <strong>exploration vs exploitation</strong>.</p><p>The main agent keeps working with the information it already has. You can think of that as <strong>exploitation</strong>.</p><p>When it needs more information, it spins up an isolated explorer, spends a separate context window there, and brings the useful parts back. That is the <strong>exploration</strong> side.</p><p>This is not exploration/exploitation in the strict RL sense. There is no learned value function or reward-based policy involved.</p><p>The comparison is more about how OpenWorker allocates context.</p><p>OpenWorker is deciding whether to keep working with the context it already has, or spend a fresh context window to go find more information.</p><p>And that, I think, is the more interesting way to look at its context orchestration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d73d44851f73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to write effective LLM as a Judge?]]></title>
            <link>https://medium.com/@workrelated2501/how-to-write-effective-llm-as-a-judge-10e0ef08cc0f?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/10e0ef08cc0f</guid>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[llm-agent]]></category>
            <category><![CDATA[llm-as-a-judge]]></category>
            <category><![CDATA[eval]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Wed, 19 Aug 2026 08:44:26 GMT</pubDate>
            <atom:updated>2026-08-19T08:44:26.027Z</atom:updated>
            <content:encoded><![CDATA[<p>I wrote earlier about what to test in a RAG system and how you can use LLM as a Judge. This post is about the harder part, which is writing an LLM as a Judge you can actually act on.</p><h3>Quick definition of what a judge is</h3><p>An LLM scoring another model’s output against <strong>criteria</strong> you write, instead of a human rater or a fixed metric. As simple as that.</p><p>Traditional metrics fix their <strong>criteria</strong> before you run them. BLEU and ROUGE compare tokens against a reference (Ground Truth), which fails for <strong>open-ended generation</strong> where there is no single correct phrasing.</p><p>A judge is a prompt, so you change what it measures by changing what you wrote.</p><p>GPT-4 as a judge agreed with the human majority vote 85% of the time on their data. (Source : MT-Bench paper), and, Humans agreed with each other 81%.</p><p>Three types:</p><ul><li><strong>Pairwise</strong>: which of these two outputs is better.</li><li><strong>Pointwise</strong>: score a single output. But absolute scores drift more when you swap judge models.</li><li><strong>Reference-guided</strong>: score against a gold answer. Most reliable, least usable in production, because someone has to write a gold answer for every query.</li></ul><p>Most production evals end up pointwise and reference-free, because nothing else scales. Yes the reason is that simple, but is this what you should do? 🤷‍♂️</p><h3>Designing the judge</h3><h3>Use binary pass/fail</h3><p>Sometimes people use a 5-pointer scale, but the difference between a 3 and a 4 is not a clear thing to explain. It is not clear between two annotators, and it is not clear across two runs of the same model. Both <strong>humans</strong> and <strong>LLMs</strong> drift toward the middle of a scale when they want to avoid committing to a call.</p><h3>Decompose before you judge</h3><p>A judge reading a whole paragraph and returning one number gives you a noisy score. Break the output into smaller claims first, judge each claim on its own, then aggregate as a ratio.</p><p><strong>TruLens</strong> splits the response into claims and drops the non-factual ones before groundedness scoring runs. <strong>RAGAS</strong> does the same thing under the name faithfulness: extract statements, entailment-check each against the context, score the fraction supported.</p><h3>Make it reason first</h3><p><strong>G-Eval</strong> works like this: have the judge generate its own evaluation steps from the criteria, then apply those steps to score. It specially helps with judging summarization kinda problems.</p><p>MT-Bench found chain-of-thought cut judge failures on math questions from 14/20 to 6/20, and to 3/20 once a reference answer was added. But focus on your use-case, not everything shown in papers or blogs (even mine!) works well in practice.</p><h3>Build the rubric from actual failures</h3><p>You cannot write a good judge prompt before you have looked at the data. People need to grade outputs to work out what their criteria are, so the criteria cannot be fully specified before grading starts. Let that sink in, read it twice, PLEASE.</p><p>Pick one domain expert, have them make binary calls on actual examples and write a critique explaining each call, then build the judge prompt using their actual critiques as few-shot examples. Iterate until the judge and the expert converge. This is where the Subject Matter Experts (SMEs) shine! Hehehe</p><h3>Validate it before you trust it</h3><p>Measure true positive rate and true negative rate against a held-out human-labeled set (SME labeled). Raw agreement reads high but tells you little when your classes are imbalanced. If more than one human is labeling, use Cohen’s Kappa.</p><h3>Spend the money in the right order</h3><p>Code assertions and regex first. They are deterministic, and cover a lot of known failures. A judge costs atleast 50+ labeled examples to build, non-determinism, trial and testing. Spend that only on things which require intelligence to judge, and you don’t have a set of actual answers.</p><h3>Biases you are designing against</h3><p><strong>Position bias</strong>: Judges give in-consistent verdicts when the two answers are swapped. They favour whichever answer came first more than 50–60% of the time. It gets more visibility on open-ended categories like writing, but not much on math and coding.</p><p><strong>Verbosity bias</strong>: In the <strong>MT-Bench</strong> paper, they padded answers with rephrased duplicate content that added no new information. Earlier versions of Claude, GPT, preferred the padded version 91.3% of the time.</p><p><strong>Self-preference</strong>: Models tend to score there own outputs higher.</p><p>Judges can also be gamed directly. Bare punctuation or a generic opener like “Let’s solve this step by step” triggered false positive rewards up to 80% of the time. So basically a judge that scores well on your validation set is not automatically robust to degenerate input. So focus on edge cases while evaluating your judges as well.</p><p>The <strong>mitigations</strong> are simple enough. <strong>Swap positions</strong> and only count a win that holds both ways. Write <strong>specific criteria</strong> so that there is no or little room to interpret. Tell the judge explicitly to be strict, since scores tend to inflate by default. Give it an instruction in a way, so it can return “<strong>cannot determine</strong>” instead of guessing.</p><h3>What to actually put in the prompt for RAG metrics</h3><p><strong>Context relevance.</strong> Input is the query plus one retrieved chunk, scored one chunk at a time. No response involved. Scoring the whole retrieved set at once doesn’t help you find which specific chunk was irrelevant.</p><p><strong>Groundedness.</strong> Input is one claim from the response, checked against the entire retrieved context. Reasoning is <strong>required</strong> here, not optional.</p><p><strong>Answer relevance.</strong> Input is the question and the response. One caveat, a confidently wrong answer can score as fully relevant if it addresses what the question asked for. Groundedness is the metric that catches the wrongness, so you need both.</p><p>None of the three needs a human-written reference answer, which is why they are getting popular in the industry.</p><h3>What it comes down to</h3><p>Most of the value here is not the judge. It is the process of looking at your outputs closely enough to write the rubric, and then checking whether your judge agrees with you.</p><p>Next post: What to evaluate in an Agent Pipeline?</p><p>Till then, <strong>Happy Learning</strong>, Cheers 🙌😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10e0ef08cc0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What to Evaluate in a RAG Pipeline?]]></title>
            <link>https://medium.com/@workrelated2501/what-to-evaluate-in-a-rag-pipeline-ca53d1822d1e?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca53d1822d1e</guid>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[llm-as-a-judge]]></category>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 19:15:02 GMT</pubDate>
            <atom:updated>2026-08-10T19:15:02.017Z</atom:updated>
            <content:encoded><![CDATA[<p>Continuing from the last post. You know why you can’t hand off evals to someone else, and why error analysis has to come before you pick a single metric. Now let’s get specific. So what do you actually check in a RAG pipeline?</p><p>A RAG system has three pieces. The <strong>Question(Q)</strong> that came in, the <strong>Context(C)</strong> your retriever pulled, and the <strong>Answer(A)</strong> the model generated. Almost every failure you’ll run into is a mismatch between two of these three things.</p><p>Three things matter most.</p><p><strong>Context Relevance</strong> (<strong>C|Q</strong>) : Is the retrieved context actually relevant to the question. If your retriever pulls the wrong chunks, nothing downstream saves you. No amount of prompting fixes a wrong document.</p><p><strong>Groundedness </strong>(<strong>A|C</strong>) : Is the answer grounded in that context, or did the model fill the gap from its own memory. Retrieval pulls the wrong document, the model answers anyway using what it already knows, and the output seems legit. You only catch this by checking the answer against what was actually retrieved, not by reading the answer on its own.</p><p><strong>Answer Relevancy </strong>(<strong>A|Q</strong>) : Does the answer address what was actually asked. Sometimes the context is right and the answer is grounded, and it still misses the question. That’s still a failure.</p><p><strong>Grade these separately.</strong> Don’t put them in a single LLM as a Judge!</p><p>Before any of this, just look at whether the right chunks got retrieved, using plain ranking. Out of what you pulled, how much was relevant, and how much relevant stuff did you miss entirely. Metrics like <strong>Precision@k</strong>,<strong> Recall@k</strong>,<strong> MRR</strong>,<strong> NDCG</strong>, etc.</p><p>A few failure points that show up specifically in RAG :</p><p>→ <strong>Bad document parsing</strong>/OCR corrupting the corpus before retrieval even runs. <br>→ <strong>Chunking Strategy Failure</strong> : A fact split across two chunks, etc. <br>→ <strong>Context Rot</strong> : Needle in a haystack, lost in the middle, just different names for the typical problem with long context setting.</p><p>Next post: <strong>How to write effective LLM as a Judge?</strong></p><p>Till then, Happy Learning, Cheers 🙌😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca53d1822d1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evals is QA for AI Engineers!]]></title>
            <link>https://medium.com/@workrelated2501/evals-is-qa-for-ai-engineers-b7f9de1bf806?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7f9de1bf806</guid>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Sun, 02 Aug 2026 08:40:18 GMT</pubDate>
            <atom:updated>2026-08-02T08:40:18.046Z</atom:updated>
            <content:encoded><![CDATA[<p>A normal test checks an expected value. You know what a particular function should return, you write a test, check the return value!</p><p>But with LLMs you can’t do that and it’s not only because of non-determinism. The actual problem is there’s no single right answer. So what exactly are you comparing the output against?</p><p>Now there are still things you can test properly. Valid JSON. No internal ids leaking into the response, etc.</p><p>So what should we do here?</p><p>Here’s the thing. For the AI application you’re building there is no separate team evaluating it. <strong>YOU</strong> are the one who has to do the evals. You know the architecture, you know the flow, you know where it can break!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VBkOqpeHPQjmhhr0.png" /></figure><h3>But can’t we just do a KT?</h3><p>Fine, so write it all down, do a proper knowledge transfer, hand it to someone else.</p><p>It doesn’t work, and there’s a reason why.</p><p>You need criteria before you can grade outputs, but reading the outputs is how you figure out what the criteria even are (<em>read it again, let it sink in!)</em>, this is the exact issue with AI Applications/LLM Pipelines. Some criteria only show up after you observe specific model outputs. They couldn’t have been written down in advance.</p><p>Think about what that does to a KT. You can’t hand over something(criteria) that doesn’t exist yet. The criteria is something you discover by reading your own system’s outputs, and it keeps changing while you’re experimenting.</p><h3>Okay so what do you actually do</h3><p>Start with error analysis, before you pick a single metric.</p><p>Pull a sample of realtime traces. Go through them. Every time you might find something valuable to work on, write down what was wrong. Do this for certain traces (I am not gonna give you a number for this 😬)</p><p>Some examples can be, your retriever is pulling only 3/5 relevant chunks, model answering for things for which it should have said “I don’t know!“…</p><p>Those groups are your eval set. That’s it. You now know what to write evals for, and you know which one to fix first based on the priority of your problem statement.</p><h3>Don’t just look at the output</h3><p>This is the part I find beautiful and a lot of people find frustrating. You can’t just look at the final output. You have to check the whole pipeline and the moving parts in it.</p><p>Say a user asks something and the answer looks great. But retrieval pulled the wrong document and the model just filled the gap from its own weights. The output looks fine but your system is not working, and you will never catch this by grading final answers.</p><p>Same with Agents.</p><p>So log your traces properly, every retrieval, every tool call, every intermediate step. <strong>If there is no observability, there is nothing to evaluate.</strong></p><h3>What’s coming next</h3><p>In the next few posts I’ll get into specific systems. What exactly to evaluate in a RAG pipeline, what the moving parts are inside agents, and the importance of Human Subject Matter Experts in the age of AI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7f9de1bf806" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated Red-Teaming : GPT-Red]]></title>
            <link>https://medium.com/@workrelated2501/automated-red-teaming-gpt-red-095a1c189416?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/095a1c189416</guid>
            <category><![CDATA[ai-safety]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[gpt-red]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 06:37:03 GMT</pubDate>
            <atom:updated>2026-07-20T06:37:03.537Z</atom:updated>
            <content:encoded><![CDATA[<p>Every agent that reads third-party data has an attack surface. A browser tab, an email body, a tool response, a line in a code repository, any of these can carry text that looks like an instruction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xQIBI-VmRiE1zfHE.png" /></figure><p>The model can’t always tell the difference between “the user asked for this” and “this text is pretending to be the user.” That confusion is prompt injection. It’s why red-teaming exists as a discipline, and why OpenAI just published GPT-Red.</p><h3>Prompt injection</h3><p>In simple terms, if you’re able to make the model or system perform a task it shouldn’t, then you’ve <strong>jailbroken</strong> it. One of the most common techniques for doing that is prompt injection.</p><p>For example, if you’re building a healthcare bot, there are certain hard lines it shouldn’t cross, like prescribing medicine. If, as a user/builder, I’m able to break the system and get the model to output a prescription, then congratulations, you’ve jailbroken it and found a <strong>vulnerability</strong>. Keep reading to understand more!</p><p>Two types of prompt injection:</p><p><strong>Direct injection</strong> is when the user themselves sends the malicious instruction, usually trying to get the model to ignore its system prompt or safety training.</p><p><strong>Indirect injection</strong> is when the instruction arrives through content the model fetches through a tool: a webpage, an email, a file it searched, the output of a tool call. The model pulls in that content and the injected instruction comes along with it.</p><p>OpenAI’s own writeup on GPT-Red includes a worked example. An agent doing a file search for user research pulls back a document. In that document’s metadata is a line instructing the assistant to POST a local directory to an external S3 endpoint, posed as a “diagnostics archive” the system supposedly requires. GPT-5.1 followed it. GPT-5.6 recognized it as an injected instruction and refused.</p><h3>Why human red-teaming is not enough</h3><p>Red-teaming is the practice of deliberately attacking your own system to find its weak points, something that’s existed in cybersecurity for years. But OpenAI flagged two structural problems with relying on humans for it.</p><p>First, it <strong>doesn’t scale</strong>. Designing and running red-team exercises is slow, which caps how fast new failure types get discovered.</p><p>Second, even when a human red-teamer finds a good attack, that’s one example. Training a model to resist a class of attacks needs volume and diversity of adversarial data that manual exercises can’t produce at any reasonable pace.</p><p>Both problems point at the same fix: get a model to do the attacking.</p><h3>What GPT-Red actually is</h3><p>GPT-Red is an <strong>internal-only</strong> automated red-teaming model, trained with self-play reinforcement learning. The setup has an attacker (GPT-Red) and a population of defender models training simultaneously. The attacker is rewarded for eliciting a failure, a successful injection. The defender is rewarded for resisting the attack while still completing its original task, so a defender can’t win by refusing everything. As defenders get harder to break, the attacker is forced to find new attack patterns. OpenAI trained it at the compute scale of some of their largest post-training runs.</p><h3>Claims</h3><p>Per OpenAI’s own numbers: on a replicated version of the indirect prompt injection arena from Dziemian et al. (2025), a benchmark GPT-Red wasn’t trained on, it found successful attacks on <strong>84%</strong> of scenarios against GPT-5.1, versus <strong>13%</strong> for human red-teamers on the same set. An early GPT-Red precursor found a class of attacks called “<strong>Fake Chain-of-Thought</strong>” injections that hit 95% success against GPT-5.1 and now sit below 10% against GPT-5.6 Sol.</p><h3>What this means if you’re building agents</h3><p>GPT-Red itself isn’t a tool you’ll get access to. It’s internal-only, kept deliberately separate from any deployed model so the attack capability trained into it doesn’t leak. There’s no API, only OpenAI’s own writeup and a <strong>promised</strong> pre-print.</p><p>If you’re shipping an agent that uses browsers, email, MCP, or any retrieved content through tool calling, indirect prompt injection carries an 84-to-13 gap between what automated attackers find and what human review catches. Self-play red-teaming is heading toward becoming standard practice the way adversarial training did for image classifiers, and the sooner your eval pipeline treats injection as a first-class failure mode instead of an edge case, the less it costs you later.</p><p>And trust me on this, I have seen startups and established companies not think about evals as the first thing to look at. Most of the time it’s because they don’t actually know the nuances you need to evaluate your system on. I’ve said this multiple times: it’s not just about the output or response, it’s also about the steps your system takes to reach that response. Those need to be evaluated as well.</p><p>Don’t worry if you feel confused about what to actually evaluate. I’m planning a series of articles on this, and it will probably help a lot of decision makers evaluate their system before getting it into production.</p><p><strong>Source:</strong> <a href="https://openai.com/index/unlocking-self-improvement-gpt-red/">GPT-Red: Unlocking Self-Improvement for Robustness</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=095a1c189416" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ReAct: How LLMs Learned to Think Out Loud Between Actions]]></title>
            <link>https://medium.com/@workrelated2501/react-how-llms-learned-to-think-out-loud-between-actions-aec26ebeff4a?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/aec26ebeff4a</guid>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Wed, 27 May 2026 14:39:06 GMT</pubDate>
            <atom:updated>2026-05-27T14:39:06.673Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-wekz-I_mUJ9kHWRyoc7Q.png" /></figure><p>In late 2022, two threads of LLM research were running in parallel and ignoring each other.</p><p>One thread was <strong>chain-of-thought prompting</strong>. Show the model a few examples of reasoning step by step, and it gets much better at math and commonsense tasks. The catch: the model reasons entirely inside its own head. If it doesn’t know a fact, it makes one up (Hallucination).</p><p>The other thread was <strong>action-taking</strong>. WebGPT browsed the web. The models could <em>do</em> things, but they didn’t reason about what they were doing. They predicted the next action from the current observation and that’s it.</p><p>ReAct, published by Shunyu Yao and collaborators at ICLR 2023, asked a smart question: what if the model just did both, in the same trajectory?</p><h3>The trick</h3><p>Augment the action space with language itself. The model can emit a regular action like Search[Apple Remote], or it can emit a <em>thought</em>: free-form text that doesn’t touch the environment but gets appended to its own context.</p><p>The loop becomes Thought, Action, Observation, Thought, Action, and so on, until the model emits Finish[answer].</p><blockquote><em>For the instruction </em>“I’d like a 3-ounce bottle of bright citrus deodorant for sensitive skin, priced under $50”<em>, a </em><strong><em>thought</em></strong><em> might </em><strong><em>decompose</em></strong><em> the goal (”I need a 3-ounce bright citrus deodorant under $50”), filter candidates (”this one is strawberry banana, not what I need”), or confirm a match (”this product has the right scent and the right size, looks good to buy”). </em>[Example taken from the WebShop experiment in the paper]</blockquote><h3>Why it worked</h3><p>On HotpotQA, hallucination accounted for 56% of CoT’s failures and 0% of ReAct’s, because when the model wasn’t sure, it could go look something up. On ALFWorld, the household-task benchmark, ReAct hit 71% success with two demonstrations per task type. The previous best, BUTLER, was an imitation-learning model trained on 100,000 expert trajectories per task type. It scored 37%.</p><p>CoT and ReAct fail in opposite ways. CoT hallucinates fluently. ReAct gets stuck in retrieval loops when its tools return garbage. The paper’s strongest setup is actually a hybrid: try ReAct first, fall back to CoT with self-consistency when retrieval fails.</p><h3>What it became</h3><p>ReAct is now the substrate of basically every production LLM agent. LangGraph’s create_react_agent (now → create_agent), Anthropic’s tool use loop, AWS Bedrock Agents, and most OpenAI function-calling agents are all the same Thought, Action, Observation cycle, just dressed in structured JSON instead of literal “Action: strings”.</p><p>Later work filled in what ReAct left open.</p><ul><li>Reflexion (2023) added an episodic memory of self-reflections so the agent could learn from failed attempts.</li><li>Tree of Thoughts (2023) replaced the single linear trajectory with explicit search over multiple reasoning paths.</li><li>With reasoning models like the o-series and extended-thinking Claude, the “thought” half has moved inside the model’s hidden reasoning trace, so the visible ReAct loop is often shorter, sometimes one or two tool calls plus a long internal chain.</li><li>The bigger shift in 2025 was infrastructure: Anthropic’s Model Context Protocol, released in late 2024 and adopted across <strong>OpenAI</strong>, <strong>Google</strong>, and <strong>Microsoft</strong> through 2025, made the “<strong>action</strong>” half of ReAct standardized and portable. The outer loop, reason, act, observe, repeat, is still ReAct. What changed is the engineering around it.</li></ul><h3>Takeaway</h3><p>ReAct’s contribution wasn’t a new model. It was noticing that an LLM’s output can play two roles in the same trajectory: text the orchestrator executes as an action, and text that only feeds back into the model’s next step.</p><p>Happy Learning! Cheers! 🙌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aec26ebeff4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Freshers, the bar went up. The jobs didn’t go away.]]></title>
            <link>https://medium.com/@workrelated2501/freshers-the-bar-went-up-the-jobs-didnt-go-away-6bd54bd898fa?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bd54bd898fa</guid>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[freshers-jobs]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[ai-job-market]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Wed, 27 May 2026 03:01:32 GMT</pubDate>
            <atom:updated>2026-05-27T03:01:32.891Z</atom:updated>
            <content:encoded><![CDATA[<p>I get why freshers are panicking. I want to give you a different take.</p><p><strong>What actually changed?</strong></p><p>A few years ago, when I was finishing my bachelors, a fresher could land a 13–15 LPA job by knowing CNNs, transformers conceptually at a surface level, Random Forest, XGBoost, and some scikit-learn. That was the bar.</p><p>That bar doesn’t exist anymore.</p><p>Today the questions are:<br>Do you understand LLMs? Can you build a RAG pipeline? Do you know when to use an agent and when not to? Have you done any evaluation? Do you know what guardrails are?</p><p>System design used to be an SDE-2 conversation. Now freshers are being asked to design AI applications at a high level, “how would you architect a support bot using RAG?, talk about optimizations to make in the system”</p><p><strong>Why this is actually good for you?</strong></p><p>When the bar is low, everyone clears it. You compete with thousands of people who know the same things you do. Your college tier, your GPA, your network become the tiebreakers, and that locks out a lot of capable people.</p><p>When the bar is high, most people don’t clear it. If you do, you stand out without needing the brand.</p><p>This is the moment a lot of you have been asking for, including me, where what you <strong>know</strong> matters more than <strong>where</strong> you studied. Don’t waste it.</p><p>Startups, remote companies, care if you can ship. They post on LinkedIn, Wellfound, Twitter. They run open challenges. They hire on talent.</p><p>I genuinely respect those companies.</p><p>Your job is to be findable. GitHub. LinkedIn. A blog. A project that actually works.</p><p><strong>Remember this<br></strong>“Getting hired is hard. Hiring someone is harder.”</p><p>The person interviewing you has reviewed dozens of resumes. They’ve sat through <strong>bad</strong> interviews. Their team is <strong>short-staffed</strong>. They want <strong>you</strong> to be the one so they can stop interviewing.</p><p>They are <strong>not</strong> your enemy. They are rooting for you.</p><p>Your job is to make it easy for them to say yes. Show the relevant skills. And don’t try to be a specialist, be generalists.</p><p>People who can handle the engineering around an LLM API call, retry mechanism, caching, observability, evals, and who also understand what’s happening inside the model well enough to debug it.</p><p>That’s the sweet spot. Not a researcher. Not just a wrapper-builder. The person in the middle.</p><p>Cheers, Study Hard!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bd54bd898fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Thought on Constrained Thinking and AI]]></title>
            <link>https://medium.com/@workrelated2501/a-thought-on-constrained-thinking-and-ai-9890c0fdb10e?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9890c0fdb10e</guid>
            <category><![CDATA[philosophy-of-ai]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Sat, 31 Jan 2026 18:33:10 GMT</pubDate>
            <atom:updated>2026-01-31T19:59:26.413Z</atom:updated>
            <content:encoded><![CDATA[<p>Constrained Thinking</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPQHmPyP9_79OzmZ04m85A.png" /><figcaption>Generated using NotebookLM</figcaption></figure><p>This is what helped most of the successful people getting the success that they wanted, they focussed there vision and work to one specific point/topic which then led to them being so good at it.</p><p>I think this is what is missing on how people use AI nowadays, I see people complaining about how the system is going haywire, and all the places, but they never think that it might have been because they were not able to present there thoughts or the problem statement that they wanted to solve to the AI properly.</p><p>It boild down to how people percieve a certain situation, I like to place it in either of the 3 buckets (I don&#39;t like classifying but that&#39;s how most of the people work!):</p><p>1. Pre-thought (Outsource Thinking): In this people just put the problem statement as it is into the AI, and they expect some solution or a range of solutions. Here, the problem is you are not making the model think through a particular lens, its basically a broad canvas of options which are available to the model as well to you.</p><p>2. Post-thought : In this one, people who have a particular way of solving the problem they look for a partner to help them in achieving a particular goal, and in the process might even discover a thing or two. This is generally a good way to use AI currently. Here, the only problem is, that you might be able to solve the problem, but might not give the AI freedom to suggest something more, but that&#39;s the trade-off for productivity.</p><p>3. Disbelievers : These are people who have trust in there abilities to an extent that they discard using AI for one reason or the other, because in some cases it might not have given the solution to there problem, or might have hallucinated, etc.</p><p>I have seen people doing insane stuff using AI nowadays, be it coding agents, or the idea of giving access to file system to an agent, etc.</p><p>But I still think that&#39;s not what it&#39;s for, although that&#39;s what it&#39;s good at (atleast for now), I think of AI as a revolution not just because economy and money is at play but because this is fundamentally a very fascinating thing to even read about, or explore possibilities.</p><p>So the purpose of my thought was to basically force me to think about why people might not be happy with this tech right now, why people are being skeptical about it, even if we have so many thinkers in this field , why are we still limited towards looking into AI from a lens of a product and not something which humanity can use it for good?</p><p>And that&#39;s when I got to the answer &quot;Constrained Thinking&quot;, and that&#39;s how people end up solving atleast some of the low risk problems.</p><p>(These are raw thoughts I wrote while trying to understand why people are frustrated with AI today. This isn’t a conclusion, it’s a thinking process.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9890c0fdb10e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Reality Behind Multi-Agent Systems: Why the Promise Doesn’t Match the Practice]]></title>
            <link>https://medium.com/@workrelated2501/the-reality-behind-multi-agent-systems-why-the-promise-doesnt-match-the-practice-ce8a86da154e?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce8a86da154e</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[agentic-ai-problems]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai-systems]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 19:04:33 GMT</pubDate>
            <atom:updated>2025-09-23T19:05:09.070Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LCK9u2pxswx67kJ1Fy4ltA.png" /></figure><p>Multi-agent systems are getting a lot of traction nowadays because of the promising nature of the work that they do. The promise is to automate end-to-end tasks based on just instructions about the task. But does that happen in reality?</p><p>No, not at all, because there are a lot of nuts and bolts that you need to understand if you want to make a complex system like this work. We have identified some major areas where they still need a lot of training and tuning so that they can work on complex tasks.</p><p>Before I go forward with the list, let’s understand some topics which you will need:</p><h3>Multi-Agent Framework</h3><p>Generally, in a multi-agent framework, we have a Lead Agent who is typically responsible for understanding the user task and delegating the work to the sub-agents. When sub-agents are done with the work delegated to them, the lead agent should be capable of assessing their work as well. Sub-agents can be specialized in one task per sub-agent.</p><h3>Context Engineering</h3><p>It’s a big topic, but I’ll write just the crux of the topic for basic understanding. Context engineering refers to a method we use to selectively pass context to the LLM/agent, and how to do this effectively. There are limitations on context length and problems like hallucinations as well, which can be mitigated if you pass the context properly. This is still an ongoing research problem.</p><h3>Here’s the list:</h3><h3>1. Agent Orchestration</h3><p>I will explain Agent Orchestration with a simple example. Let’s take the example of an office, where in a typical corporate setting you will have a manager and some employees (say, 5) working under them. Now it is so damn hard to manage a team of 5 and a manager, and work effectively in a team setting. Miscommunications happen, sometimes one of them is not present so the task needs to be delegated to someone else, so many issues arise.</p><p>Now think about explaining all this to a model, so that a Lead Agent can work with 5 sub-agents, and that too effectively, moving towards solving a common task.</p><h3>2. Memory Management</h3><p>This is one of the major bottlenecks nowadays in multi-agent systems. For every LLM which you might be using for an agent, you will have a context length in which it can operate efficiently. But when sub-agents are working on tasks delegated to them by the lead agent, they won’t know what to keep in the working memory and what to remove.</p><p>Let’s take an example: Let’s say you were working on adding a new feature for your company’s application, but when you were doing research for this feature, you read about 3–4 other things which are quite good in general. Now when you were shipping that feature, your manager said that it is not needed anymore! (Apart from the frustration which kicks in!) So when you remove that feature, will you also delete the knowledge which you gained during the research phase? The answer depends on you!</p><p>But in the case of LLMs/agents, defining this is a hell of a task. It’s not that simple. People have been working with concepts like memory scratchpad, etc., to help agents with working memory, but then again the question remains the same: what is important and what is not?</p><h3>3. Effectiveness of Task Assignment by Lead Agent</h3><p>Don’t take offence, not everyone is a born leader. It’s a learning curve; every manager learns how to manage people, and people are expecting the models to have this skill without that experience?</p><p>To effectively assign tasks to the sub-agents, the lead agent should know about their strengths, weaknesses, and speed of completing a task given to them. After some experience, some managers also start thinking about the scope of the people working under them, that there should be something which people working under them should develop, something that they can say “our manager helped us learn this stuff!”</p><p>Now again, explaining this to a human might take some work, but explaining it to an agent using a prompt with 100 instructions, I don’t think it helps at all! And without knowing enough about the sub-agents, the lead agent won’t be able to delegate the work properly, which leads to cost increase, context mismatch, etc.</p><h3>4. Information Isolation vs. Sharing</h3><p>This is also one of the most important things to discuss for multi-agent systems: when the lead agent is assigning work to the sub-agents, how should the information be passed on? Should the lead agent tell all the information about the task, or should it just tell the sub-agents what to work on individually, only about their specific task?</p><p>And if we go one more layer deeper, should sub-agents be sharing information amongst themselves, or should they be isolating their work and finishing it, then reporting directly to the lead agent and getting the work “assessed”? That’s a whole other problem!</p><h3>5. Is the Lead Agent Actually Capable of Leading or Assessing?</h3><p>Again, don’t take offence, but here we are assuming that the lead agent is capable of understanding the task, knows about sub-agents (at least 60–70%), delegates tasks properly, does reviews, etc.</p><p>Now just for assessment of the work done by the sub-agents, the lead agent should know the following:</p><ol><li>Information about the task.</li><li>Information about the tasks delegated to the sub-agents</li><li>Understanding of the tasks submitted by the sub-agents</li></ol><p>If the lead agent has all of this, then only it might be capable of assessing the work properly and giving good feedback, which can make the quality of work really good.</p><h3>Conclusion</h3><p>After reading all the above, I know you might be thinking that I am totally against it and being negative about it. But that’s not the case. I am as excited and happy as you all are to see such systems in real life, making an impact on people’s lives, improving the way we work, and helping us complete goals in a faster and more efficient manner.</p><p>So to achieve all this, we need to solve these fundamental problems, which are not new in any case, they have existed since humans started living together. They are classical problems, but to solve them for agents, we need to adapt different methods and try to understand that this is not just an “AI” problem. It is as much an engineering problem as it is an AI problem, so we need to buckle up and solve these problems!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce8a86da154e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Documents to Datasets: Mastering Meta’s Synthetic Data Kit]]></title>
            <link>https://medium.com/@workrelated2501/from-documents-to-datasets-mastering-metas-synthetic-data-kit-2358a794afb9?source=rss-9efdf03a06cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2358a794afb9</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[meta-ai]]></category>
            <category><![CDATA[synthetic-data-kit]]></category>
            <category><![CDATA[synthetic-data-generation]]></category>
            <category><![CDATA[fine-tuning-llm]]></category>
            <dc:creator><![CDATA[Tanishq Singh]]></dc:creator>
            <pubDate>Tue, 06 May 2025 19:31:19 GMT</pubDate>
            <atom:updated>2025-05-06T19:34:51.627Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Hello Hello!</p><p>Today we are going to talk about an awesome release by Meta AI, their new Synthetic Data Generator Kit!</p><p>The Meta Synthetic Data Kit is a specialized tool designed to generate high-quality synthetic datasets specifically for fine-tuning Large Language Models (LLMs). This toolkit simplifies the process of generating training data in formats compatible with various fine-tuning workflows.</p><p>I know I know, too much bookish language, let’s actually see the flow below:</p><p>Here’s a detailed breakdown of how the entire process works:</p><h3>1. Data Ingestion</h3><p>The first and most crucial step is to understand various file formats and convert them into plain text. The SDK supports 6 types of parsers:</p><ul><li><strong>PDFParser</strong> (using pdfminer)</li><li><strong>HTMLParser</strong> (using beautifulsoup4)</li><li><strong>YouTubeParser</strong> (using pytube and youtube_transcript_api)</li><li><strong>DOCXParser</strong> (using docx)</li><li><strong>PPTParser</strong> (using pptx)</li><li><strong>TXTParser</strong> (simply reading the text file)</li></ul><p>location : synthetic_data_kit/core/ingest.py</p><h3>2. Creation (synthetic_data_kit/generators)</h3><p>Using the command:</p><pre>synthetic-data-kit create [TEXT_FILE_PATH] --type [FORMAT_TYPE]</pre><p>Where FORMAT_TYPE options include:</p><ul><li>qa (question-answering pairs)</li><li>cot (chain-of-thought reasoning)</li></ul><p>The creation process follows these steps:</p><ol><li>Loading the input text file</li><li>Chunking the text into manageable segments (based on the chunk size!)</li><li>Generating summaries for each chunk (these summaries are included in the prompts)</li><li>Constructing prompts based on templates in the config file</li><li>Calling vLLM API to generate responses</li><li>Saving the generated samples in JSON format</li></ol><p>location: synthetic_data_kit/core/create.py</p><h3>Customizing Prompts</h3><p>The quality of the generated examples depends heavily on the prompts. Here’s an example from the configuration:</p><pre>prompts:<br>  qa_generation: |<br>    You are creating question-answer pairs for fine-tuning a legal assistant.<br>    Focus on technical legal concepts, precedents, and statutory interpretation.<br>    Below is a chunk of text about: {summary}...<br>    Create {num_pairs} high-quality question-answer pairs based ONLY on this text.<br>    Return ONLY valid JSON formatted as:<br>    [<br>      {<br>        &quot;question&quot;: &quot;Detailed legal question?&quot;,<br>        &quot;answer&quot;: &quot;Precise legal answer.&quot;<br>      },<br>      ...<br>    ]</pre><p>These prompts can be customized for different domains or use cases.</p><h3>3. Curation</h3><p>The curation step uses:</p><pre>synthetic-data-kit curate data/generated/report_qa_pairs.json -t 7.0</pre><p>This critical quality control process includes:</p><ol><li>Loading the JSON file with generated samples</li><li>Quality Assessment:</li></ol><ul><li>Constructing a rating prompt (qa_rating in the config file)</li><li>Rating each question-answer pair on a scale from 1–10, based on:</li><li><strong>Accuracy (0–3)</strong>: factual correctness</li><li><strong>Relevance (0–2)</strong>: relevance to content</li><li><strong>Clarity (0–2)</strong>: clear language</li><li><strong>Usefulness (0–3)</strong>: value for model learning</li></ul><p>3. Sending this prompt to the vLLM server where the LLM assigns a quality score</p><p>4. Filtering: Examples with scores below the configured threshold (default 7.0) are removed</p><p>location: synthetic_data_kit/core/curate.py</p><h3>4. Save_As Process:</h3><p>The final stage prepares the data for model training:</p><ol><li>Loading the curated samples</li><li>Format Conversion: Transforming the data to match specified formats:</li></ol><ul><li>Alpaca format</li><li>ChatML Format</li><li>JSONL</li><li>Other common training formats</li></ul><p>3. Storage Conversion: Saving in either:</p><ul><li>JSON format</li><li>HF (Hugging Face) format</li></ul><p>location: synthetic_data_kit/core/save_as.py</p><h3>Practical Use Cases</h3><p>This toolkit excels at:</p><ol><li><strong>Domain Adaptation</strong>: Fine-tuning general LLMs for specialized domains like law, medicine, or finance</li><li><strong>Content Transformation</strong>: Converting documentation into interactive Q&amp;A training data</li><li><strong>Knowledge Distillation</strong>: Using large models (like Llama-3.3–70B) to generate training data for smaller models</li><li><strong>Instruction Dataset Creation</strong>: Building custom datasets for specific tasks</li></ol><h3>Quick Setup</h3><pre># Install the toolkit<br>pip install synthetic-data-kit</pre><pre># Create directory structure<br>mkdir -p data/{pdf,html,youtube,docx,ppt,txt,output,generated,cleaned,final}</pre><pre># Start vLLM server with a Llama model<br>vllm serve unsloth/Llama-3.2-3B-Instruct --port 8000</pre><pre># Check if server is running<br>synthetic-data-kit system-check</pre><h3>Configuration System</h3><p>The toolkit is driven by a YAML configuration file (default: configs/config.yaml) that controls all aspects of the pipeline:</p><pre>vllm:<br>  api_base: &quot;http://localhost:8000/v1&quot;<br>  model: &quot;unsloth/Llama-3.2-3B-Instruct&quot;<br>generation:<br>  temperature: 0.7<br>  chunk_size: 4000<br>  num_pairs: 25<br>curate:<br>  threshold: 7.0<br>  batch_size: 8</pre><p>Users can override this configuration via CLI arguments or by passing a custom YAML file with -c my_config.yaml.</p><h3>Complete Workflow Example</h3><p>Here’s how you’d process a document from start to finish:</p><pre># Process a PDF<br>synthetic-data-kit ingest docs/report.pdf<br>synthetic-data-kit create data/output/report.txt --type qa<br>synthetic-data-kit curate data/generated/report_qa_pairs.json<br>synthetic-data-kit save-as data/cleaned/report_cleaned.json --format alpaca --storage hf</pre><h3>What Makes Meta’s Synthetic Data Kit Special?</h3><p>The curation and save-as stages are what set Meta’s Synthetic Data Kit apart from simpler data generation tools. By filtering for quality and providing standardized outputs, it creates datasets that are:</p><ul><li>Ready for immediate fine-tuning</li><li>Pre-filtered for quality</li><li>Likely to produce better results when used to train/fine-tune models</li><li>Compatible with popular training pipelines</li></ul><p>With this toolkit, you can transform any content into high-quality training examples for fine-tuning LLMs. The focus on quality control through LLM-based curation ensures that only the best examples make it into your training data.</p><p>I hope you learned something new today!</p><p>Till the next post, Happy Learning, Cheers 🙌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2358a794afb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>