<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PromptMaster</title>
    <description>The latest articles on DEV Community by PromptMaster (@promptmaster).</description>
    <link>https://dev.to/promptmaster</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3982446%2Fe02224c6-6b16-4729-a71a-3cee5b4142ea.jpeg</url>
      <title>DEV Community: PromptMaster</title>
      <link>https://dev.to/promptmaster</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/promptmaster"/>
    <language>en</language>
    <item>
      <title>Outcome vs. Process: Evaluating Multi-Step Agents</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 08 Aug 2026 14:58:26 +0000</pubDate>
      <link>https://dev.to/promptmaster/outcome-vs-process-evaluating-multi-step-agents-2jg5</link>
      <guid>https://dev.to/promptmaster/outcome-vs-process-evaluating-multi-step-agents-2jg5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Judging only an agent's final answer misses most of what can go wrong.&lt;/strong&gt; An agent plans, calls tools, and reasons across steps — and can reach a good answer by luck through a broken process that fails on the next input.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluate the trajectory, not just the destination:&lt;/strong&gt; outcome evaluation (was the result right?) and process evaluation (were the steps sound?) together.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trajectory is what makes an agent an agent
&lt;/h2&gt;

&lt;p&gt;A single model call has one output to judge. An agent has a trajectory — it plans, calls tools, observes results, reasons, and acts, often over many steps. That in-between is exactly what separates evaluating an agent from evaluating a single model call, and it's where the leverage and the failures both hide. If you only look at final answers, you're evaluating the agent as though it were a model, and missing the dimension that makes it an agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outcome versus process
&lt;/h2&gt;

&lt;p&gt;There are two complementary questions. Outcome evaluation asks whether the final result was correct — necessary, but blind to how it was reached. Process evaluation asks whether the steps were sound: did the agent plan sensibly, call the right tools, recover from errors, avoid needless loops? An agent that gets the right answer through a wrong process will eventually get a wrong answer, so process evaluation is what catches problems before they surface as failures.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A right answer from a wrong process is a latent bug.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What to check along the trajectory
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Planning&lt;/b&gt; — did the agent break the task down sensibly, or thrash?&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Tool selection&lt;/b&gt; — did it choose the right tools and call them correctly?&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Error recovery&lt;/b&gt; — when a step failed, did it adapt, or spiral?&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Efficiency&lt;/b&gt; — did it reach the goal in a reasonable number of steps, or loop and wander?&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free Agent Evaluation QuickStart&lt;/strong&gt; — the whole loop (define, measure, test, trust) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentevalfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step-level and end-to-end together
&lt;/h2&gt;

&lt;p&gt;The strongest evaluation combines both levels. End-to-end checks that the whole agent accomplishes real tasks; step-level checks pinpoint where a failing agent goes wrong, so you can fix the specific step rather than guessing. End-to-end tells you that something broke; step-level tells you what. You want both, because each answers a question the other cannot.&lt;/p&gt;

&lt;h2&gt;
  
  
  This is why tracing matters
&lt;/h2&gt;

&lt;p&gt;You can only evaluate a trajectory you can see. Capturing the full record of what the agent did — every plan, tool call, and intermediate result — is the precondition for process evaluation. Without it, a failing agent is a black box and you're left re-running a non-deterministic failure blind. Trajectory evaluation and tracing go together.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Evaluation &amp;amp; Testing: The Complete Guide&lt;/em&gt; is the full reference — 40 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agenteval" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How do you evaluate a multi-step agent?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Evaluate the whole trajectory, not just the final answer: combine outcome evaluation (was the result correct?) with process evaluation (were the planning, tool calls, and recovery sound?). End-to-end checks the whole task; step-level pinpoints where it broke.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the difference between outcome and process evaluation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Outcome evaluation judges whether the final result was correct, independent of how it was reached. Process evaluation judges whether the steps along the way were sound. An agent can reach a right answer through a wrong process — a latent bug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why isn't the final answer enough to evaluate?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because an agent can reach a good answer by luck through a broken process that will fail on the next input. Judging only the outcome rewards luck and hides process failures until they surface as real failures later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What should I check in an agent's trajectory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Planning (did it break the task down sensibly?), tool selection (right tools, correct calls?), error recovery (did it adapt when a step failed?), and efficiency (reasonable number of steps, or looping?).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need tracing to evaluate trajectories?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Effectively yes. Process evaluation requires seeing the full sequence of steps — plans, tool calls, intermediate results. Without tracing, a failing agent is a black box and the trajectory can't be evaluated.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>debugging</category>
    </item>
    <item>
      <title>LLM-as-Judge: How to Use a Model to Evaluate a Model</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 08 Aug 2026 14:57:47 +0000</pubDate>
      <link>https://dev.to/promptmaster/llm-as-judge-how-to-use-a-model-to-evaluate-a-model-13e6</link>
      <guid>https://dev.to/promptmaster/llm-as-judge-how-to-use-a-model-to-evaluate-a-model-13e6</guid>
      <description>&lt;p&gt;&lt;strong&gt;LLM-as-judge uses a capable model to score or compare agent outputs against a rubric&lt;/strong&gt; — filling the gap where quality is open-ended and human judgment doesn't scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Done well it approximates human judgment cheaply; done carelessly it produces confident nonsense.&lt;/strong&gt; The keys: a specific rubric, pairwise over absolute scoring, and validating the judge against human labels.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use a model as a judge
&lt;/h2&gt;

&lt;p&gt;Many of the qualities that matter most — helpfulness, faithfulness, reasoning quality — have no formula, and human judgment does not scale to thousands of cases on every change. Using a capable model as a judge fills that gap: you ask a model to score or compare outputs against a rubric. Done well it approximates human judgment at a fraction of the cost and effort. Done carelessly it produces confident, systematic nonsense — which is why the details below matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a model can judge at all
&lt;/h2&gt;

&lt;p&gt;It can seem circular to use a model to evaluate a model — if the judge could reliably tell good from bad, why not use it as the agent? The resolution is that judging is easier than doing. Recognizing whether an answer is faithful to a source is narrower and more constrained than producing the faithful answer, the way it's easier to check a proof than to find one. The judge is handed the input, the output, and a rubric, and asked only to assess against that rubric.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rubric is everything
&lt;/h2&gt;

&lt;p&gt;The quality of the judgment depends almost entirely on the rubric. A vague instruction to "rate this 1-10" yields noise; a specific rubric that defines each level and what to look for yields something usably consistent. The judge's reliability comes from the structure the rubric provides.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;judgment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;judge_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;original_input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;agent_output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;rubric&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Score faithfulness 1-5.
    5 = every claim supported by the sources.
    3 = mostly supported, minor unsupported detail.
    1 = key claims not supported / contradicted.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free Agent Evaluation QuickStart&lt;/strong&gt; — the whole loop (define, measure, test, trust) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentevalfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Pairwise beats absolute scoring
&lt;/h2&gt;

