<?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 Zenefa Rahaman, PhD on Medium]]></title>
        <description><![CDATA[Stories by Zenefa Rahaman, PhD on Medium]]></description>
        <link>https://medium.com/@zenefarahaman?source=rss-d563b4a7aed0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dUoyB0Qk-NexbOYq37vb8g.jpeg</url>
            <title>Stories by Zenefa Rahaman, PhD on Medium</title>
            <link>https://medium.com/@zenefarahaman?source=rss-d563b4a7aed0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 12:49:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zenefarahaman/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[Your Agent Didn’t Hallucinate. Your Architecture Laundered a 0.51.]]></title>
            <link>https://pub.towardsai.net/your-agent-didnt-hallucinate-your-architecture-laundered-a-0-51-8029717c72f0?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8029717c72f0</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 17:50:03 GMT</pubDate>
            <atom:updated>2026-08-18T02:11:41.112Z</atom:updated>
            <content:encoded><![CDATA[<h4>A five-point gap in a classifier became a refund decision. Nothing in between failed.</h4><p>Probabilistic systems are useful precisely because they are not fully deterministic. A language model can interpret an underspecified request, generate several plausible plans, and adapt to context its developers never anticipated — because it is not executing a fixed program, but selecting among continuations based on a learned distribution.</p><p>That flexibility is not a defect. It is the source of the abstraction. Yet when these systems behave unreliably in production, our first response is to reduce uncertainty at the source. We lower the temperature, constrain the schema, add examples, swap in a larger model, and hope a more accurate first decision will stabilize everything that follows.</p><p>These interventions can improve individual outputs. They do not make the surrounding system reliable.</p><p>Temperature zero does not help either. It may make token selection repeatable, but it does not make the interpretation correct — the system can choose the wrong intent with perfect consistency. A repeatable mistake is not a reliable decision.</p><p>The deeper problem is not that uncertainty exists. It is that uncertainty propagates. A slightly ambiguous classification changes what is retrieved. The retrieved material changes the prompt. The prompt changes which tool is selected. The tool result changes what is stored in memory. That memory changes the next execution.</p><p>By the time the system produces a visibly wrong outcome, the original uncertainty may be several steps behind it. Nothing downstream appears probabilistic anymore; each component simply processes the input it received. The uncertainty has been converted into documents, parameters, and durable records. It has been laundered into apparent fact.</p><p>This changes the reliability question. We should not ask only, “How confident is the model?” We should ask, “How far is this uncertainty allowed to travel before something checks it?”</p><blockquote><strong>Reliability is not the absence of non-determinism. It is the containment of non-determinism.</strong></blockquote><p>The design goal cannot be universal suppression — that would remove the capability we are paying for. It must be selective containment. Allow uncertainty where it creates value: interpreting ambiguous instructions, generating candidate plans, ranking alternatives. Prevent it from silently entering areas where it causes disproportionate damage:</p><ul><li>committing transactions;</li><li>modifying durable state;</li><li>selecting irreversible actions;</li><li>updating long-term memory;</li><li>authorizing external side effects;</li><li>establishing facts on which later decisions will depend.</li></ul><p>This is not primarily a statistical problem. It is a topological one. A statistical framing asks how we can make the dice more predictable. A topological framing asks which parts of the system the dice are allowed to reach.</p><p>That distinction matters because even an excellent model will remain uncertain at the margins. If our architecture assumes better modeling will eventually eliminate ambiguous requests, incomplete context, and conflicting evidence, reliability will remain perpetually one model release away.</p><h3>The Propagation Cascade</h3><p>In a multi-step system, one model decision becomes the next component’s input. That component transforms it, acts on it, or stores it — and each transformation creates another dependency on the original decision.</p><p>The compounding is not merely additive. Each early variation changes the entire set of choices available downstream. Once the execution path branches, later components are no longer operating over the same problem.</p><p>Consider a support agent responsible for investigating a customer’s account issue. The user writes: “I was charged again after I changed my plan.”</p><p>The request could refer to a duplicate charge, a delayed charge from the previous plan, a prorated adjustment, an unsuccessful cancellation, or a renewal that occurred before the plan change took effect.</p><h4>Step 1: Intent classification</h4><p>The system first classifies the request. Suppose the model assigns 0.51 probability to duplicate_charge, 0.46 to plan_change_billing, and 0.03 to other categories.</p><p>This is not a contrived case. A well-calibrated classifier produces narrow margins precisely when the request is genuinely underspecified — which, in customer support, is most of the time. The 0.51/0.46 split is not the model performing badly; it is the model correctly reporting that the message supports two readings. The system nevertheless selects duplicate_charge.</p><p>At this point the uncertainty is small and local. No record has changed; no refund has been issued. The architecture could still contain the ambiguity here. Instead, the label is passed downstream as if it were a fact.</p><h4>Step 2: Retrieval</h4><p>The retrieval layer uses duplicate_charge to select policies, prior cases, troubleshooting instructions, and tool documentation. It retrieves duplicate-transaction detection procedures, refund eligibility rules, payment-processor reconciliation guidance, and examples involving two identical charges. It does not retrieve plan-transition billing rules, effective-date calculations, prorated invoice explanations, or renewal cut-off policies.</p><p>Retrieval has now amplified the initial decision. The system has assembled an evidence environment in which one interpretation is strongly represented, and the other is nearly absent. The retrieved documents appear authoritative; the system does not see them as consequences of a weak classification, but as the relevant context. A 0.05 difference in confidence has changed the factual universe available to the next step.</p><h4>Step 3: Prompt construction</h4><p>The system then assembles a prompt containing the selected intent, retrieved policies, account metadata, and task instructions. The prompt may now state: “The customer is reporting a duplicate charge. Determine whether the two transactions qualify for a refund.”</p><p>That sentence has removed the ambiguity entirely. The classifier produced a narrow preference between two interpretations. The prompt builder converted that preference into a declarative premise. The distinction between “the model slightly preferred this interpretation” and “this is what happened” has disappeared.</p><p>That is the laundering step. Probabilistic evidence has become deterministic-looking context. The next model is not being asked to reconsider the original request. It is being asked to reason correctly from an incorrect premise — and it may perform that task extremely well.</p><h4>Step 4: Tool selection</h4><p>Given the prompt, the system selects a transaction-comparison tool rather than a plan-history tool. It compares two charges and sees that they have similar amounts but different billing-period identifiers. Because the duplicate-charge workflow expects payment anomalies, it interprets the difference as a processor or settlement issue.</p><p>It never inspects the plan-change effective date, because that lies outside the selected workflow. The tool layer has not malfunctioned — it received a duplicate-charge investigation and executed the appropriate operation. The uncertainty now governs not only the system’s interpretation, but which external data it examined.</p><h4>Step 5: Memory and state</h4><p>The system writes the following summary into durable case memory: “Customer experienced a probable duplicate charge after changing plans. Transaction comparison indicates a billing duplication requiring refund review.”</p><p>A human reviewer now sees the case pre-labeled as a probable duplicate. The next model treats the summary as established history. Analytics count it as a duplicate-billing incident. Future messages are interpreted through the stored diagnosis. At step one, the system faced two interpretations separated by five percentage points; at step five it holds a durable record stating that one of them probably occurred.</p><p>Nothing in the middle had to fail. The retriever retrieved the correct documents for the chosen label. The prompt builder accurately represented the retrieved workflow. The model reasoned coherently over the prompt. The tool performed the requested comparison. The memory service stored the supplied summary. Each component did what it was told; the failure exists in the chain of dependency connecting them.</p><p>This is unbounded probabilistic propagation: uncertainty enters at one point, crosses multiple boundaries, and is repeatedly transformed without being resolved. It also obscures causality. When the customer disputes the refund explanation, the visible failure appears to be in the final response, so engineers inspect the generation prompt or blame the model for hallucinating. But the decisive branch occurred four steps earlier, when a marginal classification was allowed to determine retrieval.</p><blockquote><strong>The final response is where the error became visible, not where the system became unreliable.</strong></blockquote><p>The same shape appears in a coding agent, where an uncertain interpretation changes the files retrieved and the patch proposed, and in a research agent, where an uncertain decomposition changes the search terms and the citations. In each case the system does not merely carry uncertainty forward; it converts uncertainty into conditions that make the chosen path self-confirming. Most apparent agent failures are propagation failures: one early uncertainty that no layer was positioned to contain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*y4u4R_osv9uZfoJfrfaBFg.png" /><figcaption>Figure 1. The propagation cascade: a small uncertainty widens as it crosses retrieval, prompt construction, tool selection, memory, and state.</figcaption></figure><h3>Bounded Non-Determinism as a Design Principle</h3><p>If propagation is the problem, reliability requires bounding the blast radius. Bounded non-determinism does not require every model output to be certain. It requires every uncertain output to have a limited sphere of influence. The system should know where uncertainty entered, which downstream decisions depend on it, and where it must be resolved before execution continues.</p><h4>1. Resolve uncertainty at the layer where it enters</h4><p>A low-confidence classification should be handled as a classification problem. It should not be passed downstream as an ordinary label and left for retrieval, planning, or tool execution to discover indirectly.</p><p>The layer might request clarification, preserve multiple candidate intents, retrieve evidence for both readings, route to a safer generic workflow, or abstain from consequential action. The mechanism matters less than the timing: uncertainty is cheapest to resolve before other components depend on it. Once a tentative classification has shaped retrieval, prompts, tools, and memory, correcting it means unwinding a chain of derived decisions — invalidating results, rewriting state, retracting claims. Containment gets more expensive with every boundary crossed.</p><h4>2. Collapse uncertainty at boundary crossings</h4><p>Between stages, probabilistic output should become either a committed decision or an explicit unknown state. What should not cross the boundary is an ambiguous middle presented as certainty.</p><p>A classifier could emit duplicate_charge committed after validation, plan_change_billing committed after validation, ambiguous_billing_intent unresolved, or a structured set of candidates with confidence and provenance. It should not select duplicate_charge by a narrow margin and send only that label downstream, stripped of the uncertainty that produced it.</p><p>Boundary crossings should preserve epistemic status. A downstream component must be able to distinguish an observed fact, a verified decision, a model inference, and an unresolved ambiguity. Without that distinction, each component reads the previous one’s output as more certain than it was — which is how uncertainty disappears from representation while continuing to drive behavior. Note that collapsing uncertainty does not mean forcing certainty: unknown and requiring confirmation are valid committed states, often more reliable than choosing an answer because the interface demands one.</p><h4>3. Bound and observe propagation depth</h4><p>We should be able to answer a basic architectural question: how many downstream decisions depend on this uncertain input? For most systems the answer is unknown. An intent label may influence retrieval, ranking, planning, tool use, memory, and future personalization with no explicit dependency graph connecting those effects. That makes blast radius invisible.</p><p>A bounded design assigns a maximum propagation depth or consequence level to uncertain decisions. A low-confidence inference might affect candidate generation but not external actions. A speculative plan might influence a preview but not durable state. An unverified summary might remain session-local rather than entering long-term memory.</p><p>Propagation should also be observable after the fact: engineers should be able to trace where the originating uncertainty entered, which boundaries it crossed, and which decisions inherited it. This is not ordinary model logging. Token probabilities do not reveal architectural blast radius. We need lineage across decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*ztCOxfwmZ2FZz48SjGRYKg.png" /><figcaption>Figure 2. The same starting uncertainty produces different outcomes depending on whether each boundary resolves it or allows it to propagate.</figcaption></figure><h3>Why More Capable Models Can Make the Problem Worse</h3><p>The obvious counterargument is that propagation will matter less as models improve — that a sufficiently capable model will classify correctly, retrieve correctly, and avoid the cascade. Better models do improve per-step accuracy. But per-step accuracy and propagation are different properties: a more capable model reduces the probability of an error entering the system, not how far it travels once it does.</p><p>Capability may actually deepen the problem, because it makes longer autonomous executions possible. As models improve, we ask them to plan over longer horizons, invoke more tools, and act with less review — and each added step is another boundary crossing where an uncertain inference can become a downstream premise. Suppose per-decision reliability rises from 95 to 98 percent. If the more capable system now executes twenty dependent decisions instead of five, it can be less reliable end to end while being more accurate at every step. And once it retrieves the wrong evidence, improved reasoning only helps it pursue that path more coherently.</p><p>This is why capable systems produce failures that are more polished, more internally consistent, and harder to detect. The system is not reasoning randomly. It is reasoning well from a state that was corrupted earlier.</p><blockquote><strong>A more capable model in an unbounded architecture is a faster car with no brakes. The speed is real. So is the increased consequence of missing a turn.</strong></blockquote><h3>The Distributed-Systems Parallel: Fault Isolation</h3><p>Distributed systems learned long ago that failures cannot always be prevented. Machines crash, networks partition, operators deploy bad configurations. The architectural response is not to assume every component can be made infallible, but to prevent one failure from becoming a system-wide event.</p><p>The vocabulary here is well established. Michael Nygard’s Release It! popularized bulkheads and circuit breakers as structural defenses against cascading failure; Netflix’s Hystrix turned them into standard practice; AWS’s cell-based architecture guidance treats blast radius as a first-class design property rather than an operational afterthought. In each case the goal is the same: bound the set of components that a single local failure is permitted to reach.</p><p>An uncertain inference is not a crashed server, but it plays the same architectural role: a local condition that may be unavoidable, whose system-wide consequences depend entirely on whether isolation boundaries exist. Without isolation, one mistaken decision reaches retrieval, planning, tools, memory, and future behavior. With it, the same decision affects only a provisional candidate list or a reversible draft.</p><p>So treat each uncertain decision as belonging to a probabilistic failure domain, which defines what may consume it, what actions may be taken from it, whether it can enter durable state, and what evidence is required before it crosses into a higher-consequence domain. A planning model may generate ten speculative approaches, but they stay in the planning domain. A support model may infer several likely causes, but no refund is initiated until account state confirms one. The uncertainty is not removed. Its operating area is restricted.</p><p>I have argued elsewhere that agents need a controller — a deterministic boundary for commitment. [Link: “LLMs Should Reason. Infrastructure Should Enforce.”] Fault isolation is the complementary idea: even with that boundary, we need to bound how far uncertainty travels before it reaches one. A controller decides where commitment happens; bounded non-determinism decides how much has already been contaminated by the time it gets there.</p><p>A boundary placed too late still permits a large blast radius: by the time commitment is reviewed, the evidence, plan, and state presented for review may all descend from the same unresolved assumption. Containment must operate throughout the execution topology, not only at the final action.</p><h3>Reliability Is the Containment of Surprise</h3><p>Reliable systems bound the blast radius. They resolve uncertainty where it enters rather than forcing downstream components to inherit it. They preserve the difference between verified facts, model inferences, and unresolved states. They collapse ambiguity at architectural boundaries instead of laundering it into certainty. They limit how many consequential decisions can depend on one probabilistic output. And they maintain enough lineage to trace a failure back to the uncertainty that started the cascade.</p><p>These properties matter more, not less, as models improve: better models reduce the frequency of some mistakes, but they also enable larger execution graphs in which the remaining mistakes travel farther. Bounded non-determinism is not an optimization, a prompting technique, or a temporary safeguard until the models get good. It is the precondition for operating probabilistic systems in production.</p><blockquote><strong>Reliability does not come from a model that never surprises us. It comes from a system where surprise has somewhere to stop.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8029717c72f0" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/your-agent-didnt-hallucinate-your-architecture-laundered-a-0-51-8029717c72f0">Your Agent Didn’t Hallucinate. Your Architecture Laundered a 0.51.</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Recommender Is Solving Last Month’s Problem]]></title>
            <link>https://pub.towardsai.net/your-recommender-is-solving-last-months-problem-4770a0ef707d?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4770a0ef707d</guid>
            <category><![CDATA[recommender-systems]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ecommerce-personalization]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 19:51:56 GMT</pubDate>
            <atom:updated>2026-07-31T06:04:48.726Z</atom:updated>
            <content:encoded><![CDATA[<h4>Intent changes in three distinct ways, and recommenders systematically miss all three — because the pipeline is built to agree with history, not to notice when it stopped applying.</h4><p>A user spends three weeks shopping for a winter coat. They compare brands, browse insulation types, read reviews, save products, abandon carts, return later, and eventually buy one. From the recommender’s perspective, this is excellent signal: clear, sustained intent. Winter coats rise to the top of the profile, related categories strengthen, and affinity scores climb.</p><p>Then the coat arrives, and the goal is complete. The user stops thinking about coats and starts planning a spring hiking trip — boots, backpacks, and trail accessories. The recommender keeps serving coats. Coat accessories. “Complete the look” bundles. Premium upgrades. Seven more versions of the thing the user already bought and finished wanting.</p><p>Nothing is technically wrong. The model learned a preference and retained it. The failure is that it has no way to represent the difference between a preference the user still holds and a goal the user has closed.</p><p>That distinction is the whole problem, and it is not a single problem. Intent changes in at least three structurally different ways: a user switches to another goal, completes a goal, or slowly evolves into a different person. These can look similar in aggregate metrics and identical on a dashboard. They are not similar at all. Each has a different signal, a different cost, and — this is the part most teams miss — a different fix.</p><p>Most recommender systems are exceptionally good at learning what a user wanted. Far fewer can tell you which of those three things just happened.</p><p>This piece is about the three ways intent changes, why the standard pipeline misses each one, and why the common remedy — decay old signals faster — addresses only one of them.</p><h4>Key Takeaways</h4><ul><li>Intent does not merely “drift.” It changes in three structurally distinct ways: switching, completion, and preference evolution.</li><li>Each mode has a different signal, cost, and intervention. Treating them as one problem guarantees that you fix at most one.</li><li>Recency decay primarily addresses preference evolution. Switching needs segmentation; completion needs an explicit satisfaction or terminal-state signal.</li><li>The pipeline lags by construction: fresh intent enters with little evidence, stale intent enters with months of it, and the objective rarely corrects the imbalance.</li><li>The sharpest production diagnostic is the mismatch between how long the system retains state and how long intent in that category actually persists.</li></ul><h3>Why the Pipeline Lags by Construction</h3><p>Most teams treat this as a modeling problem. It is also a pipeline problem, and the lag is designed into every stage.</p><p>A recommender trains on historical interactions — clicks, purchases, searches, and saves — collected over a fixed window. That is exactly what it should do. The issue is what happens next: it is usually evaluated on held-out historical interactions from a similar behavioral regime. In that setup, NDCG, Recall@K, and MRR reward the model for reproducing observed behavior. They do not, by themselves, test whether the user’s intent has changed since those interactions occurred.</p><p>A model that perfectly predicts what a user clicked last month can therefore score extremely well even when the user wants something completely different today.</p><p>The optimization loop rewards agreement with the past. Recency is rarely explicit in the objective. Goal completion is rarely explicit in the objective. Whether the current profile still describes the same user is rarely explicit in the objective.</p><p>This produces an asymmetry that compounds. The longer a signal sits in the training data, the more interactions it accumulates and the more it shapes the profile. A category that generated activity for three months can outweigh a category that became relevant yesterday — not because it matters more, but because it had more time. Fresh intent enters with limited evidence. Stale intent enters with months of it. Unless something actively counteracts that imbalance, the past wins by default.</p><blockquote><strong>A recommender optimized purely for historical accuracy will usually be a slightly out-of-date model of the user. The only question is how out of date — and which kind of out of date.</strong></blockquote><h3>The Three Ways Intent Changes</h3><p>The word “drift” flattens three different phenomena into one. Separating them is what makes them fixable.</p><h4>1. Switching — the user changed goals</h4><p><strong>What happened.</strong> The user’s objective moved. They were researching laptops; now they are buying a birthday gift. They were shopping for a coat; now they are planning a hiking trip. The previous goal may or may not still be active. What matters is that the new activity belongs to a different objective.</p><p><strong>Why the system misses it.</strong> Most systems assume behavioral continuity. Session models aggregate interactions into a single latent representation — effectively averaging everything that happened — and averages blur boundaries. Multiple goals collapse into one muddy signal. Cross-session models carry the previous goal forward with little adjustment because nothing told them that a boundary occurred.</p><p><strong>The signal.</strong> Sharp category transitions, large search-query shifts, abandoned carts followed by unrelated browsing, and breaks in engagement patterns. Switching is often the most detectable of the three modes and one of the most commonly ignored.</p><p><strong>The cost.</strong> Recommendations that feel confused rather than merely stale — chasing the latest click, blending incompatible goals, or satisfying none of them. The system appears responsive while becoming less useful.</p><p><strong>Timescale.</strong> Minutes to weeks. Switching can happen within a session or between sessions, which is precisely why organizing the problem only by timescale obscures it.</p><p>If you cannot detect a goal boundary, you are averaging intents that should have been separated — and no amount of decay fixes an average.</p><h4>2. Completion — the user finished</h4><p><strong>What happened.</strong> The goal was not abandoned. It was achieved. The coat was bought, the vacation booked, the room furnished, or the appliance replaced. The intent did not fade; it terminated.</p><p><strong>Why the system misses it.</strong> This is the deepest failure of the three because the system often reads the completion event as reinforcement. A purchase is one of the strongest engagement signals in the dataset, so many pipelines weight it accordingly. The exact moment the intent ends is therefore the moment the category score peaks. The signal that should mark an ending is interpreted as an endorsement.</p><p><strong>The signal.</strong> Conversion events combined with a category-specific judgment about whether that conversion is repeatable, replenishable, seasonal, or terminal. Buying coffee beans does not end coffee-bean intent. Buying a mattress may end mattress intent for years.</p><p><strong>The cost.</strong> The most visible recommendation failure in production and the one users actually complain about: you bought a coat, so here are seven more coats. It reads as though the system is not paying attention.</p><p><strong>Timescale.</strong> Discrete. Completion is an event, not a slow transition. That is exactly why decay handles it badly: decay is a gradual response to a step change.</p><p>If you do not model completion as a terminal state, your strongest signal can fire at the precise moment it stops being true.</p><h4>3. Preference evolution — the user became someone else</h4><p><strong>What happened.</strong> No goal switched and no goal completed. The person changed. Tastes shift, income shifts, households change, and life stages turn over. The profile from two years ago may describe someone who no longer exists.</p><p><strong>Why the system misses it.</strong> Profiles accumulate. Every interaction becomes permanent history, and history accumulates unevenly. Some periods of life generate far more activity than others, so those periods become disproportionately influential. The model ends up personalizing for a weighted average of every version of the user, dominated by whichever version was most active.</p><p><strong>The signal.</strong> Slow decline in categories that never fully disappear, long-dormant affinities still contributing to rankings, and recommendations that feel disconnected from who the user currently is rather than from what they currently want.</p><p><strong>The cost.</strong> Quieter than the other two and more corrosive. Nothing looks obviously broken. The recommendations are simply persistently, mildly wrong in a way users experience as the system not knowing them.</p><p><strong>Timescale.</strong> Months to years. This is the one mode where old signal itself is the central problem.</p><p>If you do not decay dormant preferences, the profile becomes an archive of every version of the user — and the current one is outvoted.</p><figure><img alt="Three stacked charts comparing actual intent (green) vs. the model’s estimate (red) over time, gap shaded. Switching: intent jumps to a new goal, model blends the two. Completion: intent drops to zero at purchase, model peaks. Evolution: intent declines as the person changes, model stays anchored. The model lags differently each time." src="https://cdn-images-1.medium.com/max/994/1*D1qS5YorR6-85uZWBSx43g.png" /><figcaption><em>FIGURE 1 — Three modes of intent change. Switching blends distinct goals; completion interprets an ending as reinforcement, and preference evolution leaves the profile anchored to an older version of the user. Image (Image created by the author)</em></figcaption></figure><h3>The Central Diagnostic: State Retention vs. Intent Half-Life</h3><p>If you measure one thing, measure this.</p><p>Every recommender has a state-retention window: how far back the behavioral signal that drives ranking actually reaches. It may be six months. Sometimes it is effectively “everything.” The number is often chosen for engineering reasons — what fits, what is cheap to store, or what the feature-pipeline default happens to be.</p><p>Every category also has an intent half-life: the elapsed time after an interaction at which the user’s incremental probability of another intent-consistent interaction falls to roughly half its initial post-event level. This can be estimated from the system’s own logs, ideally by category and event type.</p><p>Almost nobody compares these two numbers. That comparison is where the failure lives.</p><p>The following numbers are illustrative, but the pattern is common. Suppose a system retains six months of behavioral state per user while analysis of its own logs shows that intent half-life for many categories is roughly two to three weeks. The system is using six months of behavior to predict a two-week intent window. It is not slightly miscalibrated in time; it is structurally misaligned by an order of magnitude.</p><p>The ratio is the diagnostic. A retention-to-half-life ratio of 10 means the system remembers behavior for ten times longer than the underlying intent typically persists. In that regime, a large share of the retained evidence is likely to describe expired intent. The mismatch is also category-specific in ways that a single global window cannot serve: mattress intent and coffee-bean intent do not belong under the same retention policy.</p><p>This diagnostic is often more revealing than a single offline ranking metric. It does not require a live experiment, waiting for CTR to soften, or introducing a new model. It can be computed from data the organization already has.</p><p>Conventional randomly held-out historical evaluation is poorly equipped to surface the issue because the test set often inherits the same temporal assumptions as the model. The model’s lag and the test set’s lag agree with each other. Comparing retention with intent half-life instead measures the model against the temporal behavior of the world rather than only against its own past.</p><blockquote><strong>The model was not necessarily wrong about the user. It was wrong about when — and “when” is measurable before it becomes expensive.</strong></blockquote><h4>Quick Diagnostic</h4><p>Your recommender is likely optimizing for expired goals when the team:</p><ul><li>cannot state the intent half-life of its top categories;</li><li>uses one global retention window for every category;</li><li>treats every conversion as reinforcement rather than as a possible terminal event; and</li><li>has no goal-boundary detection within or across sessions.</li></ul><h3>Three Failures, Three Fixes</h3><p>Recency decay is the reflex. By itself, it is the wrong abstraction. It directly addresses only one of the three modes and can damage the other two.</p><p>Aggressive decay after a completed purchase still recommends coats for a while, only less confidently. Aggressive decay after a goal switch can discard stable preferences that remain useful for the new objective. Each mode therefore needs a different intervention.</p><h4>Switching needs segmentation, not decay</h4><p>The fix is boundary detection: identify when a sequence of interactions belongs to a new goal and represent it separately instead of averaging it into the existing profile. Session segmentation, multi-intent representations, explicit goal slots, or mixture-based user states can all serve this principle.</p><p>Decay cannot solve the problem because the old signal is not necessarily obsolete. The problem is that two live signals are being blended into a meaningless middle. You cannot decay your way out of an average.</p><h4>Completion needs a terminal-state signal, not decay</h4><p>Conversion should be able to end an intent, not merely strengthen or gradually weaken it. That requires a per-category judgment the pipeline may not currently encode: is the purchase repeatable, replenishable, seasonal, project-completing, or terminal?</p><p>Coffee beans replenish. Coats may be seasonal-terminal. Mattresses can be terminal for years. The intervention is a completion model — an explicit answer to “did this event close the goal?” — feeding suppression, substitution, or a transition to complementary needs rather than simple reinforcement.</p><p>Decay is the wrong shape because completion is a step function and decay is a slope.</p><h4>Preference evolution needs decay — and this is where decay belongs</h4><p>Preferences should fade at a rate tied to the measured persistence of the signal, not to a single global constant. Seasonal and project-based categories may need aggressive decay. Dietary restrictions, sizes, accessibility requirements, and other durable attributes may need almost none.</p><p>The profile should behave like a current-state estimate rather than a historical accumulator.</p><p>All three modes also need evaluation that can see them. Standard historical holdouts are not enough. Useful complements include:</p><ul><li>next-session or next-goal prediction for switching;</li><li>post-conversion recommendation audits for completion; and</li><li>cohort-level profile-age and dormant-affinity analysis for preference evolution.</li></ul><p>Different failures require different measurements.</p><figure><img alt="Three columns, one per failure mode. Switching maps to “Segmentation” — decay can’t fix an average. Completion maps to “Terminal-state signal” — decay is a slope, completion is a step. Evolution maps to “Half-life decay,” the one mode where decay is right. Banner: “One fix for three failures isn’t a solution.”" src="https://cdn-images-1.medium.com/max/994/1*HqP9tQN-Kv0c7Qs3R0RpRQ.png" /><figcaption><em>FIGURE 2 — Historical accumulation versus current-state estimation. An accumulator rewards whichever intent generated the most evidence. A current-state profile separately suppresses completed goals, decays dormant preferences, and elevates active intent. (Image created by author)</em></figcaption></figure><h3>When Old Signal Is Actually Right</h3><p>Not every preference should decay, and treating persistence as the enemy creates its own failure.</p><p>Some signals should be nearly permanent. Dietary restrictions, clothing sizes, accessibility requirements, and durable brand loyalties can remain stable for years. Aggressively decaying them produces a system that keeps forgetting things it was told — a failure users may find more insulting than staleness because it reads as not listening rather than not noticing.</p><p>Low-frequency categories can also benefit from long memory. When a user engages with a category only twice a year, historical behavior may be the best signal available. Cold-start and low-activity users need whatever history exists; a lagged estimate can still be better than no estimate at all.</p><p>The distinction is not old versus new. It is whether the signal describes something that can change, terminate, recur, or remain stable. A goal can be switched away from or completed. A person’s taste can evolve. A shoe size usually cannot. The engineering question is which kind of state you are looking at — and the answer determines everything downstream.</p><h3>Final Thought</h3><p>Intent does not drift so much as it moves in specific ways for specific reasons. A user switches goals, closes goals, or slowly becomes someone else. A system that cannot distinguish those three has only one move available — weight the past a little less — and one move cannot solve three problems.</p><p>The teams that build recommenders users trust will not be distinguished by NDCG alone. They will be the ones that can answer a question most systems cannot represent: did the goal change, did the goal end, or did the person change?</p><p>Everything useful follows from getting that right.</p><blockquote><strong>A recommender that never forgets is not one that knows the user. It is one that knows who the user used to be — and cannot tell the difference.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4770a0ef707d" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/your-recommender-is-solving-last-months-problem-4770a0ef707d">Your Recommender Is Solving Last Month’s Problem</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Missing Abstraction in AI Systems: Controllers]]></title>
            <link>https://medium.com/data-science-collective/the-missing-abstraction-in-ai-systems-controllers-66fa6065158b?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/66fa6065158b</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 15:37:16 GMT</pubDate>
            <atom:updated>2026-06-24T21:21:38.078Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Your agent’s reliability problem is an architecture problem, not a model problem — and distributed systems already solved a closely related version of it</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytEBvgjBpH7GbInkxE7Ipw.png" /></figure><p>The agent passes every check in the demo. Then it ships, and the same request starts producing different outcomes on different runs. One run retries a tool call that already succeeded. Another loses track of which step it was on and quietly starts over. A third completes exactly as intended. The model did not change between those runs, and neither did the prompt. What varied was everything the model was implicitly responsible for besides reasoning — and that part was never actually designed.</p><p>The reflex is to call this a model problem (it hallucinated) or a prompt problem (we need better instructions). I want to argue it is neither. It is an architecture problem — and it is the same architecture problem distributed-systems engineers spent the better part of two decades solving, for nearly identical reasons. The fix is not a more capable model. It is a layer that current agent architectures leave out, one I will call the controller.</p><h3>The model is doing four jobs at once</h3><p>Conventional software keeps a few concerns apart on purpose: computation, orchestration, state management, validation, and execution control each live in their own layer. That separation is not tidiness for its own sake. It exists because reliability requires explicit coordination, and decades of practice have shown that letting stateful components interact without it produces brittle workflows, cascading failures, and systems no one can observe.</p><p>Agent architectures collapse those layers into one. A single model invocation is routinely asked to interpret intent, choose a tool, manage retries, keep memory consistent, judge whether an intermediate result is good enough, and decide when to stop. In effect, the model is planner, orchestrator, validator, and execution controller at the same time.</p><p>That collapse is exactly what makes agents so fast to prototype, and exactly what makes them so hard to operate. Behavior stops depending on the infrastructure you can inspect and starts depending on the reasoning trajectories you cannot. The flexibility and the fragility come from the same place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*UtRzf9014EM6PAxQxpeVQQ.png" /><figcaption><em>Figure 1. Today’s pattern fuses four responsibilities into a single probabilistic component. The controller pattern splits them — the model proposes, a separate deterministic layer commits. (Image by author.)</em></figcaption></figure><h3>Hidden control flow</h3><p>The clearest symptom is control flow that has gone invisible. In ordinary software, the logic that governs execution is written down where you can see it:</p><pre>if validation_fails:<br>  retry()<br>else:<br>  continue()</pre><p>In an agent, that same logic usually lives inside a sentence: “If the previous reasoning seems uncertain, reconsider the earlier step before continuing.” The substitution looks harmless. It is not. It converts a deterministic branch into a probabilistic one — execution semantics that are now non-deterministic, weakly observable, and effectively impossible to verify.</p><p>As these systems grow, prompts quietly absorb routing decisions, policy enforcement, memory interpretation, and workflow transitions. A mature prompt chain is an orchestration system that nobody wrote down. The issue was never prompt length. The issue is that prompts are being asked to carry responsibilities that belong to infrastructure, and they carry them without any of the guarantees infrastructure provides.</p><h3>The model proposes, the controller disposes</h3><p>The fix is to pull apart two responsibilities that agents currently fuse: probabilistic reasoning and deterministic execution control. Let the model generate candidate reasoning. Let a separate component decide how, and whether, that reasoning is allowed to change the system.</p><p>Give the controller orchestration, state transitions, policy enforcement, validation, retries, and execution limits. Leave the model with what it is actually good at: interpretation, generation, planning, abstraction. The model proposes; the controller disposes.</p><p>We can write the relationship as a single state-transition function. The next state is produced not by the model alone, but by a controller that treats the model’s output as one input among several:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*XnnDu7rR0BFukQe1brxBbA.png" /><figcaption>State transition</figcaption></figure><p>Each symbol is a real part of a running system. <em>Sₜ</em> is the state at step <em>t</em> — the authoritative record of what has happened, held outside the model. <em>It</em> is the input at that step. <em>M</em> is the model: given state and input, it returns a proposal — an action, a plan, a label, a draft — and nothing else. Crucially, <em>M</em> never changes the world; it only suggests. <em>C</em> is the controller: a deterministic function that takes the prior state, the model’s proposal, and the input, and decides what the next state actually becomes. Validation, retries, policy checks, and the act of committing all live inside <em>C</em>.</p><p>The boundary that the line draws is the one that today’s architectures lack: <strong>reasoning stays probabilistic, while execution becomes structurally constrained.</strong> Non-determinism is allowed into the system only through <em>M</em>, and only <em>C</em> decides how far it travels.</p><h3>One step, traced</h3><p>The equation earns its place only if it does real work, so consider one step from a workflow that appears almost everywhere: a support assistant deciding whether an incoming user message requires human escalation or can be handled by self-service. That classification changes everything downstream — which workflow runs, which tools fire, what the user sees next — so the system has to get it right and has to be able to explain how.</p><p>At step <em>t</em>, the state is an explicit object, not a growing transcript:</p><pre>{<br>  &quot;step&quot;: &quot;intent_classification&quot;,<br>  &quot;session&quot;: [<br>    &quot;msg: &#39;cannot access my account&#39;&quot;,<br>    &quot;msg: &#39;third time asking about this&#39;&quot;,<br>    &quot;sentiment: frustrated&quot;<br>  ],<br>  &quot;history&quot;: { &quot;last_label&quot;: null },<br>  &quot;checkpoint&quot;: &quot;2026-03-01T10:22:31Z&quot;<br>}</pre><p>The controller hands that state and the new input to the model. The model returns a proposal — and only a proposal:</p><pre>{ &quot;label&quot;: &quot;needs_escalation&quot;, &quot;confidence&quot;: 0.91 }</pre><p>Now the controller does the work that a prompt-driven system would have left to the model’s own discretion. It checks the proposal against a schema, compares the confidence against a policy threshold, and decides the next state. Had confidence fallen short, the controller would not have asked the model to “think again.” It would have retried with a constrained prompt, fallen back to the self-service label, or aborted with a logged reason — deterministically, the same way every time. Because confidence clears the bar, the controller commits, and <em>St+1</em> becomes a new, validated, checkpointed object:</p><pre>{<br>  &quot;step&quot;: &quot;route_to_human_agent&quot;,<br>  &quot;intent&quot;: { &quot;label&quot;: &quot;needs_escalation&quot;, &quot;confidence&quot;: 0.91 },<br>  &quot;validation&quot;: { &quot;passed&quot;: true, &quot;checks&quot;: [&quot;schema&quot;, &quot;threshold&quot;] },<br>  &quot;checkpoint&quot;: &quot;2026-03-01T10:22:33Z&quot;<br>}</pre><p>Nothing here needed a smarter model. The same output, routed through an explicit controller instead of an implicit instruction, produced a transition that is inspectable, reproducible, and recoverable. That is the whole argument in miniature: the reliability came from where the decision was made, not from how well the model reasoned. The shape of that split is easier to see than to describe:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*t1usTMhuF8cQMp3LjjqMZg.png" /><figcaption><em>Figure 2. The model proposes; the controller commits. Non-determinism enters only through 𝓜, and only </em><strong><em>C </em></strong><em>decides how far it propagates into the system state. (Image by author.)</em></figcaption></figure><h3>Reliability is a property of structure, not scale</h3><p>Putting a controller in the middle reframes reliability as something you architect rather than something you wait for the next model to deliver. That cuts against the prevailing assumption that bigger or smarter models simply produce more reliable systems. Better models give you deeper reasoning, more fluency, and better generalization. They do not, by themselves, give you consistency, reproducibility, fault tolerance, or observability. Those are structural, and the controller is where the structure lives. Concretely, four things change.</p><p><strong>State gets an owner. </strong>Agents usually keep state implicitly — in conversation history, summaries, compressed memory — so every call re-derives the situation from text. A controller replaces that with structured, versioned state and deterministic updates: one authoritative record instead of a transcript, each invocation silently reinterprets.</p><p><strong>Non-determinism gets a boundary. </strong>Probabilistic reasoning is genuinely useful for planning and abstraction; the goal is not to remove it but to contain it. A controller confines stochastic behavior to the points where it adds value and stops it from leaking into orchestration and commitment.</p><p><strong>Workflows get observable. </strong>Most tooling today captures token streams, latency, and final outputs. Operating a system needs visibility into intermediate states, execution decisions, and where failures propagate. Because the controller mediates every transition, it provides natural observation points in a workflow that is otherwise a black box.</p><p><strong>Failures get isolated. </strong>With orchestration logic outside the prompt, recovery can be specified once and applied everywhere — deterministic retries, policy-based fallbacks, structured recovery — instead of behavior the model re-improvises on every run.</p><h3>“Isn’t this just an orchestrator?”</h3><p>The honest objection is that none of this is new, and that is half the point. The idea of wrapping an unreliable component in a deterministic supervisor has a long pedigree, and naming it strengthens the case rather than weakening it.</p><p>Three neighbors are worth acknowledging outright. Distributed systems gave us schedulers, orchestrators, transaction coordinators, and consensus protocols — built precisely to govern unreliable, stateful components, and the subject of the next section. Control theory gave us the separation between a plant whose behavior is uncertain and a controller that steers it toward a setpoint with feedback; the vocabulary here is borrowed on purpose. And the agent tooling already reaching for this includes LangGraph, Temporal, Prefect, AWS Step Functions, and the structured-program approach of frameworks like DSPy — each of which, in its own way, drags control flow out of the prompt and back into code.</p><p>The practitioner version arrives from a different door. Recent guidance on agent guardrails already says to tag every function as reversible or irreversible and to put a deterministic gate in front of the irreversible ones rather than trusting the model’s judgment in the moment. That is the controller principle stated operationally: the decision to commit an irreversible action does not belong to a probabilistic component.</p><p>So — <em>isn’t a controller just an orchestration framework with a new name?</em> No. Those frameworks are early, partial instances of the abstraction, not refutations of it. Most give you a graph or a workflow engine but still let the model make the commitment decision inside a node — still let it decide, in prose, whether to retry, escalate, or stop. The claim here is narrower and sharper: wherever that boundary is drawn, the line between proposal and commitment has to be deterministic and has to sit outside the model. “Controller” is the name for the principle the tooling is converging toward, and naming it lets us design for it on purpose instead of rediscovering it by accident.</p><p>Orchestrators are implementations. Controllers are the abstraction: the deterministic boundary between model proposal and system commitment.</p><h3>What distributed systems already learned</h3><p>The strongest reason to believe controllers are necessary rather than merely nice is that distributed systems have already run this experiment. Early distributed systems put coordination logic inside the components: each node decided when to retry, how to read shared state, and when an operation was done. The result was the failure profile agents now wear — hidden dependencies, inconsistent state, unreliable retries. The field did not fix it by making nodes faster or smarter. It fixed it by lifting control out of the components and into explicit abstractions: schedulers, orchestrators, transaction coordinators, consensus. Four of those lessons land almost directly on agents.</p><p><strong>Retries belong to the coordinator, not the component. </strong>Distributed systems learned the hard way that a node retrying on its own — no idempotency key, no coordinating policy — produces duplicate writes, double charges, and storms of redundant work. Reliable retries are owned by a coordinator that knows what already happened and what is safe to repeat. An agent that “decides” to retry because its reasoning felt shaky is the local, improvised version of exactly that anti-pattern. A controller with an explicit, idempotent retry policy is the disciplined version, and the gap between them is the gap between a system that recovers and one that thrashes.</p><p><strong>State needs one source of truth. </strong>A central achievement of the field is the insistence that shared states have a single authoritative owner, reconciled deliberately rather than reinterpreted locally by every participant. Prompt-context-as-state is the opposite: no owner, and every call silently re-reads and re-interprets the accumulated history. State drift is not a bug in that design — it is the design. The controller restores the owner: one structured state object that the model reads but never unilaterally rewrites.</p><p><strong>Long-running work needs compensation, not hope. </strong>The field gave up the fantasy that a multi-step workflow fits into a single transaction and adopted the saga pattern instead: each step carries an explicit compensating action that undoes it if a later step fails. Agents that take irreversible actions — send an email, write to a database, call a payments API — have the identical problem, and they cannot hand compensation to the model, because the model’s decision to compensate would itself be probabilistic. Compensation is a control responsibility, specified deterministically by the layer that knows which effects have already escaped into the world.</p><p><strong>Failures must be isolated before they cascade. </strong>Circuit breakers and bulkheads exist so that one failing dependency cannot take down the system. The agentic version of a cascade is the unconstrained reasoning loop — a model that re-invokes itself, re-plans, and re-tries until it burns a budget or corrupts its own context. No prompt reliably prevents this, because the prompt is inside the loop. The controller is the circuit breaker: the thing outside the loop that can count attempts, enforce a budget, and trip.</p><blockquote><strong><em>You cannot push a correctness guarantee into a probabilistic component and expect it to hold.</em></strong></blockquote><p>Under all four is the end-to-end argument: a reliability property belongs at the layer that can actually guarantee it. A guarantee implemented inside a probabilistic component is not a guarantee; it is a hope with good odds. That is why the parallel to distributed systems is more than a metaphor. The point is not that model calls vaguely resemble network nodes. It is that they face the same structural pressures — probabilistic execution, evolving state, asynchronous coordination — and pressures of that shape have, historically, one durable resolution: move control out of the unreliable components and into a layer built to hold it. That layer is the controller.</p><h3>Build the layer</h3><p>Today’s agent architectures lean on the model for both reasoning and execution control. That buys flexibility and pays for it in hidden control flow, implicit state machines, and weak guarantees — and no amount of additional model capability buys it back, because the cost is structural, not cognitive.</p><p>Reliable agents need the controller: an explicit split between probabilistic reasoning and deterministic execution. With it, you get real orchestration, owned state, observability boundaries, and constrained execution. Without it, you inherit the exact failure modes distributed systems spent twenty years designing away. This is not a refinement to reach for once model’s plateau. It is the precondition for running probabilistic systems in production at all.</p><p>The trajectory is not subtle. As agents move into work that actually matters, the next increment of reliability will not come from a larger model. It will come from the abstractions that govern probabilistic computation — and the first of them, the one the field is already reaching for without naming, is the controller.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66fa6065158b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/the-missing-abstraction-in-ai-systems-controllers-66fa6065158b">The Missing Abstraction in AI Systems: Controllers</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calibration in Production ML: Why Confidence Scores Lie]]></title>
            <link>https://medium.com/data-science-collective/calibration-in-production-ml-why-confidence-scores-lie-03f646796a35?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/03f646796a35</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 14:52:33 GMT</pubDate>
            <atom:updated>2026-06-24T21:13:46.235Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>A model’s confidence is not its probability of being right — and production systems route on this misunderstanding every day.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVAG1qHA2Gkg9e_Z0hKjCg.png" /></figure><p>Production systems increasingly act on confidence scores, not just predictions. Calibration is what determines whether those actions are justified.</p><p>A confidence score of 0.92 is not a 92% probability of being right. I.e. the score doesn’t mean what it says. Confidence is what the model says. Probability is what the world does. These are different quantities — and production systems route, escalate, abstain, and rank on the assumption that they are not.</p><p>The gap between them has a name: calibration. A model is calibrated when predictions assigned a confidence of x% are correct approximately x% of the time. When 0.92 means 92%, the score is doing what downstream systems assume it is. When 0.92 means 71%, every decision downstream of that score is running on a number that lies politely.</p><p>Most production systems track accuracy. Few track calibration. And the gap between them is widening as models grow more capable and systems grow more autonomous.</p><p>This distinction matters more today than it did five years ago. Modern ML systems increasingly make decisions autonomously rather than merely generating predictions. Customer-support workflows, recommendation systems, fraud detection pipelines, content moderation systems, and AI agents all consume confidence scores as operational inputs. As more decisions become automated, the cost of misinterpreting any single score compounds — and compounds faster than the accuracy dashboard can detect.</p><p>This piece is about why models are miscalibrated by default, how calibration drifts in production, what miscalibration actually costs, and why calibration deserves to be tracked as a first-class metric rather than buried inside the accuracy number.</p><h4>KEY TAKEAWAYS</h4><ul><li>Model confidence and event probability are not the same thing — conflating them is one of the most common silent failures in production ML</li><li>Modern models are miscalibrated by default. In deep networks, calibration quality has often degraded as predictive performance has improved</li><li>Calibration drifts in production for the same reasons eval sets decay — distribution shift, user adaptation, architectural changes, feature pipeline edits</li><li>Miscalibration is most expensive precisely where confidence matters most: routing, escalation, fallback, ranking, agent control, and any downstream system that consumes the score as a probability</li><li>The diagnostic move is to track calibration error alongside accuracy — not instead of it</li></ul><h3>WHY MODELS ARE MISCALIBRATED BY DEFAULT</h3><p>Calibration is not what you get for free. It is what you get when you ask for it explicitly.</p><p>Classical statistical models like logistic regression had calibration as a side effect of their structure. Their loss functions and probabilistic foundations encouraged outputs that approximated empirical frequencies. Calibration was reasonable without anyone having to ask for it.</p><p>Modern deep networks are different. Their training procedures optimize for accuracy, not calibration. The loss function rewards correct predictions. It does not penalize excessive confidence. The result is a class of models that are systematically overconfident — they assign higher probability mass to their top prediction than the evidence actually warrants.</p><p>This is not a niche finding. The literature has known it for years. Guo and colleagues showed in 2017 that as neural network architectures grew deeper, wider, and more accurate, calibration quality degraded in lockstep. Models got better at predicting the right answer and simultaneously worse at saying how confident they should be in that answer.</p><p>LLMs amplify the problem. Whether confidence is read from token log-probabilities, self-reported confidence statements, or downstream classifier heads, the relationship between model likelihood and factual correctness is often weak and task-dependent. A high-probability response can still be factually wrong, logically inconsistent, or generated by a model that genuinely has no idea but is fluent enough to hide it.</p><p>The structural point is uncomfortable: calibration is not a property that the training process delivers by default. It is a property someone has to add later — through explicit measurement and post-hoc correction — or it does not exist in the system at all.</p><p>A model that scores well on accuracy can still be lying about its confidence. The lie is silent because nobody is measuring the right thing.</p><h3>THE FOUR CATEGORIES</h3><p>Four categories explain where calibration failures actually live in production systems. Each is structural — built into how confidence interacts with operational decisions, not an implementation bug to be fixed away.</p><h4>1. Confidence is not probability</h4><p>A model returning 0.92 is making a claim about its own internal state. It is not making a claim about the world.</p><p>The mapping from “the model’s top score” to “how often this prediction is right” is empirical. Unless someone has measured that mapping, it is almost certainly wrong. The score and the probability are different quantities, connected only by whatever calibration the training process happened to produce, which, as Section 3 established, is usually not much.</p><p>Downstream systems make this mistake constantly. Routing thresholds treat 0.85 as if it carried probabilistic meaning. Abstention rules assume monotonicity between confidence and correctness. Ranking algorithms blend scores from multiple models as if they were comparable probabilities. None of these assumptions hold by default.</p><p>The failure is invisible because the system continues to function. Cases get routed. Decisions get made. Aggregate accuracy looks fine. Only when someone measures the empirical hit rate at each confidence band does the gap become visible — and by then the wrong decisions have been compounding for months.</p><p><em>If you don’t measure the empirical hit rate at each confidence level, you do not know what your model is saying. You only know what number it returned.</em></p><h4>2. Calibration drifts in production</h4><p>Even if a model was calibrated at training time, calibration is not preserved under distribution shift.</p><p>The same forces that decay evaluation sets also decay calibration, and several of them are specific to production environments. New user populations alter the input distribution. New content categories shift the empirical base rates. Feature pipeline changes — even seemingly harmless ones — alter score distributions without materially affecting accuracy. Retraining on newer data resets the score calibration even when the architecture and labels stay the same. Changes in user behavior, retrieval system modifications, ranking signal updates, and business-rule edits all reshape the distribution of inputs the model sees. None of these typically register on the accuracy dashboard.</p><p>A feature engineering change that looks routine in code review can quietly move the score distribution by enough to break a downstream routing threshold. Accuracy holds. Calibration shifts. The dashboard misses it.</p><p>The result is calibration drift: a model that meant 92% at launch can mean 71% six months later, while accuracy continues to read at acceptable levels. The routing system, meanwhile, has been making increasingly bad decisions the entire time.</p><p>This is the same dynamic explored in the eval half-life piece, asked at the score level. Evaluation sets decay; calibration decays alongside them. The dashboard that misses one is usually missing the other.</p><p><em>If you don’t re-measure calibration on a schedule, your routing thresholds are running on assumptions from a system that no longer exists.</em></p><h4>3. What miscalibration costs</h4><p>Miscalibration is most expensive precisely where confidence matters most.</p><p>Routing systems suffer first. Overconfident scores send hard cases to the cheap path — automated responses that should have gone to humans, simple workflows that should have escalated. The accuracy dashboard registers the model as performing well. The customer experience dashboard, increasingly, does not.</p><p>Escalation systems fail next. Many teams prioritize human review based on predicted risk. When the model is overconfident, the cases that needed escalation get suppressed. When the model is underconfident, the escalation queue swamps the reviewers with cases that did not require attention. Both failures look like operational problems, not model problems, so they get fixed at the wrong layer.</p><p>Fallback mechanisms depend on calibration most directly. Abstention rules assume that low confidence corresponds to high uncertainty. When that mapping breaks, fallback systems activate at the wrong moments — too rarely when they were needed, too often when they were not.</p><p>Ranking and recommendation systems compound the failures in their own characteristic way. A ranker may continue to order items correctly even when its score calibration is broken, because relative order is preserved under monotonic transformations of confidence. The ranking quality looks acceptable.</p><p>But downstream systems that consume those scores as probabilities — inventory allocation, promotion planning, exploration policies, expected revenue estimation, budget pacing — begin making systematically biased decisions. The recommender appears to be working. The systems that depend on its probability estimates are not.</p><p>AI agents make calibration failures even more expensive. In agent architectures, confidence increasingly determines whether the agent continues autonomously, invokes a tool, asks for clarification, or escalates to a human.</p><p>Confidence is no longer just a prediction score. It becomes a control signal. Miscalibration therefore affects not only the quality of the model’s outputs but the behavior of the system around it — which steps it takes, which paths it stops, which actions it commits to. An overconfident agent acts when it should have hesitated. An underconfident one hesitates when it should have acted. Both look like reasoning failures, and neither one is.</p><p>The deepest problem is that the consequences of miscalibration appear as unrelated operational failures. The support team observes routing errors. Risk management observes escalation failures. The merchandising team observes mispriced promotions. The agent team observes inexplicable behavior changes. Because nobody is monitoring calibration directly, the shared cause stays invisible. Each team fixes its local symptom while the underlying gap stays open.</p><blockquote><strong>If you cannot tell whether your fallback rate matches your model’s actual uncertainty, you are paying for a fallback system that fires on noise.</strong></blockquote><h4>4. Calibration as a first-class metric</h4><p>Most teams track accuracy, precision, recall, AUC. Few track calibration error directly. The tools exist — Expected Calibration Error, reliability diagrams, Brier scores — but they live in research notebooks rather than production dashboards.</p><p>The structural reason is that calibration is treated as a model-research concern rather than a production-monitoring concern. Something to check before launch, not something to watch over time. By the time it gets attention again, the downstream system has been routing on broken assumptions for months.</p><p>This is the failure mode this piece is fundamentally about. Calibration is invisible because it is not measured. It is not measured because it is not on the dashboard. It is not on the dashboard because it has been classified as a research concern rather than a production concern. Each step of that chain is reasonable. The cumulative result is a class of silent failures nobody is positioned to catch.</p><blockquote><strong>If calibration is not on your dashboard, it is not in your reliability story. No matter how good your accuracy looks.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*eVBT9eK6QKqgyvcI34spZA.png" /><figcaption><em>Figure 1 — A calibrated model lies on the diagonal. The shaded region represents overconfidence — the difference between what the model claims and what reality delivers. </em>Image by author.</figcaption></figure><h3>TWO CONCRETE PRODUCTION SCENARIOS</h3><p>The numbers below are illustrative — designed to make the failure modes concrete, not to benchmark any specific system. The shape of the gaps, not the specific figures, is the point.</p><h4>Scenario A: A support classifier where calibration breaks routing</h4><p>Consider a customer support classifier that routes incoming inquiries to one of three tiers: automated response, human agent, and escalation specialist.</p><p>Model accuracy at launch: 92%. The dashboard tells a clean story.</p><p>Six months later, an audit measures the expected calibration error at 0.18. The model is meaningfully miscalibrated, and nobody noticed because accuracy still reads above 90%.</p><p>The routing rule was set during launch: confidence above 0.85 routes to automated response, 0.5 to 0.85 routes to a human agent, and below 0.5 routes to an escalation specialist.</p><p>The audit reveals what each band actually looks like in production. Predictions in the 0.85 to 0.90 band, expected to be right 87% of the time, are right 68% of the time. Predictions above 0.90 are right 76% of the time, not the 90%+ the routing rule assumed. Predictions in the 0.5 to 0.85 band, the human-agent path, are right 64% of the time — close to where the system thought they would be.</p><p><em>The operational consequence:</em> roughly 14% of automated decisions are wrong in ways the system would have caught if the routing thresholds had reflected actual calibration. Customer satisfaction tickets climb. The escalation team is underutilized while frustrations build elsewhere.</p><p>The classifier did not fail. It was correctly performing the task it was trained on. The system around it just believed the confidence number meant something it did not.</p><p>Routing systems are not the only place calibration matters. In many organizations, probability estimates become inputs to planning, forecasting, and resource-allocation systems long after the ranking decision has been made.</p><h4>Scenario B: A recommender where calibration breaks everything downstream of ranking</h4><p>Consider a recommendation model that predicts click-through probability for product ranking on a large e-commerce site.</p><p>The model’s ranking quality is good. Offline NDCG holds. A/B tests against the previous ranker show a modest lift. The team is happy with the model.</p><p>But the model is also miscalibrated. Items the model predicts will be clicked at a 0.20 rate are actually clicked at a 0.12 rate. The predictions are off by a factor of nearly two — and yet the ranking is unaffected, because the rank-order between items is preserved as long as the miscalibration is roughly monotonic across the score distribution.</p><p>This is where the failure becomes characteristic of recommendation systems.</p><p>The ranker is producing two outputs, not one. The first is the ordering — which item goes in which slot. The second is the probability estimate — the predicted click rate that the system uses for everything other than ordering. The first is fine. The second is wrong by a factor approaching two.</p><p>Every downstream system that consumes the probability inherits the error. Inventory allocation systems over-provision items that the model thinks will be clicked frequently. Promotion planning over-budgets for items with inflated expected engagement. Exploration policies that use predicted probability to balance exploit vs. explore are no longer balancing what they think they’re balancing. Expected revenue estimates feeding business forecasts are systematically biased high.</p><p>The same problem appears in advertising systems, where bid prices often depend directly on predicted click or conversion probabilities. A 2× calibration error can become a 2× pricing error — and the auction does not distinguish between an inflated bid that reflects genuine value and an inflated bid that reflects a miscalibrated model. The advertiser pays the difference either way.</p><p>The ranking dashboard says the recommender is working. The inventory dashboard says forecasts are off. The promotion team observes mysterious overspend. The bidding system observes mounting losses. The forecasting team observes systematic forecast error. Nobody traces it back to the recommender, because the recommender, as far as the ranking team is concerned, is operating within spec.</p><p>The same calibration failure produces a different operational symptom in each downstream consumer. The root cause stays invisible until somebody measures the empirical click rate at each predicted probability band — and by then the misallocation has compounded across several planning cycles.</p><blockquote><strong>The accuracy dashboard stayed green. The system was decaying underneath it. The model wasn’t lying — the systems consuming the score were reading the number wrong, and nobody was watching the gap.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*VUx0I_eLjAbyJFbneIOsmA.png" /><figcaption><em>Figure 2 — A recommender can rank products effectively while systematically overestimating engagement probabilities. Ranking quality survives. Downstream business decisions do not. </em>Image by author</figcaption></figure><h4>QUICK DIAGNOSTIC</h4><p>If your team:</p><ul><li><em>tracks accuracy but not calibration error</em></li><li><em>routes decisions on raw confidence scores without measuring the empirical hit rate at those thresholds</em></li><li><em>consumes model probabilities downstream (in budgeting, allocation, exploration, forecasting, bidding) without re-validating that the probabilities mean what they claim</em></li><li><em>uses confidence as a control signal in agentic systems without monitoring its calibration</em></li><li><em>cannot tell you what your model’s Expected Calibration Error is right now</em></li></ul><p><strong>Your downstream systems are running on confidence numbers that do not mean what they appear to mean.</strong></p><h4>WHAT CHANGES WHEN CALIBRATION IS TREATED AS INFRASTRUCTURE</h4><p>Three operational moves separate teams that ship reliable confidence-based systems from teams that ship miscalibrated ones.</p><p><strong><em>Calibrate explicitly.</em> </strong>Platt scaling, isotonic regression, and temperature scaling. None of these techniques is exotic. All of them belong in the serving pipeline of any system that routes on confidence or consumes scores as probabilities downstream. They take learned scores and remap them to better-aligned probabilities — without retraining the underlying model, without architectural changes, without changes to the loss function. The fact that most production systems do not apply any of them is a process gap, not a technical limitation.</p><p><strong><em>Monitor calibration error the way you monitor accuracy.</em> </strong>Expected Calibration Error on rolling windows. Reliability diagrams in the dashboards that engineers actually look at. Alerts on drift. Calibration is a metric that decays over time, and the only defense against silent decay is explicit observation.</p><p><strong><em>Map confidence thresholds to empirical outcomes, not theoretical ones.</em> </strong>“Above 0.9” is not a magic threshold. It is a band that needs to be empirically validated against actual hit rates and re-validated on a schedule. Routing rules, allocation rules, and any decision that consumes a score as a probability need to be checked against the actual mapping between score and outcome — not assumed.</p><p>Underneath all three is a frame change. Calibration should be treated the way mature engineering organizations treat latency, availability, and data quality. It is not a one-time modeling exercise. It is an operational property that requires continuous monitoring, owned by someone, and alarmed on like any other reliability signal. Organizations that measure calibration only during model development are effectively assuming that uncertainty estimates remain stable indefinitely — an assumption that rarely survives production reality.</p><p>This is the same conversation as the eval half-life piece, asked at the score level. The teams that catch eval decay early treat eval maintenance as engineering work. The teams that catch calibration decay early treat calibration the same way — as continuous infrastructure, not a one-time tuning step.</p><blockquote><strong>Calibration is the difference between a model that sounds confident and a system that knows when to act on confidence.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*mhpPuKPBSUWX5PGFGJz__w.png" /><figcaption><em>Figure 3 — Calibration often decays before accuracy does. Production systems may continue making increasingly poor confidence-based decisions while traditional performance metrics remain stable. </em>Image by author.</figcaption></figure><h3>WHEN RAW SCORES ARE ACTUALLY FINE</h3><p>Some systems do not need calibration at all. The trick is knowing which.</p><p><strong><em>Signals raw scores are fine: </em></strong>the task is pure ranking, not threshold-based routing — relative order matters, but absolute calibration does not. The model’s output feeds into a downstream layer that handles calibration explicitly. Decisions are binary with thresholds that have been empirically tuned, not interpreted as probabilities.</p><p><strong><em>Signals calibration is non-negotiable: </em></strong>routing or escalation thresholds. Confidence-based abstention. Human-in-the-loop systems where the human reads the score. Multi-model ensembles that blend probabilistic outputs. Bidding and pricing systems where probabilities become dollar amounts. Agent control signals where confidence determines whether the system continues autonomously. Any system that consumes a score as a probability for downstream planning, allocation, forecasting, or budgeting.</p><p>The distinction is not whether confidence matters. The distinction is whether anything downstream of the score treats it as a probability. Raw scores work fine when nothing does. The moment something does — and almost everything eventually does — calibration becomes infrastructure.</p><p>Static ranking systems can survive miscalibration. Production decision systems usually cannot.</p><h3>FINAL THOUGHT</h3><p>Calibration answers a deceptively simple question: when a model assigns a score, how much trust should we place in it?</p><p>Production systems route, escalate, rank, allocate, bid, and control on model outputs every day. In many cases, those decisions depend less on the prediction itself than on the interpretation of the score attached to it. When that interpretation is wrong, the failures rarely appear as calibration failures.</p><p>They surface as routing mistakes, forecasting errors, misallocated budgets, unnecessary escalations, or unreliable autonomous behavior. A small mismatch between predicted and observed outcomes can propagate through multiple downstream processes, amplifying its impact far beyond the original model.</p><p>The organizations that build dependable ML systems will not be distinguished by predictive performance alone. They will be the ones that understand the relationship between model outputs and real-world outcomes — and that continue validating that relationship after deployment, not just before it.</p><blockquote><strong>Accuracy tells you how often a model is correct. Calibration tells you whether its confidence deserves to be trusted. Production systems live or die on the second.</strong></blockquote><h4>FURTHER READING</h4><ul><li>Guo, Pleiss, Sun, and Weinberger (2017). <em>On Calibration of Modern Neural Networks.</em></li><li>Niculescu-Mizil and Caruana (2005). <em>Predicting Good Probabilities with Supervised Learning.</em></li><li>Minderer, Djolonga, Romijnders, Hubis, Zhai, Houlsby, Tran, and Lucic (2021). <em>Revisiting the Calibration of Modern Neural Networks.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03f646796a35" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/calibration-in-production-ml-why-confidence-scores-lie-03f646796a35">Calibration in Production ML: Why Confidence Scores Lie</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Real Cost of Agentic AI Nobody Budgets For]]></title>
            <link>https://pub.towardsai.net/the-real-cost-of-agentic-ai-nobody-budgets-for-5711fc0ec731?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5711fc0ec731</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[production-engineering]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Mon, 25 May 2026 01:18:36 GMT</pubDate>
            <atom:updated>2026-05-25T03:55:03.050Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong><em>Why production agent costs blindside teams — a taxonomy of the hidden line items.</em></strong></h4><p>The first production bill for an agent system is almost always a surprise. Not because teams failed to estimate token usage, but because they estimated the wrong thing.</p><p>Every team has a version: projected spend looked manageable, the invoice came in at three times the estimate, and prompt tweaks didn’t close the gap. Engineers go looking for inefficient prompts, oversized context windows, redundant calls. They find some — but the optimizations move the bill by ten or fifteen percent. The structural gap is still there.</p><p>Token cost is visible. It is also the least structurally informative component of an agent system’s cost profile.</p><p>Tokens are the cost of invoking intelligence. Everything else — retries, tools, latency, fallbacks, observability — is the cost of operating it.</p><p>The cost of an agent system is not the cost of its model calls. It is the cost of every decision the model didn’t make.</p><p>This piece is about where those costs come from, why they are structural rather than incidental, and how to recognize them before they show up on an invoice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dpQTkkRbyIjqTNXcfPdOhA.png" /><figcaption><em>Visible vs. hidden cost — token cost is the smallest segment of the bill, not the largest.(Image created by author)</em></figcaption></figure><h4>KEY TAKEAWAYS</h4><ul><li>Token cost is the most visible line item — but in production systems, it is rarely the dominant one</li><li>Teams underestimate second-order effects: retries, tool fan-out, and fallback handling amplify cost beyond linear expectations</li><li>The root issue is structural — agent systems are depth-variable workflows, not fixed-cost inference pipelines</li><li>The diagnostic move is to measure cost-per-resolved-task, not cost-per-call</li><li>The real question is not “what does this cost per API call?” but “what does this cost to complete one task end-to-end?”</li></ul><h3>Why traditional ML cost models fail here</h3><p>Conventional ML cost models assume cost scales with inference volume. Agent systems break that assumption.</p><p>In a typical ML system, each request has a predictable cost. Scaling from one million to ten million requests increases spend linearly. The system is shallow: one request, one inference, one cost. Capacity planning becomes a multiplication problem.</p><p>Agent systems are different. Their cost scales with task complexity, not request volume. A single request may trigger multiple reasoning steps, retries, and tool interactions. Execution depth varies per request, and that variability is not noise — it is the central feature of the system.</p><p>This produces a different cost shape. Instead of a flat per-request cost, agent systems generate a distribution — with a long tail driven by retries, failures, and complex tasks. The distribution is not symmetric. The mean is dominated by the tail. The teams that budget for the median quietly subsidize the tail until the bill arrives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8ZLEkCZpn3YqJIhp6hDSA.png" /><figcaption><em>Cost shape — predictable linear scaling for traditional ML vs. variable-depth distribution for agents. (Image created by author)</em></figcaption></figure><p>An ML system serving one million users at 100 milliseconds behaves predictably. An agent serving ten thousand users with variable-depth workflows does not.</p><p>The correct unit of measurement shifts with the system. Cost-per-call worked when the call was the system. For agents, the relevant unit is cost-per-resolved-task — the full execution path including retries, tool usage, fallback handling, and infrastructure overhead.</p><blockquote><strong>Cost-per-call optimization gives you the wrong leverage points. You can cut the token cost in half and still go over budget.</strong></blockquote><h3>The five hidden cost categories</h3><p>Five categories explain where the budget actually goes. Each is structural — built into how agent systems operate, not a bug or an inefficiency to optimize away.</p><h4>1. Retry cascades and reasoning loops</h4><p>Agent systems retry by design. When a step fails — due to ambiguity, tool error, or constraint violation — the agent loops inside the task. This is a feature: it is what makes agents resilient to noisy inputs and partial failures.</p><p>Anyone who has worked with structured-output retry patterns or constrained generation has felt this. The first attempt fails validation. The agent reconstructs the request with the error message in context. The second attempt is more expensive than the first — same prompt, larger context, additional reasoning. Multiply that across a system handling real load.</p><p>Retries do not scale linearly. Each retry carries prior context, increasing token usage per attempt. A three-step retry loop is not 3× cost — it is 3× cost <em>plus </em>an expanding context window <em>plus</em> additional intermediate steps inserted by the agent’s recovery logic.</p><p>Cost is governed by tail behavior. The median request completes in one pass. The P95 request does not — and that tail drives spend. Most teams model retry implicitly or ignore it entirely. They assume single-pass execution and treat deviation as noise. In production, the deviation is the cost.</p><blockquote>If you don’t budget for retry distribution, your cost projection is the median case — not the P95 case that breaks the budget.</blockquote><h4>2. Tool call fan-out</h4><p>Agents call tools: search APIs, databases, internal services, third-party endpoints. Each call has its own latency, its own failure profile, and often its own paid pricing tier. A seemingly simple task — “summarize the recent customer complaints” — can fan out into retrieval, filtering, enrichment, and validation, with multiple tools per step.</p><p>Fan-out compounds. Five tool calls at $0.002 each look negligible in isolation. Multiplied across retries, parallel branches, and high-volume usage, they add up to a meaningful share of the operating cost.</p><p>The deeper problem is conceptual. Most cost models treat tool calls as zero-cost abstractions because they were free in the design phase. In design docs, they are capabilities. On the bill, they are line items.</p><blockquote>If you don’t account for tool fan-out, you are modeling a single-threaded system while operating a distributed one.</blockquote><h4>3. Multi-step reasoning latency tax</h4><p>Latency drives cost long before it shows up on the model bill.</p><p>To maintain throughput against service-level objectives, multi-step systems scale horizontally: more replicas, more parallel inference, more memory. The cost shows up on the infrastructure bill — compute, networking, storage — not the model API bill. Engineers see a higher cloud bill weeks after the design decision and start optimizing infrastructure, when the actual cause is upstream: the agent design pattern that turned a single inference into five.</p><p>The mechanics: multi-step reasoning compounds delays. Each model call adds inference time, each tool call adds round-trip time, and orchestration adds overhead between steps. A 200ms response that should have been one inference becomes 2 seconds across five steps. Holding the SLO constant means absorbing the difference in scale-out — and that absorption is the cost.</p><blockquote>If you don’t account for latency as a cost, you will discover it as an infrastructure bill weeks later.</blockquote><h4>4. Fallback rates and human-in-the-loop review</h4><p>Retries happen inside the agent loop. Fallbacks happen after the agent gives up.</p><p>When the agent cannot resolve a task — due to uncertainty, ambiguity, or policy constraints — it falls back. Fallbacks take two forms: programmatic (rules, simpler models, default responses) and human (escalation to reviewers).</p><p>Both are expensive. Programmatic fallbacks require engineering effort to design, maintain, and integrate. Human fallbacks incur direct labor cost and introduce latency that degrades user experience. A system with a 12% fallback rate at scale is paying for two systems — the agent, and the fallback path that absorbs its uncertainty.</p><p>Most teams track success rate. Few track how that success was achieved. A green dashboard with 95% accuracy can be hiding a 30% fallback rate that quietly absorbs the agent’s failures and redirects them to expensive paths.</p><blockquote>If you don’t track the fallback rate, you are blind to the most direct driver of operational cost.</blockquote><h4>5. Evaluation and observability overhead</h4><p>Agent systems require a fundamentally different evaluation and observability stack than single-model systems. Static datasets and aggregate metrics are not enough. Multi-step reasoning requires trace-level visibility. Dynamic state requires replay tooling. Continuously emerging failure modes require eval sets that get maintained — not just authored once.</p><p>This adds a cost category that scales with system complexity, not user volume. Trace storage, logging pipelines, replay infrastructure, eval harnesses, and the engineering team that runs all of it — these are the price of operating a system whose failures are otherwise opaque.</p><p>This is not optional overhead. It is the cost of being able to debug what you built.</p><blockquote>If you don’t budget for observability, you will pay for it in undiagnosed failures and reactive firefighting.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vq5JSO8NmYQsEvxg2W7qtQ.png" /><figcaption><em>The five-category taxonomy — what each category is, why it’s hidden, and what to track.(Image created by author)</em></figcaption></figure><h3>A concrete scenario</h3><p>Consider a customer service agent designed to handle support inquiries. A user submits a request: <em>“I was charged twice for my last order — can you fix it?”</em></p><p>The visible cost is simple: one model call at approximately $0.04. This is what the team budgets. The actual execution is different.</p><p>The numbers below are illustrative — designed to make the categories concrete, not to benchmark any specific system. The shape of the breakdown, not the specific figures, is the point.</p><ul><li>The agent queries internal systems — order history, billing records, transaction logs. Five tool calls at $0.002 each. <strong>Fan-out cost: $0.01.</strong></li><li>The billing data is ambiguous. The agent retries the reasoning step, expanding context across attempts. <strong>P95 retry overhead: $0.05 </strong>— exceeding the base token cost itself.</li><li>Multi-step reasoning extends response time. To hold the latency SLO, the system runs additional replicas. <strong>Amortized infrastructure tax: $0.03 per request.</strong></li><li>In 12% of cases, the agent escalates to a human reviewer. <strong>Amortized human review: $0.06 per request.</strong></li><li>Trace storage, replay tooling, eval harnesses, and the engineering effort that maintains them: <strong>$0.02 per request.</strong></li></ul><p><strong>Total: approximately $0.21 per request. More than 5× the visible cost.</strong></p><blockquote>This is not a margin disaster. It is a forecasting disaster. The team budgeted for $0.04 and got $0.21.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laMog2jsnyIUoSrgc_l9-g.png" /><figcaption><em>From visible cost to true cost — the $0.04 → $0.21 breakdown.(Image created by author)</em></figcaption></figure><h4>Quick diagnostic</h4><p>If your team:</p><ul><li>tracks only the model API bill,</li><li>does not measure retry distribution at P95,</li><li>cannot tell you cost per resolved task —</li></ul><p>Your agent’s true cost is something you’ll discover, not something you’ll budget for.</p><h3>When agent complexity is worth the cost</h3><p>The presence of hidden costs does not mean agent systems are unjustified. In many cases, the additional complexity and expense are exactly the right tradeoff.</p><p>Agent systems earn their cost when task value scales with autonomy. Research workflows, complex investigations, multi-step decision processes — these benefit directly from the flexibility and reasoning depth that agents provide. The cost of manual processing or delayed response in these contexts can easily exceed the cost of running an agent.</p><p>They are also justified when the cost of inaction is high. Missed escalations, unresolved customer issues, degraded user experience — these have measurable downstream costs that agents can absorb.</p><p>They are not justified when the task is single-shot and high-volume. In those cases, simpler architectures — retrieval pipelines, classifiers, even rule-based systems — are cheaper, faster, and more reliable. Deploying an agent there is paying for a capability you don’t need.</p><p>The economic test is straightforward: does the cost-per-resolved-task justify the value of the resolution? If it does, the agent earns its place. If it doesn’t, the system is not failing technically — it is failing economically. Both failures end the project; one of them is harder to see coming.</p><p>There is a useful side effect to measuring cost honestly: it functions as a forcing function for system design. The fastest way to learn whether your agent should have been a simpler system is to measure cost-per-resolved-task. The number itself often makes the architecture decision before any debate does.</p><p>This is the same architectural question I wrote about last month, asked at the budget level instead of the system level. Agents fail not because they’re expensive, but because they are sometimes deployed where they shouldn’t be.</p><h3>Final Thought</h3><p>Token cost is the cost of building. Hidden costs are the cost of operating. The distinction matters because building is predictable and operating is not. The real cost emerges from the dynamics of operation — retries, fan-out, latency, fallbacks, and the infrastructure required to observe and evaluate the system. These are not incidental. They are structural.</p><p>Token costs are predictable. Agent costs are not. The gap is where the real bill comes due — and where nobody is looking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5711fc0ec731" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/the-real-cost-of-agentic-ai-nobody-budgets-for-5711fc0ec731">The Real Cost of Agentic AI Nobody Budgets For</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluation Sets Have a Half-Life. Most Teams Pretend They Don’t.]]></title>
            <link>https://medium.com/data-science-collective/evaluation-sets-have-a-half-life-most-teams-pretend-they-dont-09eb07ffa94c?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/09eb07ffa94c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Mon, 25 May 2026 01:16:25 GMT</pubDate>
            <atom:updated>2026-05-25T11:22:45.322Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why the benchmark you trusted six months ago measures yesterday’s problem — and what eval maintenance actually looks like.</h4><p>A familiar pattern shows up across production AI systems. A team builds an evaluation set during launch, validates the system against it, ships, and watches the dashboard hold steady for months. Then a production incident appears that the benchmark never caught.</p><p>The benchmark didn’t fail. It was measuring an earlier version of reality.</p><p>Evaluation sets are not abstract measurements. They are operational artifacts. They are artifacts — and artifacts age. They capture what failure looked like the day they were authored. Production failure modes don’t stand still.</p><p>What makes evaluation decay dangerous is that it’s silent. Dashboards remain green while production behavior drifts underneath them. The benchmark remains valid under the conditions it was authored under — and increasingly irrelevant to current ones.</p><p>This piece is about why evaluation sets decay, what they decay into, and what evaluation maintenance actually requires in production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*ZpIzk-U0G91x2OVD1oXFXA.png" /><figcaption><em>Figure 1 — What the benchmark hides: pass rates stay flat while production failure modes grow underneath them. (Image created by author)</em></figcaption></figure><h4>KEY TAKEAWAYS</h4><ul><li>Evaluation sets decay structurally — not because they were authored poorly, but because the environment they were authored against changes continuously</li><li>Four mechanisms drive most evaluation decay: data drift, user adaptation, distribution shift in the world, and emergent failure modes</li><li>The most dangerous evaluation set is not the inaccurate one. It is the one that keeps passing while quietly losing coverage of current production failures</li><li>A useful diagnostic: when did your team last add a test case for a failure mode that did not exist when the eval was originally authored?</li><li>A passing benchmark is not evidence that the system is working. It is evidence that the system is working against yesterday’s questions.</li></ul><h3>WHY EVALUATION SETS FEEL PERMANENT WHEN THEY AREN’T</h3><p>Teams treat evaluation sets as fixed assets because evaluation creation usually happens as a discrete engineering project. During a launch sprint, someone authors a benchmark, samples representative examples, defines labels, validates scoring logic, and operationalizes reporting. The eval has a clear creation moment, a clear owner, and a visible engineering cost.</p><p>Once deployed, it quietly transitions into an assumed-correct state.</p><p>Over time, the benchmark stops being treated as one sample of reality and starts being treated as reality itself. Passing tests raises organizational confidence. Stable metrics become proxies for system reliability. Green dashboards acquire institutional authority.</p><p>But the deeper issue is structural: evaluation decay produces none of the signals teams are wired to act on. Latency spikes trigger pages. Services emit error codes. Pipelines fail loud assertions. Evaluation decay does none of these things. There is no automatic alert telling you that the benchmark itself is becoming outdated.</p><p>It simply keeps passing while production moves away from it.</p><p>The asymmetry is the real problem. Teams receive continuous reinforcement that the system is healthy precisely because the benchmark has stopped exercising the system against current production conditions.</p><blockquote><strong>The most dangerous evaluation set is the one that has been passing for six months.</strong></blockquote><h3>THE FOUR MECHANISMS OF EVALUATION DECAY</h3><h4>1. Data drift</h4><p>The most familiar decay mechanism is distribution drift in production inputs. The queries users send today are usually not the queries they sent six months ago. New customer segments arrive. Product launches create new interaction patterns. Business priorities shift. Workflows emerge organically through usage.</p><p>The evaluation set, meanwhile, samples a historical moment.</p><p>The gap between what the benchmark measures and what production actually experiences widens gradually enough that aggregate metrics conceal it.</p><p>Offline accuracy can hold steady while failure concentration grows in regions of the input space that the benchmark no longer represents.</p><p>This becomes acute in any system exposed to large-scale user interaction. Recommendation systems, retrieval systems, conversational interfaces, and agentic workflows all run on continuously evolving distributions. Static evaluation sets assume stability where none exists.</p><p>The subtle version is just as damaging: old inputs become overrepresented relative to current usage. Benchmarks accumulate historical assumptions about what “normal” usage looks like long after production has moved on. The longer an eval remains static, the more heavily it is weighted toward historical traffic relative to current production behavior</p><blockquote><strong>If you don’t refresh the eval against current production data, you are measuring a system against a customer base that no longer exists.</strong></blockquote><h4>2. User adaptation</h4><p>One of the most underappreciated decay mechanisms is behavioral adaptation by users themselves.</p><p>Users learn systems. They discover which prompts work, which workflows fail, which phrasing produces better outputs, and which interaction patterns get ignored. Over time, their behavior changes in response to what the system rewards and punishes. That adaptation fundamentally alters the population generating production inputs.</p><p>A conversational AI assistant may initially receive broad, exploratory prompts from inexperienced users. Six months later, experienced users may employ compressed, domain-specific shorthand that simply didn’t exist during launch evaluation. Recommendation system users may become increasingly strategic in how they interact with ranking systems, shifting click behavior, search behavior, and engagement patterns.</p><p>Internally, dashboards may appear unchanged. Aggregate metrics can remain stable while the underlying generating process evolves substantially. From inside the system, operational behavior looks continuous. From the outside, the population producing that behavior may have changed dramatically.</p><p>Most evaluation strategies implicitly assume stationary users. In practice, production users are dynamic participants who co-evolve with the system.</p><blockquote><strong>If you don’t account for user adaptation, your evaluation set is measuring how a system behaves against users who no longer exist.</strong></blockquote><h4>3. Distribution shift in the world</h4><p>Sometimes the production environment changes even when neither the users nor the model do. The world itself shifts.</p><p>Product catalogs evolve. Policies change. Terminology updates. Regulatory frameworks move. Knowledge bases are revised. Organizational structures change. Entire categories of information become obsolete or get redefined.</p><p>Evaluation cases authored against an earlier state of the world become factually incorrect over time. A retrieval pipeline evaluated against last year’s documentation fails because the underlying source documents changed. A customer support classifier routes correctly against historical policy definitions while misrouting against updated procedures. A recommendation system optimizes against outdated inventory assumptions.</p><p>Teams often discover the problem only after a customer reports an “obviously incorrect” answer that turns out to be correct relative to the older knowledge base the eval was authored against. The benchmark didn’t fail. It became stale.</p><p>This creates a versioning problem most teams handle poorly. Evaluation sets are usually versioned as datasets, but not versioned against the state of the world they assume. As a result, teams lose the ability to determine whether benchmark degradation reflects model failure or environmental change. Operationally, that distinction matters: one requires retraining or architectural change. The other requires evaluation and maintenance.</p><blockquote><strong>If you don’t version the eval against the state of the world it was authored under, you are measuring a system against a knowledge base that no longer reflects reality.</strong></blockquote><h3>4. Emergent failure modes</h3><p>The final decay mechanism is the most operationally dangerous: systems begin failing in entirely new ways.</p><p>The benchmark was authored when failure mode X existed. Since then, the model was upgraded, prompts were modified, routing logic changed, tools were added, orchestration policies evolved, or the architecture became more agentic and multi-step. Failure mode Y now exists instead. But Y is absent from the evaluation set.</p><p>This is particularly important in agentic systems, where architectural complexity continuously introduces new coordination failures, reasoning inconsistencies, state-management issues, and tool interaction errors.</p><p>Every modification to orchestration logic changes the space of possible failures — and benchmarks continue testing for historical failure patterns while production systems generate entirely new categories of behavior.</p><p>The result is a dangerous illusion of robustness. Regression tests pass because the benchmark still covers yesterday’s bugs extremely well. Meanwhile, new categories of failure emerge completely outside its observational boundary.</p><p>These compounds. Organizations tend to preserve old test cases indefinitely while adding a few new ones.</p><p>Over time, the benchmark transforms into an archive of historical incidents rather than an active defense against current production risk. In agentic architectures, evaluation decay accelerates because every new tool, routing layer, memory policy, or orchestration strategy expands the failure surface.</p><blockquote><strong>A benchmark that never gets new cases for new failure modes is not a defense against tomorrow’s bugs. It is an archive of yesterday’s.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*CfaT9H3H_o-3P3vkVDYMFg.png" /><figcaption><em>Figure 2 — Four mechanisms quietly erode the alignment between your eval set and production reality (Image created by author)</em></figcaption></figure><h3>A CONCRETE PRODUCTION SCENARIO</h3><p>Consider a customer-facing retrieval and classification system launched with a carefully constructed 500-case evaluation set. At launch, the benchmark looked comprehensive — known failure categories, representative customer queries, edge cases, escalation scenarios. Nothing in the dashboard indicated the benchmark itself had lost coverage.</p><p>Six months later, the benchmark still reports a stable 94% pass rate. Operational dashboards, therefore, suggest the system is healthy.</p><p>Meanwhile, customer support tickets have climbed steadily. Internal reviewers report degraded retrieval quality. Escalations involving incorrect routing are rising.</p><p>The numbers below are illustrative — designed to make the decay mechanisms concrete, not to benchmark any specific system. The shape of the audit, not the specific figures, is the point.</p><p>An audit against current production reveals three issues.</p><p>First, roughly 18% of the original evaluation cases are now stale. Some reference products that no longer exist. Other test workflows were deprecated during later platform releases. Several cases assume policy definitions superseded months earlier.</p><p>Second, approximately 12% of recent production failures involve user query patterns absent from the benchmark entirely. Users learned how to interact with the system in more compressed and domain-specific ways than the launch eval anticipated.</p><p>Third, the organization upgraded the underlying model three months earlier and added no evaluation cases targeting the new architecture’s failure characteristics. The benchmark is therefore measuring regression relative to historical behaviors rather than coverage of newly introduced risks.</p><p>The evaluation set is not broken. It is faithfully measuring the system that existed six months ago.</p><p>That distinction matters because many organizations interpret stable evaluation metrics as evidence that the production environment itself is stable. In reality, the benchmark may simply have lost enough overlap with current conditions that it can no longer detect modern failures.</p><blockquote><strong>The green dashboard isn’t evidence of reliability. It’s evidence of historical alignment between the benchmark and an earlier production state.</strong></blockquote><p><strong>QUICK DIAGNOSTIC</strong></p><p>If your team:</p><ul><li><em>hasn’t added new test cases to the evaluation set in the last month</em></li><li><em>can’t estimate how much of the eval still reflects current production</em></li><li><em>tracks the evaluation pass rate but not the evaluation coverage of recent production failures</em></li></ul><p><strong>The evaluation set is almost certainly decaying — and the green dashboard is probably hiding it.</strong></p><h3>WHAT EVALUATION MAINTENANCE ACTUALLY LOOKS LIKE</h3><p>The operational implication is straightforward: evaluation sets are production assets and must be maintained like production assets — with schedules, owners, versioning, and explicit workflows.</p><h4>Continuous sampling refresh</h4><p>At regular intervals — quarterly at minimum in most production systems — sample new cases directly from current production traffic. Incorporate them into the benchmark after review and labeling. Without a systematic refresh, the benchmark progressively diverges from actual usage.</p><h4>Coverage auditing</h4><p>Most teams know whether their eval is passing. <strong><em>Very few know whether their eval would have caught last month’s production failures. </em></strong>That is the only question that actually measures whether the eval is doing its job.</p><p>Tracking accuracy without tracking coverage is the central failure mode here. A passing eval that doesn’t cover current failures is producing organizational confidence that the system has not earned. Coverage, not accuracy, determines whether the evaluation infrastructure remains useful.</p><h4>Sunsetting obsolete cases</h4><p>Teams continuously add tests but rarely remove outdated ones. Over time, stale cases distort benchmark metrics toward historical conditions that no longer matter. Evaluation sets need periodic pruning, just like any other production dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*HkeovlJyHmRe9sRVETLPMQ.png" /><figcaption><em>Figure 3 — A quarterly cycle that keeps the benchmark aligned with the system it claims to evaluate (Image created by author)</em></figcaption></figure><p>These processes imply a broader shift in mindset. Evaluation should not be treated as a static certification artifact completed during launch. It should be treated as a continuously evolving observability layer for production behavior — especially in systems involving user interaction, evolving knowledge environments, or rapidly changing architectures.</p><p>This is the same conversation as the cost piece, asked at the evaluation level. Evaluation overhead was the fifth category in that cost taxonomy. The work described here is what that category actually buys you.</p><blockquote><strong>An evaluation set that doesn’t change is an evaluation set that has stopped working.</strong></blockquote><h3>WHEN STATIC EVALUATIONS ARE ACTUALLY FINE</h3><p>Static evaluations measure models. Living evaluations measure systems operating in production. Most organizations need both — and currently maintain only one.</p><p>Not every benchmark requires continuous refresh. Some evaluation tasks are genuinely stable and benefit from static datasets. Mathematical reasoning benchmarks, code correctness suites, and fixed factual datasets with durable answers can function effectively as long-lived regression tests. In those contexts, the goal is to measure model capabilities rather than production adaptation.</p><p>Some evaluation suites are explicitly designed to detect regressions under controlled conditions. Their value derives precisely from being stable over time.</p><p>The distinction isn’t whether static evaluation is inherently flawed. The distinction is what the evaluation is meant to measure. Static evaluations work well when the task is fixed, the underlying concepts are stable, and the objective is controlled capability comparison.</p><p>Living evaluations are necessary when users interact continuously with the system, the environment changes, or the architecture itself evolves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*FvBtP-oaEiqLzgLJQLj_uQ.png" /><figcaption><em>Figure 4 — Two kinds of evaluation, both necessary. Most organizations need both. Most currently maintain only one. (Image created by author)</em></figcaption></figure><h3>FINAL THOUGHT</h3><p>Evaluation sets are usually discussed as though they are objective measurements. In practice, they are historical artifacts created under specific assumptions about users, environments, architectures, and failure modes. Those assumptions age.</p><p>The organizations that recognize this early treat evaluation maintenance as continuous engineering work rather than a one-time setup. They refresh cases, audit coverage, version assumptions, and retire obsolete tests. Most importantly, they understand that stable benchmark metrics do not imply stable production systems.</p><p>The organizations that fail to recognize this usually find out through production incidents.</p><p>A passing benchmark tells you the system has not regressed against yesterday’s questions. It tells you almost nothing about whether the system is working today.</p><blockquote><strong>The benchmark stayed green because the benchmark stopped looking at where the failures moved</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09eb07ffa94c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/evaluation-sets-have-a-half-life-most-teams-pretend-they-dont-09eb07ffa94c">Evaluation Sets Have a Half-Life. Most Teams Pretend They Don’t.</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Agent’s Memory Is Not What You Think It Is]]></title>
            <link>https://medium.com/data-science-collective/your-agents-memory-is-not-what-you-think-it-is-675995e0238e?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/675995e0238e</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Mon, 18 May 2026 22:00:21 GMT</pubDate>
            <atom:updated>2026-05-18T22:00:21.834Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong><em>The three things teams call “memory” that are not — and why mislabeling them breaks production agents in different ways.</em></strong></h3><p>A familiar conversation now appears across production agent teams. A stakeholder asks, “Can the agent remember the user?” An engineer answers yes.</p><p>Both leave the meeting believing they agreed on something important. In reality, they were describing two entirely different systems.</p><p>The stakeholder often means durable persistence across sessions, workflows, or time. The engineer may mean conversation history injected into the current prompt window, temporary workflow variables, or retrieval from a vector store. Both are using the word memory. Neither has established what the word actually refers to.</p><p>This ambiguity becomes expensive quickly.</p><p>Production incidents get filed as “memory bugs” when the underlying failure may have originated in prompt assembly, session state, retrieval infrastructure, orchestration logic, or durable storage. Engineers investigate different layers simultaneously because the system itself never distinguished clearly what was supposed to persist, for how long, or under what guarantees.</p><p>The problem is therefore conceptual before it is architectural.</p><blockquote><strong>Most agent memory failures are not memory failures. They are the failure to distinguish memory from the two things that look like it.</strong></blockquote><p>This matters because modern agent systems increasingly operate across long-running workflows, multi-step orchestration pipelines, persistent personalization layers, and evolving user interactions. Once systems persist information across time, the difference between temporary visibility and durable memory stops being semantic. It becomes operational infrastructure.</p><p>This piece is about the three things teams call memory, why each one fails differently, and what to call them so the failures become debuggable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*u3GNeA1vowcnBCI-fGZ5gg.png" /><figcaption><strong>FIGURE 1 — </strong><em>Three persistence boundaries — context lives inside one call, state lives inside one task, memory lives across both</em></figcaption></figure><h4><strong>KEY TAKEAWAYS</strong></h4><ul><li>“Memory” is the most overloaded word in modern agent systems — and one of the most expensive to mislabel</li><li>Three distinct properties routinely collapse into one term: context, state, and memory</li><li>Each layer has different persistence guarantees, different cost structures, and different failure modes</li><li>A team that cannot distinguish which layer it is operating on cannot reliably debug failures in any of them</li><li>The architecture question is downstream of the vocabulary question. Systems become debuggable only after the persistence layers become nameable.</li></ul><h3><strong>THE COST OF VOCABULARY COLLAPSE</strong></h3><p>The operational consequences appear long before teams realize they have a taxonomy problem.</p><p><strong><em>The first consequence is infrastructural misalignment. </em></strong>Teams that call context “memory” reach for vector databases when what they actually need is bounded session state. Teams that call state “memory” persist workflow artifacts that should disappear at task completion. Teams that call memory “context” continuously append durable user information into prompts, paying growing token costs for data that should have lived in structured storage.</p><p>The result is not merely inefficiency. It is architectural confusion. Systems begin solving persistence problems with infrastructure optimized for entirely different guarantees.</p><p><strong><em>The second consequence is debugging fragmentation. </em></strong>A user reports: “The agent forgot what I told it.” One engineer inspects retrieval quality. Another inspection session state management. A third investigates prompt assembly and truncation logic. All three believe they are debugging a memory issue. Two of them are working on the wrong layer.</p><p>The system eventually gets fixed either accidentally or through prolonged cross-layer investigation because the architecture never established a shared vocabulary describing where persistence was actually supposed to occur.</p><p><strong><em>The third consequence is expectation failure.</em> </strong>Stakeholders hear “the agent has memory” and assume durability — across sessions, across workflows, across deployments, and sometimes across users. What they receive instead is prompt-bound context that disappears once the conversation ends or the token window truncates earlier information.</p><p>The mismatch between implied persistence and actual persistence erodes trust rapidly because the system appears inconsistent in ways users cannot predict.</p><p>All three of these failures get filed under the same label: memory bugs. None of them are memory bugs. They are the predictable consequences of three different persistence properties living under one word.</p><p><strong>QUICK DIAGNOSTIC</strong></p><p>If your team:</p><ul><li><em>uses “memory” to describe anything that exists only inside a prompt</em></li><li><em>cannot identify which layer owns a given piece of user information</em></li><li><em>debugs “memory bugs” primarily through prompt modification</em></li></ul><blockquote><strong><em>The problem is probably not in your memory layer. It is in the vocabulary that it is named. The next section is about why.</em></strong></blockquote><h3><strong>THE THREE THINGS TEAMS CALL MEMORY</strong></h3><h4>1. Context</h4><p>Context is information available to the model right now.</p><p>Everything inside the active prompt window belongs to this category: the system prompt, recent conversation turns, retrieved documents, tool outputs, temporary instructions, and intermediate reasoning traces assembled for the current invocation.</p><p>Teams call this memory because it persists within the current interaction. A multi-turn conversation appears, from the user’s perspective, to demonstrate continuity. The system references earlier dialogue, follows prior instructions, and maintains apparent awareness of earlier events.</p><p>In practice, however, the “memory” does not persist anywhere durable. The conversation history is reconstructed at every call from logs, retrieval systems, or orchestration layers and then reassembled into the prompt window. The model itself retains nothing across invocations unless external infrastructure rebuilds the context repeatedly.</p><p>This distinction matters because context inherits no persistence guarantees across calls. If prompt assembly changes, retrieval ranking shifts, truncation logic updates, or summarization policies evolve, the reconstructed “memory” changes silently with it.</p><p>The most common failure mode is prompt growth. As interactions lengthen, context windows approach token limits. Older information gets truncated, summarized, compressed, or displaced by newer content. The agent appears to forget previously supplied information, even though the system never possessed durable memory in the first place. It possessed a sliding window of temporary visibility that eventually moved beyond the relevant information.</p><p>This creates one of the defining pathologies of prompt-heavy agent systems: continuity that appears stable in short interactions but degrades unpredictably over long-running workflows.</p><p>The issue is not that the agent forgot. The issue is that context is not memory.</p><blockquote><strong>If you cannot distinguish context from memory, you will rebuild the same conversation differently every call and not know why the system’s behavior drifts.</strong></blockquote><h4>2. State</h4><p>State is information that persists across the steps of a task but remains bounded by the task itself.</p><p>This includes intermediate reasoning artifacts, workflow variables, execution checkpoints, retry metadata, and partially completed plans. Unlike context, state does not need to remain continuously inside the prompt window. It can exist externally inside orchestration systems, workflow engines, caches, or execution stores and then be selectively reintroduced when required.</p><p>Teams call this memory because it survives across multiple calls during a single execution. An agent retries a failed action while retaining the outcome of earlier attempts. A workflow resumes from a previous checkpoint. Intermediate decisions remain available throughout the task lifecycle. From the agent’s perspective, this continuity resembles memory.</p><p>But state possesses fundamentally different persistence guarantees. State is durable within the task and nonexistent outside it unless explicitly persisted elsewhere. Once the workflow completes, the state boundary ends.</p><p>This distinction creates two symmetrical failure modes.</p><p><strong>The first is state leakage. </strong>Information intended only for the current task accidentally survives into future executions because it was persisted in the wrong layer. A support workflow contaminates future interactions with temporary escalation metadata that should have expired.</p><p><strong>The second is state evaporation. </strong>Information that should have survived beyond the workflow disappears because nobody explicitly persisted it before task completion. Users then report that “the agent forgot what we just decided” when the underlying issue is that the task-scoped state terminated correctly but the architecture never promoted the information into durable memory.</p><p>Many modern agent failures are therefore not reasoning failures at all. They are workflow-boundary failures.</p><blockquote><strong>If you cannot distinguish state from memory, you will either leak task-bounded information into the long term or lose information that should have survived the task boundary.</strong></blockquote><h4>3. Memory (the actual thing)</h4><p>Memory is durable persistence across tasks, sessions, users, or time.</p><p>This is the category teams usually mean when they say “the agent should remember me,” “the system should learn my preferences,” or “the workflow should pick up where it left off last week.”</p><p>Memory survives the boundary that defines persistence in every other engineering domain: the boundary of the current execution. If information does not survive that boundary, it is not memory. It is another persistence layer with a memory-like surface.</p><p>This distinction matters because memory inherits the guarantees of the infrastructure storing it.</p><p>Context inherits no persistence across calls. State inherits no persistence across tasks. Memory inherits whatever guarantees the underlying storage system provides: database durability, replication consistency, event sourcing semantics, versioning policies, retention logic, and governance controls.</p><p>This is precisely why memory architecture becomes substantially more difficult than either context management or workflow state.</p><p>The dominant failure mode is treating semantic retrieval as authoritative memory. Many systems store embeddings of interactions, summaries, or user profiles inside vector databases and then describe retrieval from those stores as memory. But vector retrieval is associative rather than authoritative. It retrieves semantically similar information, not necessarily the canonical truth.</p><p>This matters because associative retrieval can surface stale beliefs confidently. A user preference true six months ago may continue ranking highly despite later updates elsewhere in the system of record.</p><p>As argued in earlier work on production memory architecture, durable memory requires governance, provenance, lifecycle management, and explicit authority boundaries. Retrieval alone does not provide these guarantees.</p><p>The consequence is one of the most dangerous forms of production drift: the system remembers confidently but incorrectly.</p><blockquote><strong>If you cannot distinguish memory from semantic retrieval, your agent’s “memory” becomes a confident-sounding guess about what was once true.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*jj6_Vbt47FBSIvvAclBDIQ.png" /><figcaption><strong>FIGURE 2 — </strong><em>Context, state, and memory compared — what each is, where it lives, and what fails when mislabeled</em></figcaption></figure><h4><strong>A PRODUCTION SCENARIO</strong></h4><p>Consider a customer-support agent the organization describes internally as having “memory of the user.”</p><p>In practice, however, several distinct persistence systems are involved simultaneously.</p><p>A customer submits a support request. The system loads the user’s account tier, historical subscription status, and verified preferences from a structured customer database. This is durable memory because the information persists independently of the current interaction.</p><p>The orchestration layer then appends the last ten messages of the current conversation into the prompt window. This is context. Nothing was remembered by the model itself. The system reconstructed recent interaction history and reintroduced it into the current invocation.</p><p>The platform additionally retrieves several recent support tickets associated with the user. These episodic records represent another form of durable memory because they survive independently across time and sessions.</p><p>The retrieval system then surfaces semantically similar historical complaints using embedding similarity search. This feels memory-like but is actually associative retrieval rather than authoritative persistence.</p><p>Meanwhile, the orchestration framework preserves intermediate reasoning artifacts across several retry attempts during escalation routing. This is a workflow state because the information persists only during the current task execution.</p><p><strong>Now consider the user complaint: </strong><em>“The agent forgot what I told it last week.”</em></p><p><strong>Which layer failed?<br></strong>→ The durable memory store?<br>→ The retrieval layer?<br>→ The context assembly pipeline?<br>→ The workflow state system?<br>→ The truncation logic?</p><p>Three or four separate persistence systems may plausibly explain the observed failure. Most organizations begin debugging the wrong layer first because all of them were grouped under the single word memory.</p><blockquote><strong>The agent has multiple persistence mechanisms operating simultaneously. The team has one word for all of them. That is where the bug lives.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*He-ypbxXVfPd3FlNdcIsqA.png" /><figcaption><strong>FIGURE 3 — </strong><em>Five persistence mechanisms map onto three properties — bridging the published memory architecture stack with the vocabulary that names it</em></figcaption></figure><h3><strong>WHAT CHANGES WHEN THE VOCABULARY IS CORRECT</strong></h3><p>Once the persistence layers become distinguishable, several operational problems become substantially easier to solve.</p><p><strong><em>First, debugging becomes shorter. </em></strong>A reported “memory bug” immediately separates into context failures, state failures, and durable memory failures. Each category maps to different infrastructure, different owners, and different observability requirements. Teams stop investigating prompt truncation when the problem originated in workflow state persistence. They stop debugging retrieval ranking when the issue comes from an expired context assembly.</p><p><strong><em>Second, architectural decisions become sharper. </em></strong>Teams stop reaching for vector databases when what they actually require is bounded workflow state. They stop storing durable user information inside prompts. They stop using retrieval systems as authoritative systems of record. The distinction reduces not only architectural confusion but infrastructural overengineering.</p><p><strong><em>Third, stakeholder conversations become substantially cleaner. </em></strong>The question “Can the agent remember the user across sessions?” is operationally different from “Can the agent remember information during this interaction?” Once the persistence layers are named explicitly, the answer becomes immediate rather than requiring prolonged clarification across engineering, product, and infrastructure teams.</p><p><strong><em>Fourth, cost forecasting improves. </em></strong>Context costs scale primarily with conversation length and token expansion. State costs scale with workflow complexity and orchestration persistence. Memory costs scale with user growth, retention policies, and storage infrastructure. Collapsing all three into “memory” conceals which layer is actually driving operational cost growth.</p><p>This is ultimately the same conversation underlying the earlier pieces on agent cost and observability — the architecture only becomes manageable once the system’s persistence semantics become nameable.</p><blockquote><strong>The memory architecture is what teams build. The vocabulary taxonomy is how teams reason about what they built.</strong></blockquote><h3><strong>WHEN THE VOCABULARY COLLAPSE IS HARMLESS</strong></h3><p>For prototypes, demos, and small experimental systems, the vocabulary collapse is usually harmless.</p><p>A solo developer building a side project does not necessarily need a formal distinction between context, state, and durable memory. They implemented all three systems themselves and already understand implicitly which persistence mechanism governs which behavior.</p><p>The cost appears once systems become collaborative.</p><p>The moment multiple engineers work on the same agent architecture, “memory” begins acquiring multiple competing definitions simultaneously. One engineer uses the term to describe prompt assembly. Another means workflow persistence. A third means durable user profiles stored externally.</p><p>At that point, debugging cost begins to compound with organizational scale.</p><p>Every new engineer onboarding to the system inherits whichever definition happened to be taught first. Architectural misunderstandings become embedded directly into operational discussions, incident reports, infrastructure choices, and stakeholder expectations. At the production scale, the ambiguity becomes structural rather than semantic.</p><p>Vocabulary debt behaves similarly to technical debt. It appears inexpensive until the organization becomes large enough that nobody is using the same word to describe the same system anymore.</p><h3><strong>FINAL THOUGHT</strong></h3><p>Memory is now one of the most overloaded words in modern agent systems. Waiting will not make the ambiguity smaller.</p><p>The organizations building reliable production agents are not necessarily the ones with the most sophisticated persistence architectures. Increasingly, they are the ones whose engineers all mean the same thing when they use the word memory.</p><p>The vocabulary problem precedes the architecture problem. Skipping it does not eliminate the cost. It merely postpones the moment the organization discovers that different teams were debugging different systems while believing they were discussing the same one.</p><blockquote><strong>The agent did not forget. The team called three different things memory, and the failure happened in the one nobody was watching.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=675995e0238e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/your-agents-memory-is-not-what-you-think-it-is-675995e0238e">Your Agent’s Memory Is Not What You Think It Is</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your RAG Is a Retrieval System. That’s Not the Same as an Agent.]]></title>
            <link>https://medium.com/data-science-collective/your-rag-is-a-retrieval-system-thats-not-the-same-as-an-agent-ab58697cadf1?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab58697cadf1</guid>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[agentic]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 16:28:52 GMT</pubDate>
            <atom:updated>2026-04-21T16:28:52.750Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>The four properties that separate retrieval from agency — and why the distinction matters in production.</em></strong></p><p>Most systems described as agents today are retrieval pipelines with a language model on top. The distinction is not semantic. It shapes how they fail in production.</p><p>Every team building with large language models eventually says the same thing: “We’re building an agent.” Sometimes they are. Often, they’re not.</p><p>What they have is a retrieval system: documents go in, relevant context comes out, and an LLM synthesizes an answer.</p><p>It looks intelligent. It behaves responsively. It may even call tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*Gd0EWomAl5vpXjJsGgjilw.png" /><figcaption><strong>Figure 1 — Retrieval systems execute fixed pipelines. Agentic systems execute decisions. The system boundary shifts from input–output mapping to stepwise decision-making under uncertainty. Image created by author.</strong></figcaption></figure><p>And yet, when these systems fail in production, the failures look nothing like what teams expect from agents. There is no planning breakdown. No multi-step coordination issue. No reasoning failure that a better model could solve.</p><p>Instead, the failures are simpler — and harder to diagnose precisely because they are misclassified. Answers drift when retrieval degrades. Latency spikes under load with no clear cause.</p><p>Outputs feel inconsistent across sessions. Debugging collapses into prompt tuning and guesswork.</p><p>The system behaves exactly like what it is: a retrieval pipeline with a language model on top.</p><p>The distinction matters. Not because the words are wrong — because the words determine how you build, evaluate, and operate the system.</p><h4><strong>KEY TAKEAWAYS</strong></h4><ul><li>RAG is a retrieval pattern, not an architectural class — and calling it an agent does not give it agent properties</li><li>Four operational properties distinguish retrieval from agency: decision logic, state, tool reasoning, and uncertainty routing</li><li>Most “agentic RAG” systems have zero or one of the four</li><li>Misclassification costs real engineering time — in debugging, infrastructure choices, and stakeholder trust</li><li>The goal is not to build agents everywhere. The goal is to know when you haven’t.</li></ul><h3><strong>THE REAL COST OF MISCLASSIFICATION</strong></h3><p>Before the taxonomy, the consequences. This is where calling retrieval agentic actually costs teams.</p><p><strong><em>You debug the wrong problem.</em> </strong>A retrieval failure gets treated as a reasoning failure. Teams tweak prompts, swap models, and add reflection loops. The actual issue is retrieval quality, indexing coverage, or inconsistent chunking. Meanwhile, reported “inconsistency across sessions” often isn’t the model learning — it’s slightly different retrieved context each time, producing different synthesis. Teams chase reasoning improvements while the retrieval layer quietly degrades.</p><p><strong><em>You build the wrong infrastructure</em>. </strong>Agent systems require trace graphs, state stores, decision logs, and uncertainty propagation. Retrieval systems require indexing pipelines, relevance tuning, and retrieval evaluation. When the labels get mixed, teams install agent orchestration frameworks on systems that would run simpler and more reliably as straight RAG — paying the latency, complexity, and operational cost of agentic infrastructure without getting agentic capability in return.</p><p><strong><em>You set the wrong expectations.</em> </strong>Stakeholders hear “agent” and expect adaptive reasoning, graceful handling of ambiguity, clarifying questions when inputs are unclear. What they get is pattern matching over retrieved context. The gap between expectation and reality erodes trust in the system — and in the team that built it. The system underdelivers on capabilities it was never architected to have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*sQSIMdIdSIQFv5rgsy7a6w.png" /><figcaption><strong>Figure 2 — Misclassification shifts debugging to the wrong layer. Retrieval failures are treated as reasoning failures, leading to ineffective fixes. Image created by author.</strong></figcaption></figure><p>Each of these costs shows up in ways that look like bugs.</p><p><strong><em>They are not bugs. They are the predictable consequences of architectural mislabeling.</em></strong></p><h3><strong>THE MISCLASSIFICATION PROBLEM</strong></h3><p>The industry has converged on a loose spectrum: <strong><em>Prompt → RAG → Agent</em></strong></p><p>It suggests a progression — prompts are simple, RAG adds grounding, agents add autonomy. The framing is intuitive, and it is also incomplete.</p><p>The problem is that it describes systems by what they do, not what properties they have. Behavior is misleading. A RAG system that calls a search API looks like it is using tools. A multi-step prompt chain looks like planning. A session-aware chatbot looks stateful.</p><p>Behavior alone cannot distinguish a system that genuinely reasons over these capabilities from one that is only performing a fixed sequence that happens to include them.</p><p>What we need is a way to describe systems by what they are, not what they resemble.</p><h3><strong>THE FOUR PROPERTIES THAT ACTUALLY DEFINE AGENTS</strong></h3><p>Four operational properties separate retrieval systems from agents. Not behaviors. Not features. Properties that determine how the system operates.</p><p>These four properties are not exhaustive, but they are the minimum operational conditions under which “agent” becomes a useful systems description rather than a marketing label.</p><h4>1. Decision logic</h4><p>A retrieval system does not decide what to do next. It executes a fixed flow: retrieve, synthesize, return. An agent evaluates. It chooses whether to call a tool, whether to ask a clarifying question, or whether to defer or stop. That decision is not hardcoded — it is part of the system’s runtime behavior.</p><p><strong><em>If you cannot decide what to do next, you cannot adapt when the context is incomplete. You will produce a confident answer where you should have asked a question.</em></strong></p><h4>2. State</h4><p>Retrieval systems are effectively stateless beyond the current query. Even with session memory, state is typically appended to the prompt — not actively managed, not used to drive future decisions. Agents operate over evolving state: working memory, intermediate outputs, prior decisions. The state shapes what the system does next.</p><p><strong><em>If you cannot track state evolution, you cannot explain why the same question produces different answers across sessions. Inconsistency accumulates silently, and there is no trail to follow back to its source.</em></strong></p><h4>3. Tool reasoning</h4><p>RAG systems can call tools. That does not make them agents. The difference is reasoning about tool use — when to call, which tool to call, how to interpret the result, whether to retry or switch. In retrieval systems, tool use is typically deterministic and pre-wired. In agents, tools are part of the decision space.</p><p><strong><em>If you cannot reason about tool selection, you cannot distinguish an API failure from a reasoning failure. Both look like the system “just got it wrong.”</em></strong></p><h4>4. Uncertainty routing</h4><p>This is the most overlooked property — and the most consequential.</p><p>Retrieval systems do not route based on uncertainty. They retrieve, answer, and return — with the same path regardless of how ambiguous the input was or how confident the retrieval step was. Agents incorporate uncertainty into execution: low confidence triggers clarification, ambiguous context triggers alternative exploration, and high-risk decisions trigger escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*C7u8heRUUQx-TodIeJBLuA.png" /><figcaption><strong>Figure 3 — In retrieval systems, uncertainty collapses into a single output. In agentic systems, uncertainty is propagated and shapes execution. Image created by author.</strong></figcaption></figure><p>In production, this is where most “hallucination” complaints originate — not from generation, but from unmodeled uncertainty in retrieval. A confident-sounding answer built on weak retrieval is indistinguishable, at the output layer, from a confident answer built on strong retrieval. The system cannot flag the difference because it does not track the difference.</p><p><strong><em>If you cannot route on uncertainty, you cannot know when the system doesn’t know. A low-confidence retrieval becomes a confident-sounding answer — and the user has no way to tell the difference.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*WkqSte05eagQF_xqpKr1kg.png" /><figcaption><strong>Figure 4 — Four operational properties distinguish retrieval from agency. When these properties are absent, specific and predictable failure modes appear in production. Image created by author.</strong></figcaption></figure><h3><strong>A CONCRETE SCENARIO, SCORED</strong></h3><p>Consider a customer support assistant that retrieves from roughly 20 knowledge sources, reranks results, and generates a response. The team calls it agentic.</p><p>A user asks: <strong><em>“Why was I charged twice last month?”</em></strong></p><p>The system retrieves billing documents, passes them to the LLM, and generates a response. If retrieval is clean, the answer is correct. If retrieval surfaces the wrong invoice, the answer is confidently wrong. And the system has no mechanism to recognize that it should not answer.</p><p>Score it against the four properties:</p><ul><li><strong>Decision logic: </strong>No. The system always retrieves and synthesizes. It never decides to do something else.</li><li><strong>State: </strong>No. Each query is handled independently. Session memory is appended to the prompt but not actively reasoned over.</li><li><strong>Tool reasoning: </strong>No. One retriever, always invoked the same way.</li><li><strong>Uncertainty routing: </strong>No. Low-confidence retrieval produces a confident answer — the same path every time.</li></ul><p><strong>Score: 0/4. </strong>This is a retrieval pipeline. The score is not a quality judgment. It is an architectural one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*SNSlMWqxLwEN2J-SJ81gyA.png" /><figcaption><strong>Figure 5 — Scoring systems against operational properties reveals architecture, not quality. A system can perform well and still not be agentic. Image created by author</strong></figcaption></figure><p>In production, the numbers reinforce the point. Retrieval precision@5 sits around 0.71. Answer consistency across identical queries measures 88% — meaning 12% of repeat queries get materially different answers, driven almost entirely by retrieval variance, not model reasoning. (Numbers illustrative.)</p><p>Now imagine a system designed with the four properties in mind. It would not need to be perfect. It would only need to behave differently when the retrieval signal is weak — noticing two charges on the account but only one matching invoice, recognizing the ambiguity, and asking: <em>“Are you referring to the May 12 charge or the May 15 charge?”</em> The user answers. The system carries the clarification forward as state, routes to a different retriever if needed, and generates a grounded response.</p><p>This version is not magic. It has its own failure modes: it might ask clarifying questions too often, misinterpret the user’s answer, or still retrieve the wrong context after clarifying. The difference is that it can <em>fail differently</em> — and the failures are now attributable to specific properties the team can measure and improve.</p><p>Same surface interaction. Fundamentally different system underneath.</p><h4><strong>QUICK DIAGNOSTIC</strong></h4><p>If your system:</p><ul><li><em>always follows the same retrieval-to-answer path</em></li><li><em>never asks clarifying questions when the evidence is weak</em></li><li><em>behaves the same way regardless of ambiguity</em></li></ul><p><strong><em>It is not an agent.</em></strong></p><h3><strong>WHEN RAG IS ACTUALLY THE RIGHT ANSWER</strong></h3><p>This is the part most arguments about agents skip. It is also the most important.</p><p>Not every system should be an agent. Most should not.</p><p>RAG is the right choice when the task is single-step, the context is sufficient, and the user’s query maps to a predictable retrieve-and-synthesize path. Knowledge base search. Document summarization. FAQ answering. Policy lookup. These use cases do not need — and actively suffer from — agent complexity.</p><p>Agents add latency. They add failure modes. They add infrastructure surface. They introduce non-determinism where determinism was a feature. If the task does not require decisions, state, tool selection, or uncertainty-aware routing, then adding them is not sophistication — it is overhead.</p><p>In many production settings, the best system is not the most autonomous one. It is the one whose behavior is easiest to predict, evaluate, and maintain.</p><p>The signals that a system genuinely needs agency: the task requires sequential decisions that depend on intermediate results, it benefits from state carried between steps, it requires meaningful tool selection rather than a single fixed call, and it needs to handle uncertainty differently depending on confidence.</p><p>The signal that it doesn’t: the user’s query maps to a single retrieval plus generation path, and the system works fine without modeling any of the four properties above.</p><p>When in doubt, ask one question:</p><blockquote><strong><em>Does this system decide what to do next, or does it always do the same thing?</em></strong></blockquote><p>If the answer is “it always retrieves and answers” — it’s RAG. If the answer is “it chooses actions dynamically based on what just happened” — it’s an agent. Everything in between is worth describing precisely rather than folding into the agent label.</p><p><strong>FINAL THOUGHT</strong></p><p>The language of AI systems is moving faster than the systems themselves. “Agent” has become a default label for anything that feels responsive, interactive, or multi-step. The word is doing a lot of work it was not built to do.</p><p>But systems do not become agents because we call them that. They become agents when they exhibit decision logic, state, tool reasoning, and uncertainty routing — properties that determine what the system can and cannot do in production.</p><p>The goal is not to build agents everywhere. The goal is to know when you haven’t.</p><blockquote><strong><em>Systems do not become agents because we call them that. They become agents when they make decisions over state, tools, and uncertainty. Until then, they are retrieval pipelines — and treating them as anything else makes them harder to debug, harder to scale, and harder to trust.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab58697cadf1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/your-rag-is-a-retrieval-system-thats-not-the-same-as-an-agent-ab58697cadf1">Your RAG Is a Retrieval System. That’s Not the Same as an Agent.</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Can’t Debug an Agent You Can’t Observe]]></title>
            <link>https://medium.com/data-science-collective/you-cant-debug-an-agent-you-can-t-observe-dd059f483b70?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd059f483b70</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm-observability]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 01:41:30 GMT</pubDate>
            <atom:updated>2026-04-21T01:41:30.403Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Why modern MLOps tooling misses reasoning traces, uncertainty propagation, and multi-step failure — and what comes next.</em></strong></p><p>Every MLOps observability tool in common use today was built for a system that no longer exists.</p><p>The assumption was simple: a model maps inputs to outputs, and observability means watching that mapping. Log the features. Log the predictions. Track drift, latency, and accuracy. When something breaks, find what changed.</p><p>That abstraction worked when models were the system.</p><p>It breaks when the system is an agent.</p><p>Agentic AI systems do not map inputs to outputs. They execute sequences of decisions under uncertainty — planning across multiple steps, invoking external tools, maintaining state, and producing outcomes shaped as much by intermediate choices as by final predictions.</p><p>Observing only the endpoints misses the system entirely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*onN2LwMiHbQoUxoB2We70g.png" /><figcaption>Figure 1 — Single-model observability treats the model as the system boundary. Agents require modeling decisions, state, tools, and uncertainty — all evolving across steps. Image created by author.</figcaption></figure><p>This is not a configuration gap. It is a mismatch between what the system does and what the tools were designed to represent. The three platforms examined here — MLflow, Weights &amp; Biases, and Vertex AI Pipelines — are each genuinely strong within their intended domain. They also each fail in the same way when applied to agents.</p><h4><strong>KEY TAKEAWAYS</strong></h4><ul><li>MLOps platforms were built to observe models, not agents — a structural mismatch that configuration cannot fix</li><li>MLflow, W&amp;B, and Vertex AI lack reasoning traces, state evolution, tool lineage, uncertainty propagation, and step-level failure attribution</li><li>Uncertainty is not an output property — it is a trajectory property. When it is not tracked, confident hallucinations follow</li><li>Agent-native observability needs a layered architecture: event logging, state store, trace graph, uncertainty engine, and an execution-semantic interface</li><li>What you cannot represent, you cannot debug. What you cannot debug, you cannot control</li></ul><h3><strong>A CONCRETE SCENARIO: THE RETAIL RECOMMENDER THAT FAILS SILENTLY</strong></h3><p>The rest of this article uses one scenario. It anchors every gap in a real failure mode.</p><h4><strong>THE SYSTEM</strong></h4><p>A real-time recommendation agent for a clothing retailer’s homepage. A customer lands on the site. The agent has a 120ms budget to return a ranked set of products. Its workflow runs four steps:</p><ol><li><strong>Intent classification </strong>— an LLM infers session intent from recent behavior. Output: “occasion-mode: formal wear” with confidence 0.58.</li><li><strong>Candidate retrieval </strong>— a vector store returns 200 candidate items matched to “formal wear.”</li><li><strong>Constraint enforcement </strong>— an inventory service filters out-of-stock and wrong-size items; a margin rule removes low-margin candidates; a vendor cap filters recently shown items.</li><li><strong>Final ranking </strong>— a ranking model orders the remaining candidates for the carousel.</li></ol><p><strong>Fallback: </strong><em>if any step exceeds 120ms or returns fewer than 8 candidates, serve a cached generic layout.</em></p><p><strong>Note: </strong><em>The numbers used throughout this article are illustrative, not drawn from any specific production system.</em></p><p>In production, the numbers tell the story. Roughly 35% of sessions have intent confidence below 0.6. Fallback is triggered in 18% of requests. The scoreboard — click-through rate, latency p95 — stays green. Nothing looks broken. Everything below the surface is.</p><h3><strong>THE AUDIT</strong></h3><h4>MLflow</h4><p>MLflow is excellent at experiment tracking, model versioning, and artifact management. For training pipelines, it remains a sound choice. For the retail agent above, five gaps are structural:</p><ul><li><strong>No reasoning trace capture: </strong>MLflow can log that the classifier returned “formal wear.” It cannot log why. When the recommendation looks wrong, the label is the only thing available to inspect.</li><li><strong>No state evolution tracking: </strong>Between retrieval and constraint enforcement, the candidate set changes. MLflow cannot see that transition. If the set drops from 200 to 6 — triggering the fallback — you cannot tell which rule was responsible without reading raw logs.</li><li><strong>No tool invocation lineage: </strong>The inventory service, vector store, and rule engine are each external dependencies. MLflow cannot represent them as parts of a single execution. If the inventory API returns stale data and drives the fallback, no causal link exists between cause and effect.</li><li><strong>No uncertainty representation: </strong>The classifier returned confidence 0.58. MLflow records the label. The confidence disappears. Every downstream step treats the label as certain.</li><li><strong>No step-level failure attribution: </strong>When this workflow fails — bad recommendation, fallback triggered, cart rate drops — MLflow attributes failure to the run. Not step one’s low confidence, not step three’s aggressive filter. Debugging becomes archaeology.</li></ul><h4>Weights &amp; Biases</h4><p>Weights &amp; Biases is excellent at visualization, experiment comparison, and training diagnostics. Against the retail agent, the gaps are different from MLflow’s — but equally structural:</p><ul><li><strong>Visualization without semantics: </strong>W&amp;B can render the agent’s latency, tool call counts, and fallback rate. It cannot render the reasoning graph. The causal link between step one’s low confidence and step four’s bad ranking has no representation.</li><li><strong>No multi-agent interaction modeling: </strong>Add a second agent — say, a promotion optimizer working alongside the recommender — and W&amp;B has no way to represent their coordination. Which agent sent what to which, and the downstream effect, stays invisible.</li><li><strong>No decision boundary tracking: </strong>Constraint enforcement rejects some candidates and keeps others. Weights &amp; Biases records which ones survived. It cannot say why — the margin rule? inventory? vendor cap? The decision shaping the final recommendation is unobservable.</li><li><strong>No constraint enforcement visibility: </strong>When the margin rule removes 40% of candidates and forces a fallback, Weights &amp; Biases has no place to log that intervention. The gap between what the ranker proposed and what enforcement allowed does not exist in the data model.</li></ul><h4>Vertex AI Pipelines</h4><p>Vertex AI is strong at orchestrating large-scale ML workflows. For the retail agent, the mismatch is architectural: a DAG is not a reasoning graph.</p><ul><li><strong>Pipeline DAGs are not reasoning graphs: </strong>A DAG captures execution order. It cannot capture that step one’s confidence should shape step two’s retrieval, or that step three’s filtering should flow back into step four’s ranking. The reasoning structure and the orchestration diverge.</li><li><strong>LLM calls are opaque nodes: </strong>Vertex AI logs the input and output of the intent classifier. The reasoning between them — why “formal wear” over “casual daywear” — is not observable.</li><li><strong>No uncertainty-aware orchestration: </strong>Vertex AI routes deterministically. There is no way to say: “if intent confidence is below 0.7, retrieve more broadly and ask a clarifying question.” Uncertainty has no place in the orchestration model.</li><li><strong>No cross-step error propagation: </strong>When the recommendation is wrong, Vertex AI localizes failure to the step where it surfaced — usually ranking. But the error often started at step one and rode a low-confidence label through three steps as if it were certain. That cascade is invisible.</li></ul><h3><strong>THE FULL GAP: WHAT ACTUALLY BREAKS</strong></h3><p>The important column is not which tool supports what. It is what fails in production when that capability is missing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*rpn1T0eYcI73tiTVVfU6gQ.png" /><figcaption><em>Figure 2- The capability gap across MLflow, W&amp;B, and Vertex AI — and what it costs in production.</em>Image created by author.</figcaption></figure><p>These are not theoretical concerns. They are the actual shapes of failure that surface in deployed agentic systems — and none of the three platforms can represent any of them.</p><h3><strong>THE GAP NOBODY IS TALKING ABOUT: UNCERTAINTY PROPAGATION</strong></h3><p>Of the missing capabilities, uncertainty propagation gets the least discussion and matters most.</p><p>In a single-model system, uncertainty is a property of an output — a confidence score on a prediction. In an agentic system, it is a property of an execution trajectory. And it compounds across steps.</p><p>Return to the retail scenario. The intent classifier returns “formal wear” at confidence 0.58. Retrieval treats it as certain. Constraint enforcement treats it as certain. Ranking treats it as certain. The user sees a confident recommendation set.</p><p>The original uncertainty — that the agent was roughly 50–50 on what the customer wanted — is invisible four steps later. Remember: 35% of sessions carry intent confidence below 0.6. That is a third of traffic receiving confident answers built on unresolved questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*fUaQmQ7xfR4Wgx4LQYQjRg.png" /><figcaption>Figure 3- <em>How uncertainty collapses across an agent workflow — low confidence at step 1 becomes invisible by step 4. </em>Image created by author.</figcaption></figure><p>This failure mode is hard to diagnose because nothing appears to break. The consequences surface as:</p><ul><li>Confident outputs built on uncertain foundations, with no signal that the answer should be verified</li><li>Routing decisions made without confidence context — no basis for treating a low-confidence result differently</li><li>No confidence trail for debugging — when the output is wrong, no record of where confidence degraded</li><li>Evaluation against final outputs only — metrics tell you the answer was correct, not whether the reasoning was calibrated</li></ul><p>An agent-native observation layer must treat uncertainty as first-class: attached to every intermediate output, propagated explicitly through the execution graph, available to downstream components for conditional routing.</p><p>This is not a research problem. It is a design decision. Every step produces an output and a confidence signal, and the infrastructure carries both forward. That choice simply has not been made yet.</p><h3><strong>SIX THINGS YOUR OBSERVABILITY LAYER MUST DO — AND WHAT FAILS IF IT DOESN’T</strong></h3><p>The missing capabilities translate directly into operational requirements. Each one, stated plainly:</p><ul><li><strong>If you cannot trace reasoning, you cannot explain the decision. </strong>The output is recorded; the logic behind it is lost.</li><li><strong>If you cannot track state evolution, you cannot explain why a correct plan produced a wrong outcome. </strong>Corruption at step two surfaces at step five with no visibility in between.</li><li><strong>If you cannot log tool lineage, you cannot distinguish agent failure from dependency failure. </strong>A stale API read triggers downstream fallbacks that look like agent bugs. You end up debugging the wrong layer.</li><li><strong>If you cannot propagate uncertainty, you cannot know when the agent doesn’t know. </strong>A coin-flip decision passed forward as certain is indistinguishable from a confident one. The system has no basis for escalating or acknowledging ambiguity.</li><li><strong>If you cannot model multi-agent interaction, you cannot attribute coordination failures. </strong>Two agents disagreeing looks like a single-agent bug. The real cause stays hidden.</li><li><strong>If you cannot observe enforcement, you cannot tell whether the agent is improving or the guardrails are doing all the work. </strong>If guardrails silently absorb the same errors forever, the agent never gets the feedback it needs to improve.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*SNtXlBLyXiRFeZUeINWGVQ.png" /><figcaption>Figure 4-<em> Agent-native observability as a layered architecture. </em>Image created by author.</figcaption></figure><p>These requirements suggest a layered architecture: an event logging layer capturing every atomic action with confidence signals attached, a state store maintaining session-level context with point-in-time queries, a trace graph engine building causal dependency graphs, an uncertainty engine propagating confidence through the graph, and an interface designed around agent execution semantics rather than model metrics.</p><p>Tools like Langfuse and Arize Phoenix are beginning to model traces and evaluation — but even these only partially address the full execution graph problem.</p><p>The fact that purpose-built tooling is emerging at all is the clearest signal that the gap the existing platforms leave is real and consequential.</p><h3><strong>FINAL THOUGHT</strong></h3><p>Most teams deploying agents today are not waiting for the right observability infrastructure. They are instrumenting with MLflow, W&amp;B, and Vertex AI — excellent tools for the systems they were designed to observe — and finding the limits when production failures cannot be explained.</p><p><strong><em>The answer is not to abandon these platforms. It is to be precise about what they cannot provide, and build the missing capabilities deliberately</em></strong>.</p><p>Reasoning traces, uncertainty propagation, and step-level attribution need custom instrumentation — not because the existing tools are bad, but because they were built for a different problem.</p><p>The model was the system boundary. State did not persist. Predictions were independent.</p><p>Agents moved every one of those boundaries. The observability infrastructure has not caught up.</p><blockquote><strong><em>We are deploying systems whose failure modes we cannot represent. That is not an observability gap. It is a control failure.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd059f483b70" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/you-cant-debug-an-agent-you-can-t-observe-dd059f483b70">You Can’t Debug an Agent You Can’t Observe</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Human-in-the-Loop Isn’t a Control System — It’s a Checkbox]]></title>
            <link>https://medium.com/data-science-collective/your-human-in-the-loop-isnt-a-control-system-it-s-a-checkbox-e96d544e619f?source=rss-d563b4a7aed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e96d544e619f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Zenefa Rahaman, PhD]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 20:30:46 GMT</pubDate>
            <atom:updated>2026-04-10T09:57:26.305Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Why do most review queues run perfectly while producing nothing</em></h4><p>Ask a team to walk you through their human-in-the-loop setup, and you will get a confident answer. Review queue. SLA targets. Throughput dashboards. Escalation thresholds. Everything documented. Everything monitored. The process is running. Governance is satisfied.</p><p>Then ask one follow-up question:</p><blockquote><strong>What percentage of the outputs your reviewers saw did they actually change?</strong></blockquote><p>Most teams don’t know. The ones that do go quiet. Because the answer is usually somewhere between two and five percent.</p><p>Which means ninety-five percent of what the reviewers touched, they approved without modification. The loop was running. Humans were involved. Almost none of it made any difference.</p><p>This is not a staffing problem. It is not a tooling problem. It is not a prompt engineering problem.</p><p><strong>It is a control systems problem.</strong></p><blockquote><strong>Human-in-the-loop is not a feature you add to a system. It’s an architecture decision. And like most architecture decisions, the cost of getting it wrong compounds quietly over time</strong>.</blockquote><h3><strong>The terminology gives it away</strong></h3><p>Control systems engineering distinguishes between two fundamentally different architectures.</p><p>An <strong>open-loop system</strong> applies an action and moves on. It does not observe outcomes. It does not adjust based on what happened. The action and the result are not connected.</p><p>A <strong>closed-loop system</strong> observes the outcome of every action, compares it to the intended result, computes the error, and feeds that error back to correct the next action.</p><p>The output becomes part of the input.</p><p>Most human-in-the-loop implementations are open-loop systems with a human attached to them.</p><p>A model produces an output. A reviewer sees it. The reviewer approves or corrects. The correction is applied. And then — nothing.</p><p>The correction does not feed into training. The threshold that routed the output does not adjust. The system does not become less wrong over time.</p><p><em>The human acted. The system did not learn. That is not a control mechanism. That is a queue with a person in it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*5h1pt1DY_4VpYgpL410SmA.png" /><figcaption>Figure 1. Open-loop vs closed-loop HITL: the difference isn’t the presence of humans — it’s whether their decisions feed back into the system. Image by author.</figcaption></figure><h3><strong>What open-loop looks like in production</strong></h3><p>This failure mode is not theoretical. It shows up everywhere. A model produces an output. Confidence falls below a threshold. The output is routed to review. The reviewer approves it.</p><p>This happens hundreds of times a day. Nobody asks:</p><ul><li>Why were most of these outputs correct?</li><li>Why were they routed at all?</li><li>What do the few corrected cases have in common?</li><li>Are similar errors happening outside the review boundary?</li></ul><p>The system produces metrics. The metrics look acceptable.</p><p><strong><em>The core question — is human involvement changing outcomes? — is never asked.</em></strong></p><p>Because the system was never designed to answer it. Most HITL implementations were designed to satisfy governance requirements, not to improve model behavior. And governance requirements do not ask whether human intervention changed outcomes. They ask whether humans were involved<em>.</em></p><p><strong><em>Those are not the same question.</em></strong></p><h3><strong>The feedback signal that closes the loop</strong></h3><p>In a real control system, everything revolves around one signal: error.</p><p>In HITL systems, that signal is:</p><p><strong><em>Human Correction Rate (HCR)</em></strong>: The percentage of reviewed outputs that humans actually change</p><p>This number does more work than any dashboard you are currently tracking. A correction rate below five percent means one of two things:</p><ul><li>It is escalating too many correct outputs</li><li>Reviewers have become habituated to approving everything</li></ul><p>A correction rate above forty percent means something else:</p><ul><li>The model is wrong too often</li><li>Using human labor to compensate for a modeling problem</li></ul><p>The useful region lies between — where reviewers meaningfully engage with cases that warrant review.</p><p>But HCR alone is not enough.</p><ul><li><strong>Escalation precision</strong> tells you whether you are sending the right cases</li><li><strong>Missed error rate</strong> tells you what slipped through</li><li><strong>Reviewer agreement</strong> tells you whether the task is even well-defined</li></ul><p>These are not operational metrics. These are <strong>control signals</strong>.<br> Together, these four numbers tell you what the queue and the SLA dashboard cannot: whether the system is working, or whether it is working while failing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*18szlOXr8W1CCOEGsE5duQ.png" /><figcaption>Figure 2. Four control signals that tell you whether your HITL system is working or working while failing. HCR is the primary signal; the other three diagnose why. Image by author</figcaption></figure><h3><strong>The routing logic is not a threshold</strong></h3><p>The most common design mistake is treating confidence as a proxy for risk. <strong><em>It isn’t.</em></strong></p><p>A low-confidence classification on a low-stakes decision is noise. A low-confidence signal on a decision with material downstream consequences is something the model genuinely does not know, in a situation where being wrong matters. The same confidence level. Completely different escalation logic.</p><p>What determines whether human review will change an outcome is a combination of signals:</p><ul><li><strong><em>Confidence </em></strong>— calibrated per decision, not global</li><li><strong><em>Impact</em></strong> — what happens if this is wrong</li><li><strong><em>Constraint exposure</em></strong> — does this touch a rule the model doesn’t fully encode</li><li><strong><em>Distribution shift </em></strong>— is the model operating outside training conditions</li><li><strong><em>Rarity </em></strong>— has the model seen enough examples to generalize</li></ul><p>When multiple signals align, escalation is valuable. When they don’t, escalation is noise.</p><p>A precision-oriented gating system routes fewer outputs to review and finds genuine errors in a higher fraction of them. A threshold-only system routes more outputs and finds errors in fewer.</p><blockquote>The goal is not to catch “bad predictions.” The goal is to catch <strong>decisions where human judgment would change the outcome</strong>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*YCyILS-ZFjLDBEVhZRD3Hg.png" /><figcaption>Figure 3. The five-signal gating decision: escalation is only valuable when multiple conditions converge. A single confidence threshold answers none of these questions. Image by author.</figcaption></figure><h3><strong>Three mechanisms, not one</strong></h3><p>The deeper design problem is that human-in-the-loop gets treated as a single mechanism.</p><p>It is not. It’s three distinct systems.</p><h4><strong>Validation checkpoints</strong></h4><p>Validation checkpoints handle uncertainty. The model is unsure. The input is ambiguous. The pattern is rare.</p><p>The human’s job is epistemic: <strong><em>Given what the model had, is this conclusion defensible?</em></strong></p><p>The feedback path is a labeled correction that becomes training signal.</p><h4><strong>Override checkpoints</strong></h4><p>Override checkpoints handle constraints. The model may be perfectly confident in an output that still cannot be deployed — because it violates a policy, conflicts with a business rule, or creates exposure the model does not represent.</p><p>The human’s job is not to validate. It is to enforce: <strong><em>Should this be allowed?</em></strong></p><p>These are control operators. Treating them like epistemic validators collapses a distinction that matters for everything downstream — routing, measurement, and what you do with the correction signal. These corrections belong in the constraint layer.</p><h4><strong>Audit checkpoints</strong></h4><p>Audit checkpoints handle system behavior and monitor system health.</p><p>A small sample of outputs — one to five percent — reviewed not because those specific outputs are risky, but because aggregate behavior is what reveals:</p><ul><li>drift</li><li>bias</li><li>exposure imbalance</li></ul><p>This is where you see failures that per-request logic will never surface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*zb_x0YNyUuNA66f01rcOag.png" /><figcaption>Figure 4. Validation, Override, and Audit are three structurally different jobs with different triggers, different reviewer tasks, and different feedback paths. One queue handling all three is what produces the 2–5% correction rate. Image by author.</figcaption></figure><h3><strong>The part most systems skip</strong></h3><p>This is where HITL either becomes powerful or useless.</p><p>A reviewer makes a decision. The output is corrected or approved. And then the system moves on.</p><p>A correction that is not logged in structured form is a one-time fix. There is no feedback, no learning.</p><p>The same class of error surfaces tomorrow. The model does not see the labeled example the reviewer just created. The threshold that routed the output does not update based on whether the reviewer found a problem. The constraint that caused the override remains implicit, expressed only in reviewer behavior rather than in system logic.</p><p>A structured decision log changes everything. It turns a review queue into a training signal.</p><p>When a reviewer corrects an output, what gets recorded is not just the correction. That structured record does three things the unstructured approval workflow does not. Each review records:</p><ul><li>Trigger condition</li><li>Human decision</li><li>Correction delta</li></ul><p>From that:</p><ul><li>Training pipelines improve the model, so future model versions see the patterns their predecessors missed.</li><li>Thresholds recalibrate based on real outcomes.</li><li>Repeated overrides become encoded constraints.</li></ul><p>Without that feedback path, HITL is a permanent operational cost.</p><p>With it, the system gets cheaper to operate as the model improves — because precision goes up, volume goes down, and the corrections that do happen generate signal that prevents the same correction from being needed again.</p><blockquote><strong>HITL becomes a learning system.</strong></blockquote><h3><strong>The architecture of a real HITL system</strong></h3><p>This architecture is not a review pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*NKQcUh0-TttZeWj-LLfe_g.png" /><figcaption>Figure 5. A closed-loop HITL system has two feedback paths: corrected examples into the training pipeline, and HCR trends into threshold recalibration. Most teams build the queue. Almost no one builds these. Image by author.</figcaption></figure><p>It is a <strong>closed-loop system with two feedback paths.</strong></p><p>Most architectures stop at the structured log. The feedback paths are what make the difference between a system that gets cheaper to operate over time and one that stays expensive indefinitely.</p><p>Most systems build neither completely.</p><h3><strong>Rolling it out without breaking production</strong></h3><p>Most teams deploy HITL all at once — thresholds set at launch, reviewers onboarded, queue goes live. Six weeks later, they have a review process running at full volume with a five percent correction rate and no idea whether any of it is working.</p><p>The phased approach exists to prevent exactly that.</p><h4><strong>Shadow mode</strong></h4><p>The most expensive mistake in HITL deployment is committing reviewer time before you know what you’re sending them.</p><p>Run the gating logic against live traffic but route nothing to humans yet. Log every output that would have been escalated. If you have historical corrections, simulate reviewer decisions and estimate what your HCR would have been. This is where you discover that your confidence threshold is escalating forty percent of outputs — not something you want to learn after your reviewers have spent two weeks approving correct predictions and stopped paying attention.</p><h4><strong>Targeted gating</strong></h4><p>Start with the cases where gating signals converge most strongly — outputs flagged across multiple dimensions simultaneously. These generate the most useful signal per unit of reviewer time.</p><p>Measure HCR against your shadow-mode estimates. If they’re close, the gating logic is working. If they diverge, you have a calibration problem worth diagnosing before you expand. Expanding a miscalibrated queue just means more reviewers seeing things they shouldn’t.</p><h4><strong>Adaptive thresholds</strong></h4><p>The launch threshold is a starting hypothesis, not a permanent setting.</p><p>After a few weeks of correction data, start moving the thresholds. HCR declining on a particular output type means the model is improving — the escalation bar can rise. HCR climbing means something has changed — drift, a policy update, a new data pattern — and the bar should drop. Build in a recalibration cadence, monthly at minimum. The gating logic has the same maintenance obligations as the model it’s protecting.</p><h4><strong>Feedback integration</strong></h4><p>This is the phase most implementations never reach, which is why most HITL systems stay expensive indefinitely.</p><p>Route structured decision logs into the training pipeline. Stand up the calibration layer. If override patterns are recurring for the same reason, codify that constraint upstream so it stops reaching the review queue at all.</p><p>At this point, HITL stops being an operational cost layered on top of the model. It becomes the mechanism by which the model gets less wrong over time. That is the only version worth building.</p><h3><strong>What this is actually for</strong></h3><p>There is a framing that causes most of these problems:</p><p><strong><em>“Human-in-the-loop improves model quality.”</em></strong></p><p>That’s not wrong — but it’s incomplete.</p><p>You build HITL because models fail in ways that are hard to predict in advance. You don’t build HITL because models are bad.</p><p>You build HITL because:</p><ul><li>Models have coverage gaps</li><li>Uncertainty is unavoidable</li><li>Failures emerge only in production</li></ul><blockquote><strong><em>The real function of HITL is to stabilize the system under uncertainty, not to improve the model directly. The improvement is a byproduct of doing the stabilization work correctly.</em></strong></blockquote><p>Which means the engineering work is in the gating logic, the structured logging, the feedback integration, and the measurement. Not in the queue, not in the reviewer count, not in the SLA.</p><p>Model improvement is a byproduct.</p><h3><strong>The question worth asking</strong></h3><p>If there is one question that diagnoses everything, it is this: <strong><em>What percentage of reviewed outputs did humans actually change?</em></strong></p><p>If the answer is:</p><ul><li>very low → your gating is wrong</li><li>very high → your model is wrong</li><li>unknown → your system is not designed to learn</li></ul><p>A human-in-the-loop system is not defined by the presence of humans. It is defined by whether human intervention changes what the system does next.</p><p>Everything else — the queue, the tooling, the dashboards — is infrastructure.</p><blockquote><strong>If the system doesn’t learn from human intervention, you do not have a control system. <br>You might just have a checkbox with excellent documentation.<br>Get the measurement right, and the rest of the design follows from it.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e96d544e619f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/your-human-in-the-loop-isnt-a-control-system-it-s-a-checkbox-e96d544e619f">Your Human-in-the-Loop Isn’t a Control System — It’s a Checkbox</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>