&lt;p&gt;Models are more reliable at comparing than at scoring in the abstract. Asking "which of these two responses is better?" tends to be far more consistent than "rate this 1-10," because absolute scores drift and cluster while comparisons are anchored. Whenever you can frame evaluation as a comparison — against a reference, or between two versions of the agent — you get more reliable signal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ask which is better, not how good.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The biases to defend against
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Position bias&lt;/b&gt; — judges can favor whichever answer comes first; swap the order and average to cancel it.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Verbosity bias&lt;/b&gt; — judges often prefer longer answers regardless of quality; call it out in the rubric.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Self-preference&lt;/b&gt; — a judge may favor outputs from its own model family; be aware when judge and agent share a model.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Validate the judge&lt;/b&gt; — check it against human labels on a sample. An unvalidated judge is an opinion, not a measurement.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Evaluation &amp;amp; Testing: The Complete Guide&lt;/em&gt; is the full reference — 40 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agenteval" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is LLM-as-judge?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using a capable model to score or compare agent outputs against a rubric, in place of human judgment at scale. It's the workhorse for evaluating open-ended qualities like helpfulness and faithfulness that have no formula.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is LLM-as-judge reliable?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It can be, with care: a specific rubric, pairwise comparison over absolute scoring, and validation against human labels. Without those it produces confident but systematic errors. An unvalidated judge is an opinion, not a measurement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is pairwise scoring better than 1-to-10?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Models are more consistent comparing two outputs than scoring one in isolation. Absolute scores drift and cluster; comparisons are anchored. Framing evaluation as 'which is better, A or B?' yields more reliable signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What biases affect LLM judges?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Position bias (favoring the first answer), verbosity bias (favoring longer answers), and self-preference (favoring the judge's own model family). Counter them by swapping order and averaging, calling out length in the rubric, and validating against humans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I know if my judge is accurate?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Validate it against human labels on a sample of cases. If the judge's scores track human judgment, you can trust it at scale; if not, fix the rubric. An unvalidated judge may be systematically wrong in ways you can't see.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>evaluation</category>
    </item>
    <item>
      <title>How to Build a Test Set for Your AI Agent</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 08 Aug 2026 14:57:05 +0000</pubDate>
      <link>https://dev.to/promptmaster/how-to-build-a-test-set-for-your-ai-agent-428a</link>
      <guid>https://dev.to/promptmaster/how-to-build-a-test-set-for-your-ai-agent-428a</guid>
      <description>&lt;p&gt;&lt;strong&gt;The single most valuable thing you'll build isn't the agent — it's the test set you evaluate it against.&lt;/strong&gt; It's the ground truth every version is measured on, and it survives model swaps, framework changes, and rewrites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with ten real cases,&lt;/strong&gt; each paired with a verdict for what good looks like, and grow the set with every failure you find.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the test set is the asset
&lt;/h2&gt;

&lt;p&gt;An evaluation is only as good as the cases it runs. A test set is a collection of scenarios — inputs paired with some notion of what a good response looks like — that represents the situations your agent must handle. It is the ground truth against which every version of the agent is measured, and it is the one asset that survives model changes, framework changes, and rewrites. Build it well and it pays off on every future decision.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Models change. Frameworks change.&lt;br&gt;
The test set endures.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What a good test set contains
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Representative cases&lt;/b&gt; — the common situations your agent actually faces, so the score reflects real performance.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Edge cases&lt;/b&gt; — the rare, tricky, and adversarial inputs where agents break, because these are what production surfaces.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Known failures&lt;/b&gt; — every bug you've found, captured as a case, so it can never silently return.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;A verdict per case&lt;/b&gt; — an expected answer, a checklist, or a rubric. A case without a verdict can't evaluate anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where test cases come from
&lt;/h2&gt;

&lt;p&gt;The best test cases come from reality. Real user interactions — especially the ones that went wrong — are gold, because they represent situations that actually happen. Every production failure should become a test case. You can supplement with synthetic cases the model or your team generates to cover situations you haven't seen yet, but the core of a strong test set is drawn from real usage, curated over time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free Agent Evaluation QuickStart&lt;/strong&gt; — the whole loop (define, measure, test, trust) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentevalfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A case is an input plus a verdict
&lt;/h2&gt;

&lt;p&gt;Be precise about what a single case is: an input the agent will receive, and a way to decide whether the response was good. That verdict takes different forms — an exact expected answer, conditions the response must satisfy, a rubric a judge applies, or a reference to compare against. The discipline of writing the verdict for every case is what turns a pile of examples into an actual test set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I was charged twice, I want a refund&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;expects&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;task_success&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;acknowledges double charge, checks policy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tool&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;issue_refund only if within policy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;faithfulness&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cites the refund policy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Start small, grow deliberately
&lt;/h2&gt;

&lt;p&gt;A common mistake is waiting to build a huge test set before evaluating anything. Start with ten cases that capture what matters, and grow the set as you learn where the agent fails. Twenty well-chosen scenarios that cover your real risks beat a thousand generic ones. The test set is a living asset that grows with every bug found and every new situation encountered.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Evaluation &amp;amp; Testing: The Complete Guide&lt;/em&gt; is the full reference — 40 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agenteval" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How do I build a test set for an AI agent?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Collect scenarios — inputs paired with a verdict for what good looks like. Include representative cases, edge cases, and every known failure. Pull from real usage, write a verdict for each, and start with about ten rather than waiting for a huge set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many test cases do I need?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start with about ten well-chosen cases that cover what matters, then grow as you find failures. Twenty scenarios covering your real risks beat a thousand generic ones. The set is meant to grow over time, not be complete on day one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where do good test cases come from?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From reality — real user interactions, especially the ones that went wrong. Every production failure should become a case. Synthetic cases can supplement coverage, but the core comes from actual usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes a test case complete?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An input plus a verdict: some way to decide whether the response was good. The verdict can be an exact answer, a checklist of conditions, or a rubric. Without a verdict, a case can exercise the agent but can't evaluate it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is the test set so important?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's the ground truth every version of the agent is measured against, and it outlives models, frameworks, and rewrites. It's the accumulated definition of what good means for your task — the asset that makes every future change safer.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>testing</category>
    </item>
    <item>
      <title>How to Evaluate an AI Agent (When There's No Single Right Answer)</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 08 Aug 2026 14:56:17 +0000</pubDate>
      <link>https://dev.to/promptmaster/how-to-evaluate-an-ai-agent-when-theres-no-single-right-answer-em7</link>
      <guid>https://dev.to/promptmaster/how-to-evaluate-an-ai-agent-when-theres-no-single-right-answer-em7</guid>
      <description>&lt;p&gt;&lt;strong&gt;You can't test an AI agent the way you test normal software.&lt;/strong&gt; Agents are non-deterministic (same input, different outputs), open-ended (no single right answer), and multi-step (they can reach a good answer through a broken process).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The answer is evaluation:&lt;/strong&gt; a repeatable loop — define what good means, build a test set, measure with fitting metrics, and gate every change — that turns "it seemed to work" into "we measured it."&lt;/p&gt;

&lt;h2&gt;
  
  
  Why agents break traditional testing
&lt;/h2&gt;

&lt;p&gt;Traditional software testing assumes a known answer: given this input, assert that output. Agents shatter that assumption on three fronts at once. They are non-deterministic — the same input can produce different outputs, so you cannot assert exact equality. They are open-ended — most real tasks have no single correct answer, only better and worse ones. And they are multi-step — an agent plans, calls tools, and reasons across many turns, any of which can go wrong in ways the final answer hides. The techniques you know for ordinary software simply do not transfer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What evaluation actually is
&lt;/h2&gt;

&lt;p&gt;Evaluation is a repeatable method for asking "does this agent do what we need, across the situations that matter?" and getting an answer you can act on. It replaces the guesswork most teams run on — a working demo, a few manual tries, and a hope — with evidence. Without it, every change to an agent is a guess and every deploy is a hope; with it, every change becomes a measured step.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A demo tests the cases you thought of.&lt;br&gt;
Production is the cases you didn't.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The evaluation loop
&lt;/h2&gt;

&lt;p&gt;Every evaluation is the same loop, and once you see its shape every eval system reads as a variation of it. Define what good means, measure the agent against that definition, test on every change to catch regressions, and — having earned it — trust what you ship while continuing to measure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;DEFINE&lt;/span&gt;    &lt;span class="n"&gt;decide&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;good&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="n"&gt;means&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;
&lt;span class="n"&gt;MEASURE&lt;/span&gt;   &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="n"&gt;against&lt;/span&gt; &lt;span class="n"&gt;that&lt;/span&gt; &lt;span class="n"&gt;definition&lt;/span&gt;
&lt;span class="n"&gt;TEST&lt;/span&gt;      &lt;span class="n"&gt;run&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;every&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;catch&lt;/span&gt; &lt;span class="n"&gt;regressions&lt;/span&gt;
&lt;span class="n"&gt;TRUST&lt;/span&gt;     &lt;span class="n"&gt;ship&lt;/span&gt; &lt;span class="n"&gt;knowing&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="n"&gt;works&lt;/span&gt; &lt;span class="err"&gt;—&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;keep&lt;/span&gt; &lt;span class="n"&gt;measuring&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What to measure
&lt;/h2&gt;

&lt;p&gt;No single number captures whether an agent is good. Choose the few dimensions that matter for your task and accept that they trade off. A strong starting set: task success (did it accomplish what the user wanted?), faithfulness (is the answer grounded, or made up?), safety (does it avoid harmful or out-of-scope actions?), and cost and latency (is it fast and cheap enough to use?). Measuring one axis alone hides the trade you are making.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free Agent Evaluation QuickStart&lt;/strong&gt; — the whole loop (define, measure, test, trust) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentevalfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Evaluate before you optimize
&lt;/h2&gt;

&lt;p&gt;You cannot improve what you cannot measure, and you cannot tell whether an "improvement" helped without a baseline. The first move on any serious agent is to build an evaluation that captures what good looks like. Only then does optimization become meaningful — otherwise you are changing things and trusting your gut, which is exactly the guesswork evaluation exists to eliminate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Start small: pick two or three dimensions, write ten real test cases, score them, and grow from there. A handful of well-chosen scenarios that cover your real risks beats a thousand generic ones. The evaluation is a living asset that grows with every bug found — and it is the thing that lets you improve an agent on purpose instead of by hope.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Evaluation &amp;amp; Testing: The Complete Guide&lt;/em&gt; is the full reference — 40 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agenteval" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How do you evaluate an AI agent?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With a repeatable loop: define what good means (the quality dimensions that matter), build a test set of real scenarios, measure the agent with metrics that fit each dimension, and run the evaluation on every change to catch regressions. It replaces guesswork with evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why can't you test agents like normal software?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because agents are non-deterministic (the same input gives different outputs), open-ended (no single right answer), and multi-step (they can reach a good answer through a broken process). Exact-output assertions, the basis of normal testing, don't apply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What should you measure when evaluating an agent?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The few dimensions that matter for your task: task success, faithfulness (grounding), safety, and cost/latency. No single score captures agent quality, and the dimensions trade off, so measure them separately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the evaluation loop?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Define what good means, measure the agent against it, test on every change to catch regressions, and trust what you ship while continuing to measure. Every evaluation system is a variation of this loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need evaluation before optimizing my agent?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Without a baseline you can't tell whether a change helped or hurt. Building the evaluation first turns optimization from guesswork into measured steps — keep the change if the number improved, revert if not.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How to Estimate Tokens for RAG (and Why Character Counts Mislead)</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Tue, 04 Aug 2026 09:39:37 +0000</pubDate>
      <link>https://dev.to/promptmaster/how-to-estimate-tokens-for-rag-and-why-character-counts-mislead-176d</link>
      <guid>https://dev.to/promptmaster/how-to-estimate-tokens-for-rag-and-why-character-counts-mislead-176d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Models and pricing count tokens, but chunking libraries usually count characters — and the two don't map cleanly.&lt;/strong&gt; The rough rule is ~4 characters per token for English prose, but it varies with content, code, and language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Character counts mislead&lt;/strong&gt; because a 600-character chunk isn't a fixed number of tokens. To budget context and cost accurately, you need the token count, not the character count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why tokens, not characters
&lt;/h2&gt;

&lt;p&gt;Everything that matters downstream is measured in tokens: the context window the model can hold, the embedding cost, the generation cost. But the chunking step usually operates on characters, because that's what's easy to split on. This mismatch is a quiet source of surprises — you set a character size, and the token reality turns out different from what you assumed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rough rule, and where it breaks
&lt;/h2&gt;

&lt;p&gt;For English prose, a token is roughly four characters — so ~600 characters is ~150 tokens, give or take. It's a useful rule of thumb, but it breaks down in exactly the cases you care about. Code tokenizes differently from prose. Numbers, punctuation, and rare words split into more tokens. Other languages diverge from the English ratio entirely. The rule is a starting estimate, not a guarantee.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;~4 characters per token — until it isn't.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why the mismatch costs you
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context budget&lt;/strong&gt; — if you assume 600 characters is fewer tokens than it is, you can overflow the context window you planned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost estimates&lt;/strong&gt; — embedding and generation are priced per token, so a character-based estimate can be off by a wide margin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval tuning&lt;/strong&gt; — 'top-k = 5 chunks' means very different token loads depending on real chunk token sizes.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free RAG Chunk Visualizer&lt;/strong&gt; — see your chunks, token counts, and quality flags in the browser. &lt;a href="https://promptmaster-chunkdemo.netlify.app" rel="noopener noreferrer"&gt;Try it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Estimating tokens without the exact tokenizer
&lt;/h2&gt;

&lt;p&gt;The precise answer comes from the exact tokenizer your model uses. But for planning, a good subword estimate — one that accounts for word length, punctuation, and numbers rather than just dividing characters by four — tracks real tokenizers closely enough to budget confidently. The point is to get away from raw character counts, which are the least accurate signal.&lt;/p&gt;

&lt;h2&gt;
  
  
  See tokens per chunk
&lt;/h2&gt;

&lt;p&gt;The RAG Chunk Visualizer estimates tokens for every chunk and the whole document, using a subword heuristic rather than a crude character divide. You can see immediately whether your chunks land near your token target and how the total maps to embedding and generation cost — the character-to-token guesswork removed.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Go further:&lt;/strong&gt; the Full Edition adds overlap control, cost-model presets, top-k modelling, strategy comparison, JSON export, and vector-DB record preview. &lt;a href="https://promptmasterstore.gumroad.com/l/ragtool" rel="noopener noreferrer"&gt;Get the Full Edition&lt;/a&gt;. Built as a companion to &lt;a href="https://promptmasterstore.gumroad.com/l/rag" rel="noopener noreferrer"&gt;RAG: The Complete Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How many tokens is a RAG chunk?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For English prose, roughly one token per four characters — so a 600-character chunk is about 150 tokens. But it varies: code, numbers, punctuation, and other languages tokenize differently, so character counts are only a rough estimate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why not just count characters?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because models and pricing run on tokens, and characters don't map cleanly to tokens. A character-based estimate can overflow your context budget or throw off cost estimates, especially for code, numbers, or non-English text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I estimate tokens without the model's tokenizer?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use a subword heuristic that accounts for word length, punctuation, and numbers rather than dividing characters by four. It tracks real tokenizers closely enough for budgeting context and cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many characters per token?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;About four characters per token for English prose, as a rule of thumb. It breaks down for code (which tokenizes densely), numbers, punctuation, and other languages, so treat it as a starting estimate, not a fixed rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can I see tokens per chunk?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A chunk visualizer can estimate tokens for each chunk and the whole document using a subword heuristic, showing whether chunks land near your token target and how the total maps to cost — without the character-to-token guesswork.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>llm</category>
      <category>tokens</category>
    </item>
    <item>
      <title>Chunk Overlap in RAG: What It Is and How Much You Need</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Tue, 04 Aug 2026 09:39:00 +0000</pubDate>
      <link>https://dev.to/promptmaster/chunk-overlap-in-rag-what-it-is-and-how-much-you-need-53jp</link>
      <guid>https://dev.to/promptmaster/chunk-overlap-in-rag-what-it-is-and-how-much-you-need-53jp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Chunk overlap repeats the tail of each chunk at the start of the next one&lt;/strong&gt;, so a fact that spans a boundary isn't split in half and lost to retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A little overlap helps; too much wastes tokens and storage.&lt;/strong&gt; A common range is 10–20% of chunk size — but the right amount depends on how your information sits relative to your boundaries.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem overlap solves
&lt;/h2&gt;

&lt;p&gt;When you split a document into chunks, some facts land right on a boundary — the setup in one chunk, the payoff in the next. Retrieve either chunk alone and the fact is incomplete. Overlap fixes this by repeating a slice of the end of each chunk at the beginning of the following one, so boundary-spanning information appears whole in at least one chunk.&lt;/p&gt;

&lt;h2&gt;
  
  
  How overlap works
&lt;/h2&gt;

&lt;p&gt;If your chunk size is 600 characters and your overlap is 60, each chunk shares its last 60 characters with the next chunk's first 60. The chunks still advance through the document, but with a repeated seam between them. That seam is cheap insurance against splitting a key sentence exactly where it mattered.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;chunk_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;
&lt;span class="n"&gt;overlap&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;          &lt;span class="c1"&gt;# ~10% of chunk size
&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chunk_size&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;overlap&lt;/span&gt;   &lt;span class="c1"&gt;# advance 540 chars per chunk
# each chunk shares its last 60 chars with the next chunk's first 60
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How much overlap?
&lt;/h2&gt;

&lt;p&gt;More overlap means fewer facts get split, but also more repeated text — which costs more to embed, more to store, and can surface near-duplicate chunks at retrieval time. A common starting range is 10–20% of chunk size. Below that you risk splitting facts; well above it you're mostly paying to store the same text twice.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Overlap is insurance.&lt;br&gt;
Buy enough to cover the seams, not more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free RAG Chunk Visualizer&lt;/strong&gt; — see your chunks, token counts, and quality flags in the browser. &lt;a href="https://promptmaster-chunkdemo.netlify.app" rel="noopener noreferrer"&gt;Try it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Structure-aware chunking needs less
&lt;/h2&gt;

&lt;p&gt;Overlap matters most with fixed-size chunking, where cuts fall arbitrarily. Structure-aware chunking already splits on natural boundaries, so fewer facts get cut and less overlap is needed. The two knobs interact: the better your boundaries, the less overlap you have to buy.&lt;/p&gt;

&lt;h2&gt;
  
  
  See the overlap and its cost
&lt;/h2&gt;

&lt;p&gt;Overlap is easiest to reason about when you can see it. The RAG Chunk Visualizer marks the overlapping region between chunks and counts the overlap tokens, so you can see exactly how much repeated text a given setting produces — and what it adds to your indexing cost — before you commit. Overlap control is part of the Full Edition.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Go further:&lt;/strong&gt; the Full Edition adds overlap control, cost-model presets, top-k modelling, strategy comparison, JSON export, and vector-DB record preview. &lt;a href="https://promptmasterstore.gumroad.com/l/ragtool" rel="noopener noreferrer"&gt;Get the Full Edition&lt;/a&gt;. Built as a companion to &lt;a href="https://promptmasterstore.gumroad.com/l/rag" rel="noopener noreferrer"&gt;RAG: The Complete Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is chunk overlap in RAG?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Repeating the tail of each chunk at the start of the next one, so a fact that spans a chunk boundary appears whole in at least one chunk instead of being split in half and lost to retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much chunk overlap should I use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A common range is 10–20% of chunk size. Below that, boundary-spanning facts risk getting split; well above it, you're mostly paying to store and embed the same text twice. The right amount depends on your documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does chunk overlap increase cost?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Overlapping text is embedded and stored more than once, so more overlap means higher indexing cost and storage, and it can surface near-duplicate chunks at retrieval time. It's a trade-off against losing boundary-spanning facts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need overlap with structure-aware chunking?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Less than with fixed-size. Structure-aware chunking splits on natural boundaries, so fewer facts get cut and less overlap is needed. The better your boundaries, the less overlap you have to buy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I see how much overlap I'm using?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A chunk visualizer can mark the overlapping region between chunks and count overlap tokens, showing exactly how much repeated text a setting produces and what it adds to indexing cost before you commit.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>rag</category>
      <category>vectordatabase</category>
    </item>
    <item>
      <title>Fixed-Size vs. Structure-Aware Chunking: Which Should You Use?</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Tue, 04 Aug 2026 09:37:53 +0000</pubDate>
      <link>https://dev.to/promptmaster/fixed-size-vs-structure-aware-chunking-which-should-you-use-407k</link>
      <guid>https://dev.to/promptmaster/fixed-size-vs-structure-aware-chunking-which-should-you-use-407k</guid>
      <description>&lt;p&gt;&lt;strong&gt;Fixed-size chunking cuts every N characters — simple, but it slices through sentences, paragraphs, and sections.&lt;/strong&gt; Structure-aware chunking splits on the document's own boundaries (headings, paragraphs), keeping each chunk coherent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure-aware usually wins for documents with real structure;&lt;/strong&gt; fixed-size is fine for unstructured text. The fastest way to decide is to see both on your own documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two strategies
&lt;/h2&gt;

&lt;p&gt;Chunking strategies fall on a spectrum, but two anchor the ends. Fixed-size chunking cuts the text every N characters or tokens, ignoring what's there — simple, predictable, and completely blind to meaning. Structure-aware chunking splits on the document's natural boundaries — headings, paragraphs, sections — so each chunk is a coherent unit. The choice between them shapes how retrievable your chunks are.&lt;/p&gt;

&lt;h2&gt;
  
  
  What fixed-size gets wrong
&lt;/h2&gt;

&lt;p&gt;Fixed-size chunking's weakness is that it cuts wherever the character count runs out — often mid-sentence, sometimes mid-word. A definition gets separated from the term it defines; a list gets split down the middle; the first half of an idea lands in one chunk and the second half in another. Each broken chunk retrieves worse, because neither half is fully meaningful on its own.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fixed-size chunking is blind to meaning.&lt;br&gt;
It cuts where the counter runs out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What structure-aware gets right
&lt;/h2&gt;

&lt;p&gt;Structure-aware chunking respects the document's own organization. A heading stays with its section; a paragraph stays whole; a list stays together. Because documents are usually organized so that related information sits together, splitting on those boundaries tends to produce chunks that are each about one thing — exactly what retrieval wants.&lt;/p&gt;

&lt;h2&gt;
  
  
  When fixed-size is actually fine
&lt;/h2&gt;

&lt;p&gt;Structure-aware isn't always worth it. If your text has no meaningful structure — a wall of uniform prose, transcripts with no sections, scraped text with markup stripped — there are no boundaries to respect, and fixed-size is simpler with no real downside. The strategy should match how structured your documents actually are.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free RAG Chunk Visualizer&lt;/strong&gt; — see your chunks, token counts, and quality flags in the browser. &lt;a href="https://promptmaster-chunkdemo.netlify.app" rel="noopener noreferrer"&gt;Try it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  See both on your own text
&lt;/h2&gt;

&lt;p&gt;The decision is easy once you can see it. The free RAG Chunk Visualizer shows both strategies on your own document, side by side, and even scores how many chunks end on a clean boundary versus mid-sentence. Paste a representative document and the right choice is usually obvious in seconds — no need to argue about it in the abstract.&lt;/p&gt;

&lt;h2&gt;
  
  
  A sensible default
&lt;/h2&gt;

&lt;p&gt;For most real documents — docs, articles, knowledge bases, anything with headings and paragraphs — start with structure-aware chunking and fall back to fixed-size only where structure is genuinely absent. Let the document decide, and verify by looking at the cuts rather than trusting the strategy name.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Go further:&lt;/strong&gt; the Full Edition adds overlap control, cost-model presets, top-k modelling, strategy comparison, JSON export, and vector-DB record preview. &lt;a href="https://promptmasterstore.gumroad.com/l/ragtool" rel="noopener noreferrer"&gt;Get the Full Edition&lt;/a&gt;. Built as a companion to &lt;a href="https://promptmasterstore.gumroad.com/l/rag" rel="noopener noreferrer"&gt;RAG: The Complete Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is fixed-size chunking?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Splitting text every N characters or tokens regardless of content. It's simple and predictable but blind to meaning — it often cuts through sentences, paragraphs, and sections, producing chunks that retrieve worse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is structure-aware chunking?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Splitting on a document's natural boundaries — headings, paragraphs, sections — so each chunk is a coherent unit. It keeps definitions with their terms and paragraphs whole, which tends to improve retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which chunking strategy is better?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Structure-aware usually wins for documents with real structure (docs, articles, knowledge bases). Fixed-size is fine for unstructured text with no boundaries to respect. Match the strategy to how structured your documents actually are.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>llm</category>
      <category>nlp</category>
    </item>
    <item>
      <title>How to Choose the Right Chunk Size for RAG (Without Guessing)</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Tue, 04 Aug 2026 09:37:07 +0000</pubDate>
      <link>https://dev.to/promptmaster/how-to-choose-the-right-chunk-size-for-rag-without-guessing-1873</link>
      <guid>https://dev.to/promptmaster/how-to-choose-the-right-chunk-size-for-rag-without-guessing-1873</guid>
      <description>&lt;p&gt;&lt;strong&gt;Chunk size is the single decision that caps RAG quality, and most people guess at it.&lt;/strong&gt; Too small and each chunk loses the context that makes it meaningful; too large and retrieval gets imprecise and expensive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There's no universal number&lt;/strong&gt; — it depends on your documents and your model. But you don't have to guess: you can see exactly how a given size splits your text, counts tokens, and affects cost before you commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chunk size decides everything downstream
&lt;/h2&gt;

&lt;p&gt;In a RAG pipeline, you split documents into chunks, embed them, and retrieve the most relevant ones at query time. Every later step inherits the chunking decision. Get it wrong and no amount of reranking or prompt-tuning fully recovers: if the right information was split across two chunks, or buried in one that's too large to retrieve precisely, the model never sees it cleanly. Chunk size is upstream of everything, which is why it deserves more thought than a copied default.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trade-off, in both directions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Too small&lt;/strong&gt; — each chunk loses the surrounding context that made it meaningful. A sentence retrieved without its paragraph can be ambiguous or misleading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too large&lt;/strong&gt; — retrieval gets imprecise (one chunk covers many topics, so similarity is diluted) and expensive (you send more tokens into generation than you need).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The sweet spot&lt;/strong&gt; — large enough to be self-contained, small enough to be about one thing. Where that lands depends on your content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  There's no universal number
&lt;/h2&gt;

&lt;p&gt;Dense technical documentation chunks differently from chatty support transcripts; a legal contract differs from a product FAQ. The right size depends on how information is distributed in your specific documents and on the model you'll retrieve for. Anyone who gives you a single magic number hasn't seen your data. The reliable approach is to try a size, look at what it actually produces, and adjust.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The right chunk size is the one that fits your documents.&lt;br&gt;
Not the one in a tutorial.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  See it before you build it
&lt;/h2&gt;

&lt;p&gt;The fastest way to reason about chunk size is to watch it happen. Paste a representative document, pick a size, and see exactly where the cuts land, how many chunks you get, and how many tokens each holds. That's precisely what the free RAG Chunk Visualizer does — the guesswork becomes a thing you can look at and adjust in seconds, instead of a number you hope is right.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free RAG Chunk Visualizer&lt;/strong&gt; — see your chunks, token counts, and quality flags in the browser. &lt;a href="https://promptmaster-chunkdemo.netlify.app" rel="noopener noreferrer"&gt;Try it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What to watch for once you can see it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chunks that cut mid-sentence&lt;/strong&gt; — a sign the size or strategy is fighting your document's structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wildly uneven chunk sizes&lt;/strong&gt; — some tiny, some huge — usually means fixed-size splitting on structured content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token counts far from your target&lt;/strong&gt; — the character size you picked may not map to the token budget you assumed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From guessing to tuning
&lt;/h2&gt;

&lt;p&gt;Once you can see chunks and their token counts, choosing a size stops being a guess and becomes a quick loop: try, look, adjust. Start around a few hundred tokens for prose, watch where the cuts fall, and nudge from there based on what your documents actually do — not on a number you copied.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Go further:&lt;/strong&gt; the Full Edition adds overlap control, cost-model presets, top-k modelling, strategy comparison, JSON export, and vector-DB record preview. &lt;a href="https://promptmasterstore.gumroad.com/l/ragtool" rel="noopener noreferrer"&gt;Get the Full Edition&lt;/a&gt;. Built as a companion to &lt;a href="https://promptmasterstore.gumroad.com/l/rag" rel="noopener noreferrer"&gt;RAG: The Complete Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the best chunk size for RAG?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There's no universal number — it depends on your documents and model. Dense technical text chunks differently from conversational transcripts. A common starting point is a few hundred tokens for prose, then adjust based on how your specific documents split. Seeing the result before committing beats guessing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if chunks are too small?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each chunk loses the surrounding context that made it meaningful. A sentence retrieved without its paragraph can be ambiguous or misleading, and the model never sees the full picture cleanly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if chunks are too large?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieval gets imprecise — one chunk covers many topics, so similarity scores are diluted — and generation gets more expensive, since you send more tokens than needed into the prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I know if my chunk size is right?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Look at what it produces: whether chunks stay self-contained, whether they cut mid-sentence, and whether token counts match your target. A chunk visualizer lets you see all three before you build the pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should chunk size be measured in characters or tokens?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tokens are what models and pricing actually use, but chunking libraries often operate on characters. The two don't map cleanly (~4 characters per token for English prose, but it varies), so it helps to see the token count for a given character size.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Writing Agent Memories: What to Store and What to Skip</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 01 Aug 2026 14:53:41 +0000</pubDate>
      <link>https://dev.to/promptmaster/writing-agent-memories-what-to-store-and-what-to-skip-515d</link>
      <guid>https://dev.to/promptmaster/writing-agent-memories-what-to-store-and-what-to-skip-515d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Not everything an agent sees is worth remembering.&lt;/strong&gt; Store too little and it forgets what mattered; store everything and the memory fills with noise that drowns the signal at retrieval time.&lt;/p&gt;

&lt;p&gt;The extraction step — deciding what to keep and distilling it into clean, self-contained facts — is the most consequential and most overlooked part of a memory system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory begins with a decision
&lt;/h2&gt;

&lt;p&gt;Of everything that just happened, what's worth keeping? This is the first and most important question a memory system answers, and it's easy to get wrong in both directions. Store too little and the agent forgets the thing that mattered. Store everything and the memory fills with noise, because every irrelevant memory is a candidate to surface at the wrong moment and drown the useful one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What deserves to be remembered
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stable facts about the user&lt;/strong&gt; — preferences, context, recurring needs that will matter in future sessions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decisions and outcomes&lt;/strong&gt; — what was chosen, what worked, what failed, so the agent doesn't relitigate settled ground.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corrections&lt;/strong&gt; — when a human fixes the agent, that correction is high-value memory: it must stick.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Durable state&lt;/strong&gt; — the status of ongoing work, entities the agent tracks, anything with a life beyond one turn.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to leave out
&lt;/h2&gt;

&lt;p&gt;Transient chatter, one-off details with no future relevance, and anything that will be stale by next session are noise. The discipline of not storing them is as important as the discipline of storing what matters — a memory full of irrelevant fragments retrieves worse than a lean one.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Good memory is curated, not recorded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Agent Memory Quick-Start&lt;/strong&gt; — the four kinds of memory and the whole loop (store, retrieve, reflect, forget) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemoryfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Turn experience into clean facts
&lt;/h2&gt;

&lt;p&gt;Raw conversation is messy; stored memories should be clean. Extraction usually distills an interaction into concise, self-contained statements — "user prefers X," "project deadline is Y" — rather than dumping the transcript. A common pattern is to use the model itself to summarize what's worth remembering, producing tidy semantic facts from noisy episodic experience.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;memories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversation&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# -&amp;gt; [{'content': 'prefers email over phone',
#      'subject': 'user_1837', 'type': 'semantic'},
#     {'content': 'had billing issue, resolved by refund',
#      'subject': 'user_1837', 'type': 'episodic'}]
&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memories&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Self-contained is the key property: a memory that only makes sense with its original context will confuse retrieval later.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to extract
&lt;/h2&gt;

&lt;p&gt;There's also a question of timing. The common choices are at the end of a session, when the whole interaction can be distilled at once, or incrementally as significant things happen, so nothing is lost if a session is abandoned. End-of-session is simpler and cheaper but risks losing an interaction that never cleanly ends; incremental captures more reliably at the cost of running more often. Many systems do both.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Memory: The Complete Guide&lt;/em&gt; is the full reference — 41 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemory" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What should an AI agent store in memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stable facts about the user (preferences, context), decisions and outcomes, corrections from humans, and durable state about ongoing work. The test is whether it will matter in a future session.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What should an agent NOT store?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Transient chatter, one-off details with no future relevance, and anything stale by next session. Not storing noise is as important as storing signal — irrelevant memories surface at the wrong time and degrade retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does memory extraction work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It distills a messy interaction into concise, self-contained facts — 'user prefers X' — rather than storing the raw transcript. A common approach uses the model itself to summarize what's worth remembering into clean semantic facts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should extraction run?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the end of a session (simpler, cheaper) or incrementally as important things happen (more reliable, more frequent). Many systems do both — capturing clearly important facts immediately and distilling the rest at the end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is storing less sometimes better?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because every stored memory is a candidate to surface at retrieval time. A store full of irrelevant fragments retrieves worse than a lean one, burying the memory that mattered under ones that didn't.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>memory</category>
    </item>
    <item>
      <title>Memory vs. Context Window vs. RAG: What's the Difference?</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 01 Aug 2026 14:52:59 +0000</pubDate>
      <link>https://dev.to/promptmaster/memory-vs-context-window-vs-rag-whats-the-difference-4o0l</link>
      <guid>https://dev.to/promptmaster/memory-vs-context-window-vs-rag-whats-the-difference-4o0l</guid>
      <description>&lt;p&gt;&lt;strong&gt;The context window is where the model works right now&lt;/strong&gt; — fast, immediate, temporary, and bounded. It's the agent's working memory, nothing more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RAG is how relevant information gets fetched&lt;/strong&gt; into that window — a retrieval technique.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory is the persistent state&lt;/strong&gt; that outlives the session. Memory uses RAG to retrieve, and always lands in the context window — but it's the same as neither.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three words, constantly confused
&lt;/h2&gt;

&lt;p&gt;Memory, context, and RAG get used almost interchangeably, and that imprecision causes real architectural mistakes. They're related but distinct: the context window is where information lives while the model works, RAG is a technique for fetching relevant information, and memory is the persistent state that outlives any single request. Memory often uses RAG to do its job, and always ends up in the context window — but it isn't the same as either.&lt;/p&gt;

&lt;h2&gt;
  
  
  The context window is working memory, not memory
&lt;/h2&gt;

&lt;p&gt;The context window holds what the model can see right now. It's fast and immediate but temporary and bounded — it's the agent's working memory, and nothing more. Anything not in it is invisible to the model, and everything in it vanishes when the session ends. Persistent memory exists precisely because the context window can't be the place knowledge lives long-term.&lt;/p&gt;

&lt;h2&gt;
  
  
  RAG is how memory gets retrieved
&lt;/h2&gt;

&lt;p&gt;Retrieving relevant memories for the current moment is, mechanically, a retrieval problem. You embed memories, store them, and at query time find the ones most relevant to what's happening now — exactly the RAG pipeline. Memory retrieval is RAG applied to the agent's own past rather than to a document corpus.&lt;/p&gt;

&lt;p&gt;The difference is what sits in the store. Classic RAG retrieves from a fixed body of documents. Memory retrieves from an evolving record of the agent's own experience — a store that grows, changes, and must be curated as the agent lives. Same retrieval mechanism, different and more dynamic source.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;RAG retrieves from a fixed corpus.&lt;br&gt;
Memory retrieves from a living past.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Agent Memory Quick-Start&lt;/strong&gt; — the four kinds of memory and the whole loop (store, retrieve, reflect, forget) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemoryfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Memory is the persistent state
&lt;/h2&gt;

&lt;p&gt;Memory is the whole discipline: deciding what to store, how to store it, when to retrieve it, how to keep it accurate as it grows, and when to forget. RAG is one component of that — the reading step. The context window is where the result lands. Memory is the system that spans all of it and persists between sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick test to keep them straight
&lt;/h2&gt;

&lt;p&gt;When you're unsure which of the three you're dealing with, ask where the information lives and how long it survives. If it exists only for this request and vanishes after, it's the context window. If it's a technique for fetching relevant information into that window, it's retrieval. If it persists across sessions and represents accumulated state, it's memory. The test tells you which layer owns the problem you're debugging.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Memory: The Complete Guide&lt;/em&gt; is the full reference — 41 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemory" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What's the difference between memory and the context window?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The context window is temporary working memory — what the model sees right now, wiped when the session ends. Memory is persistent state that outlives sessions. Memory feeds the context window, but isn't the same as it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is agent memory just RAG?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Memory uses RAG for retrieval — the reading step — but also covers writing (deciding what to store), consolidation, and forgetting, which RAG doesn't. And memory retrieves from the agent's evolving past, not a fixed document corpus.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do memory, context, and RAG work together?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Memory is the persistent store. RAG is how relevant memories are retrieved from it. The context window is where those retrieved memories land so the model can use them. Memory uses RAG to fill the context window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why not just make the context window bigger?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Bigger windows help but don't replace memory: cost grows with everything you resend each turn, models attend poorly to huge contexts, and the window still vanishes at session end. Memory is persistent and selective by design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which one should I reach for?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ask where the information lives and how long it survives. Vanishes after this request → context window. A technique to fetch relevant info → RAG. Persists across sessions as accumulated state → memory.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>rag</category>
      <category>llm</category>
    </item>
    <item>
      <title>The Four Types of AI Agent Memory, Explained</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 01 Aug 2026 14:49:34 +0000</pubDate>
      <link>https://dev.to/promptmaster/the-four-types-of-ai-agent-memory-explained-1bdh</link>
      <guid>https://dev.to/promptmaster/the-four-types-of-ai-agent-memory-explained-1bdh</guid>
      <description>&lt;p&gt;&lt;strong&gt;Agents need four distinct kinds of memory:&lt;/strong&gt; working (what it's doing now), episodic (what happened), semantic (what it knows), and procedural (how it does things).&lt;/p&gt;

&lt;p&gt;They map onto human cognition because the same constraints produce the same solutions. Confusing them is the single most common memory design mistake — almost every design question is really "which of these four am I talking about?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Why one word isn't enough
&lt;/h2&gt;

&lt;p&gt;"Give the agent memory" sounds like one feature. It's four. Working, episodic, semantic, and procedural memory each have a different job, a different lifetime, and a different place to live. Treating them as one undifferentiated thing is why so many memory systems end up muddled — storing the wrong things, retrieving badly, and growing into noise.&lt;/p&gt;

&lt;p&gt;The vocabulary comes straight from cognitive science, and that's not decoration. A mind that had to hold every experience in immediate awareness would be paralyzed, so human cognition evolved separate systems. An agent faces the same pressure, and arrives at the same answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working memory
&lt;/h2&gt;

&lt;p&gt;Working memory is what the agent is holding right now — the current task, the last few turns, intermediate results. It maps directly onto the context window: fast, immediate, and small, wiped when the task ends. This is the memory an agent already has by default. Everything else is the memory it doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Episodic memory
&lt;/h2&gt;

&lt;p&gt;Episodic memory is the record of specific past events — what happened, when, in which session. "The user reported this bug last Tuesday." "We tried this approach and it failed." It's memory of experiences, tied to time and context, and it's what lets an agent refer back to particular past interactions rather than starting fresh each time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Semantic memory
&lt;/h2&gt;

&lt;p&gt;Semantic memory is general knowledge distilled from experience, stripped of when or where it was learned. "This user prefers concise answers." "The refund window is thirty days." Where episodic memory remembers the event, semantic memory remembers the fact the event taught. Much of building memory is turning episodes into durable semantic facts.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Episodic remembers the event.&lt;br&gt;
Semantic remembers what it taught.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Agent Memory Quick-Start&lt;/strong&gt; — the four kinds of memory and the whole loop (store, retrieve, reflect, forget) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemoryfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Procedural memory
&lt;/h2&gt;

&lt;p&gt;Procedural memory is how to do things — the skills, routines, and patterns an agent follows. In practice this often lives in the agent's instructions, tools, and learned workflows rather than a fact store. It's the least discussed of the four and the one most often baked into the system rather than stored dynamically.&lt;/p&gt;

&lt;h2&gt;
  
  
  The distinction that saves you
&lt;/h2&gt;

&lt;p&gt;Almost every memory design question resolves to "which of these four am I talking about?" Storing a user preference? Semantic. Recording what happened in a session? Episodic. Managing the current conversation? Working. Teaching a repeatable skill? Procedural. Naming the kind tells you where it lives, how long it should last, and how to retrieve it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Memory: The Complete Guide&lt;/em&gt; is the full reference — 41 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemory" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What are the four types of AI agent memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Working (the current task, held in the context window), episodic (specific past events tied to time), semantic (general facts distilled from experience), and procedural (how to do things — skills and workflows).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the difference between episodic and semantic memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Episodic memory records specific events — what happened, when. Semantic memory records the general fact an event taught, stripped of when it was learned. Ten episodic sessions of a user asking for brevity become one semantic fact: 'prefers concise answers.'&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the context window the same as working memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Effectively yes. Working memory is what the agent holds right now — the current task and recent turns — which lives in the context window. It's fast and immediate but small and wiped when the task ends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where does procedural memory live?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Usually in the agent's instructions, tools, and learned workflows rather than a separate fact store. It's the 'how to do things' memory, and it's most often baked into the system rather than stored and retrieved dynamically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does the type of memory matter?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because each kind has a different lifetime, retrieval pattern, and storage need. Naming the kind tells you where a memory should live and how to handle it — and confusing them is the most common memory design mistake.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>beginners</category>
    </item>
    <item>
      <title>AI Agent Memory: Why Your Agent Forgets, and How to Fix It</title>
      <dc:creator>PromptMaster</dc:creator>
      <pubDate>Sat, 01 Aug 2026 14:43:23 +0000</pubDate>
      <link>https://dev.to/promptmaster/ai-agent-memory-why-your-agent-forgets-and-how-to-fix-it-113k</link>
      <guid>https://dev.to/promptmaster/ai-agent-memory-why-your-agent-forgets-and-how-to-fix-it-113k</guid>
      <description>&lt;p&gt;&lt;strong&gt;A language model is stateless — it forgets everything the moment a conversation ends.&lt;/strong&gt; For an agent meant to work over time, for the same people, that's disqualifying.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent memory is the layer that fixes it:&lt;/strong&gt; a persistent store, separate from the model, that captures what happened, keeps it past the context window, and surfaces the relevant pieces back when they're needed.&lt;/p&gt;

&lt;p&gt;It's built from four kinds of memory and one repeating loop — and once you see the shape, every memory system reads as a variation of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why statelessness is the whole problem
&lt;/h2&gt;

&lt;p&gt;A language model is trained once and then frozen. Each request is answered in isolation, with no record of what came before beyond what happens to sit in the current context window. Close the session and reopen it, and the model has no idea it ever spoke to you. For a one-shot question that's fine. For an agent — something meant to work on related tasks over time, for the same people, in the same domain — it's disqualifying.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No continuity&lt;/strong&gt; — every session starts from zero; the agent re-asks what it was already told.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No learning&lt;/strong&gt; — corrections don't stick; next session, the same mistake.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No personalization&lt;/strong&gt; — the agent can't adapt to anyone, because it retains nothing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What memory actually is
&lt;/h2&gt;

&lt;p&gt;Memory is a persistent store, separate from the model, that captures what happened, holds it beyond the life of a single context window, and surfaces the relevant pieces back into context when they're needed again. The model stays stateless; the system around it remembers.&lt;/p&gt;

&lt;p&gt;The tempting shortcut — paste the entire history into every prompt — fails on three fronts at once: the context window has a limit you'll hit, cost grows with every turn as you resend everything, and models attend poorly to information buried in a huge context. Memory is a dedicated component precisely so the agent holds only the relevant few facts in context, not its entire past.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A model is stateless.&lt;br&gt;
Memory is the state.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The four kinds of memory
&lt;/h2&gt;

&lt;p&gt;"Memory" isn't one thing. Agents need several distinct kinds, and confusing them is the root of most memory design mistakes. The field borrows its vocabulary from human cognition, because the same constraints produce the same solutions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Working memory&lt;/strong&gt; — what the agent holds right now: the current task and recent turns. This is the context window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episodic memory&lt;/strong&gt; — specific past events, tied to time: "the user reported this last Tuesday."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic memory&lt;/strong&gt; — general facts distilled from experience: "this user prefers concise answers."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Procedural memory&lt;/strong&gt; — how to do things: skills and workflows, often held in instructions and tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The memory loop
&lt;/h2&gt;

&lt;p&gt;Every memory system is the same loop running around the stateless model: an interaction happens, something is extracted from it, the result is stored, later it's retrieved, the agent uses it, and periodically the store is consolidated and pruned.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# writing (after an interaction)
&lt;/span&gt;&lt;span class="n"&gt;memories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversation&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memories&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# with subject, type, time, source
&lt;/span&gt;
&lt;span class="c1"&gt;# reading (at the start of the next one)
&lt;/span&gt;&lt;span class="n"&gt;relevant&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;retrieve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;top_k&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;relevant&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Free Agent Memory Quick-Start&lt;/strong&gt; — the four kinds of memory and the whole loop (store, retrieve, reflect, forget) on a few pages. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemoryfree" rel="noopener noreferrer"&gt;Download it free&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Memory retrieval is RAG, plus time
&lt;/h2&gt;

&lt;p&gt;Retrieving the right memory for the current moment is, mechanically, a retrieval problem — the same pipeline as RAG. Embed the current situation, find the closest memories, optionally rerank. What memory adds is time: recency and importance matter, so yesterday's correction should outrank a year-old passing remark. If you know retrieval, you already hold the reading half of memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where memory sits in the stack
&lt;/h2&gt;

&lt;p&gt;Memory is one layer of modern AI engineering. It's a key source for context engineering (what enters the window). Its reading half is RAG (retrieval pointed at the agent's own past). And it's what turns an agent from a stateless responder into one that learns. Master the loop and you hold the piece that makes agents feel like they know you.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Going deeper?&lt;/strong&gt; &lt;em&gt;AI Agent Memory: The Complete Guide&lt;/em&gt; is the full reference — 41 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. &lt;a href="https://promptmasterstore.gumroad.com/l/agentmemory" rel="noopener noreferrer"&gt;Get the guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is AI agent memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A persistent store, separate from the language model, that captures what happened in past interactions and surfaces the relevant pieces back into context when needed. It's what lets an agent remember across sessions, since the model itself is stateless.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do AI agents forget?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because language models are stateless — each request is answered in isolation, with no memory of previous ones beyond what's in the current context window. Close the session and the model retains nothing. Memory is the external layer that fixes this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the types of agent memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Four: working (the current task, in the context window), episodic (specific past events), semantic (general facts distilled from experience), and procedural (how to do things). Confusing them is the root of most memory design mistakes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is agent memory the same as RAG?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Memory uses RAG. Retrieving the right memory is a retrieval problem — the same pipeline. But memory also covers writing, consolidation, and forgetting, which RAG doesn't. RAG is the reading half of memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can't I just put everything in the prompt?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not for long. The context window has a limit, cost grows as you resend everything each turn, and models attend poorly to huge contexts. Memory exists so the agent holds only the relevant few facts in context.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
