<?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"><channel><title><![CDATA[AI Engineer Insights]]></title><description><![CDATA[Practical guides for AI engineers: production AI agents, RAG, LLM system design, guardrails, evals and career roadmaps. Short reads from aiengineerinsights.com.]]></description><link>https://aiengineerinsights.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 22:17:45 GMT</lastBuildDate><atom:link href="https://aiengineerinsights.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The $10,000 Folder: Runaway Automation and How to Stop It]]></title><description><![CDATA[Our pipeline worked exactly as designed. That is how it lost us $10,000. We built a pipeline with one job. Drop a document in a folder, and the system…]]></description><link>https://aiengineerinsights.hashnode.dev/the-10-000-folder-runaway-automation-and-how-to-stop-it</link><guid isPermaLink="true">https://aiengineerinsights.hashnode.dev/the-10-000-folder-runaway-automation-and-how-to-stop-it</guid><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[automation]]></category><dc:creator><![CDATA[Poorna Prudhvi Gurram]]></dc:creator><pubDate>Mon, 30 Nov 2026 13:38:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b0d6da82194ff0bb785a703/94979b5d-5207-4fb5-8b03-d73fc554a71e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Our pipeline worked exactly as designed. That is how it lost us $10,000.</em></p>
<p>We built a pipeline with one job. Drop a document in a folder, and the system picks it up, runs it through paid AI processing, and files the result. No human in the loop. That was the whole point.</p>
<p>Then one mistake met one outlier. Roughly 10,000 duplicate documents landed in the watched folder. The pipeline did not hesitate. It processed every one of them at about $1 each, and by the time anyone noticed, the money was spent.</p>
<p>Nothing crashed. No alert fired. Every component returned success.</p>
<p><strong>The system was not broken. It was obedient.</strong></p>
<p>A person doing the same work would have stopped by the third identical file. That pause was quietly doing safety work, and automation removed it. This post is about putting it back in a form a machine can execute.</p>
<h2>What this failure is called</h2>
<p>The umbrella term is <strong>runaway automation</strong>: an autonomous process keeps executing a costly action at machine speed, long after a person would have stopped. It is rarely one bug. It is several named failure modes stacked together:</p>
<ul>
<li><strong>Unbounded blast radius.</strong> The worst-case damage of one mistake has no upper limit.</li>
<li><strong>Idempotency failure.</strong> The same input processed twice produces two charges.</li>
<li><strong>Denial of Wallet.</strong> Pay-per-use billing turns a flood of input into a financial outage. OWASP lists it as an attack on LLM apps. Ours was self-inflicted.</li>
<li><strong>Missing back-pressure.</strong> The system accepts work faster than anyone can review it.</li>
<li><strong>Success-shaped failure.</strong> Every step reports success, so monitoring sees nothing wrong.</li>
<li><strong>Automation complacency.</strong> People stop watching because the system has always worked.</li>
<li><strong>Normalization of deviance.</strong> Edge cases that "never mattered" get accepted until one does.</li>
</ul>
<p>In safety engineering this is James Reason's Swiss cheese model: every layer had a hole, and on this day the holes lined up. The fix is not to patch one hole. It is to add layers that fail independently.</p>
<h2>We are in good (expensive) company</h2>
<p><strong>Knight Capital, August 1, 2012.</strong> New code went to seven of eight order-routing servers. The eighth ran old, unused logic that the release switched on. According to the SEC, the router sent more than 4 million orders in the first 45 minutes of trading while trying to fill 212 customer orders. Knight put its pre-tax loss at about $440 million; the SEC's order says over $460 million. That is roughly $10 million a minute.</p>
<p>Two details in the SEC's order matter more than the deployment mistake. The system sent 97 automated emails naming the problem before the market opened, and nobody read them. And Knight had no procedure for halting the router when it misbehaved.</p>
<p><strong>The cloud loop.</strong> A function that writes its output to the same place that triggers it will start itself again on every write. AWS added loop detection to Lambda for exactly this, on by default, but its own documentation says it cannot detect loops that pass through services such as DynamoDB. Platform guardrails help. They do not replace your own.</p>
<p><strong>A coding agent, April 2026.</strong> Railway described an agent that was working on a staging task, found an API token with account-wide reach, and deleted a production database volume. The data came back from offsite backups, and Railway added a 48-hour undo window to API deletes.</p>
<p>Different systems, same shape: an automated loop, no ceiling, no fast stop.</p>
<h2>Why autonomous systems fail this way</h2>
<ul>
<li><strong>Speed.</strong> Machines act faster than people notice.</li>
<li><strong>Cost per action.</strong> With pay-per-use pricing, volume becomes loss directly.</li>
<li><strong>Trust in the happy path.</strong> Our outlier, a bulk drop of duplicates, was never in the test suite.</li>
<li><strong>With agents, a fourth:</strong> the system chooses its own next step. A pipeline repeats one action too many times. An agent can pick an action nobody listed.</li>
</ul>
<p>The principle underneath everything that follows: <strong>autonomy should scale with confidence, and confidence drops sharply at the edges.</strong> Let the system run freely inside a known envelope, and make it stop and ask the moment it leaves.</p>
<h2>Seven layers of defence</h2>
<p>Any one of these would have capped our loss.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/gat4sqaefu7mt1teecek.png" alt="The document processing system in the centre, with intake gates (dedupe, circuit breaker, quarantine), a budget, a kill switch, spend alerts, an audit log, scoped credentials and a human owner around it" /></p>
<p><em>The system in the middle only does the work. Solid arrows are the path a document takes; dashed lines are the controls that can pause or stop it.</em></p>
<p><strong>1. Make processing idempotent.</strong> Hash every document before doing anything paid, and skip hashes you have already processed. Duplicates then cost a database lookup, not a dollar.</p>
<pre><code class="language-python">import hashlib

def process_once(doc_bytes: bytes, store) -&gt; str:
    key = hashlib.sha256(doc_bytes).hexdigest()
    # atomic insert-if-absent: only one worker wins the key
    if not store.claim(key):
        return "skipped_duplicate"
    result = expensive_ai_process(doc_bytes)  # ~$1
    store.save_result(key, result)
    return "processed"
</code></pre>
<p>Use an atomic claim, not a read followed by a write, or parallel workers will race.</p>
<p><strong>2. Put a hard budget on every run.</strong> A spend ceiling per run, per hour and per day, enforced in code before each paid call. A $200 daily cap would have turned a $10,000 incident into a $200 one.</p>
<p><strong>3. Add a circuit breaker on unusual volume.</strong> If a folder that usually receives 50 files a day suddenly receives 2,000 in ten minutes, pause intake and alert a person. Rate, not just total, is the signal.</p>
<p><strong>4. Quarantine large batches for approval.</strong> Small drops flow through. Big ones wait with a cost estimate: "9,847 files, 9,612 look like duplicates, estimated cost $235. Approve?"</p>
<p><strong>5. Estimate cost before you execute.</strong> A dry run makes the blast radius visible before money moves.</p>
<p><strong>6. Build a real kill switch.</strong> One flag, checked before every paid call, that halts everything in seconds. Test it like a fire drill.</p>
<p><strong>7. Watch spend, not just errors.</strong> Our monitoring looked for failures, and there were none. Alert on cost per hour, jobs per minute and duplicate rate.</p>
<h2>"Won't the provider's spend limit catch it?"</h2>
<p>Partly. OpenAI, Anthropic and Google all offer hard spend limits now. But they are monthly, mostly opt-in or tied to an account tier, and enforcement lags usage. AWS cost data can be up to 24 hours behind. Those limits cap your worst month, not a single bad afternoon. The counter that protects one run has to live in your own code.</p>
<h2>When a human still belongs in the loop</h2>
<p>Fully autonomous does not mean unsupervised. It means the supervision is written into the system.</p>
<ul>
<li><strong>Cheap and reversible</strong> (tagging, drafts): run unattended, sample afterwards.</li>
<li><strong>Costs money per action:</strong> run unattended inside a budget; approve anything above the batch threshold.</li>
<li><strong>Hard to undo</strong> (customer emails, payments): the system prepares, a person approves.</li>
<li><strong>Destructive</strong> (deleting data, changing production): the system proposes only.</li>
</ul>
<h2>The checklist</h2>
<p>Ask these of anything that runs unattended. Any "no" is an open blast radius.</p>
<ul>
<li>If the same input arrives twice, do we pay once?</li>
<li>Is there a hard spend cap per run and per day, enforced in our own code?</li>
<li>Does an unusual spike in volume pause intake automatically?</li>
<li>Do large batches wait for a person, with a cost estimate attached?</li>
<li>Can one person stop everything in under a minute, and have we tested it?</li>
<li>Do we alert on spend and throughput, not only on errors?</li>
<li>Does every credential the system holds reach only what the task needs?</li>
<li>Do we know our worst-case cost for a single mistake?</li>
</ul>
<p>Our $10,000 bought us that list. It is how you skip paying for the lesson yourself.</p>
<hr />
<p><em>The full version, with the comparison tables, the provider-by-provider spend limit details, the regulation references and links to every source, is on <a href="https://aiengineerinsights.com/blog/autonomous-ai-agent-guardrails/">AI Engineer Insights</a>. I write one practical AI engineering email a week: <a href="https://aiengineerinsights.com/newsletter/">subscribe here</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[The 100% Illusion: Why Business Teams Resist AI]]></title><description><![CDATA[They are not asking for accuracy. They are asking "which ones?" If you have shipped AI into an enterprise workflow, you have been in this meeting. The demo…]]></description><link>https://aiengineerinsights.hashnode.dev/the-100-illusion-why-business-teams-resist-ai</link><guid isPermaLink="true">https://aiengineerinsights.hashnode.dev/the-100-illusion-why-business-teams-resist-ai</guid><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Poorna Prudhvi Gurram]]></dc:creator><pubDate>Mon, 30 Nov 2026 12:41:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b0d6da82194ff0bb785a703/f13cca27-cd97-4b3d-8bba-ba049304f60a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>They are not asking for accuracy. They are asking "which ones?"</em></p>
<p>If you have shipped AI into an enterprise workflow, you have been in this meeting.</p>
<p>The demo goes well. The evaluation shows 97% field-level accuracy. Then someone from operations asks:</p>
<blockquote>
<p>"So 3 in every 100 will be wrong? Which ones?"</p>
</blockquote>
<p>The room goes quiet, and the pilot quietly stalls.</p>
<p>That question is the real adoption problem. It is not a model problem, and no amount of prompt tuning answers it. Business teams don't reject AI because it is inaccurate. They reject it because its errors are visible, unfamiliar and owned by nobody.</p>
<p>"Which ones?" is a request for three things: a boundary, a flag and an owner. Average accuracy gives none of them.</p>
<h2>The process you are replacing was never 100%</h2>
<p>Business teams never had perfect outcomes. They had outcomes that were:</p>
<ul>
<li><strong>Predictable.</strong> The same input gave the same output. A bug, once fixed, stayed fixed.</li>
<li><strong>Legible.</strong> When something broke, you could see why: rule X fired, field Y was blank.</li>
<li><strong>Owned.</strong> A person or a line of code was accountable, and everyone knew the escalation path.</li>
</ul>
<p>The manual work underneath always made mistakes. Nobody counted them. Where researchers have counted:</p>
<ul>
<li>One person typing data from paper forms into a database: <strong>0.29% of fields</strong> wrong (Garza et al., pooled from 93 clinical research studies).</li>
<li>Copying values out of medical records by hand: <strong>6.57% of fields</strong> (same review).</li>
<li>Clinic staff typing a glucose reading into the patient record: <strong>3.7%</strong> differed from the device's own reading (Mays and Mathias, JAMIA 2019).</li>
<li>Simple but nontrivial tasks in general: <strong>1% to 5%</strong> per action (Raymond Panko's human error compilation).</li>
</ul>
<p>You will also see "manual data entry has a 1% to 4% error rate" on many automation vendors' blogs. I could not trace it to a primary study, so I left it out. Published numbers will not persuade your client anyway. Their own number will. Measure the error rate of the current process before the pilot starts. In my experience it is the single most persuasive number in any AI adoption conversation.</p>
<h2>Why a machine's mistake feels worse than a person's</h2>
<p>Researchers call it <strong>algorithm aversion</strong>. In 2015, Berkeley Dietvorst, Joseph Simmons and Cade Massey found that people lose confidence in an algorithm more quickly than in a human forecaster after seeing both make the same mistake. That held even among people who had watched the algorithm outperform the human.</p>
<p>A person's mistake reads as a one-off. A machine's mistake reads as a defect that will keep happening.</p>
<p>Later work by Dietvorst and Soaham Bharti (nine studies, 4,820 participants) explains the fixation on 100%. People have diminishing sensitivity to error: the first unit of error hurts most. So they judge a method by its chance of producing a near-perfect answer, and prefer methods with more variance, which often means human judgment. A system that is reliably a little wrong loses to a person who is sometimes exactly right.</p>
<p>The same group also found the cure. People were considerably more likely to use an imperfect algorithm when they could modify its forecasts, and they performed better as a result. The preference held even when the changes they could make were severely restricted.</p>
<p><strong>Control buys adoption, more than accuracy does.</strong></p>
<p>Language models add two problems on top:</p>
<ul>
<li><strong>Confident errors.</strong> A wrong answer looks exactly like a right one.</li>
<li><strong>Non-determinism.</strong> The same input can give a different output, even at temperature 0. Thinking Machines Lab showed the main reason is that server load changes the batch size, and most inference kernels give slightly different numbers at different batch sizes. In their test, 1,000 temperature-0 completions of one prompt produced 80 different outputs.</li>
</ul>
<h2>"A human reviews it" is not a safeguard yet</h2>
<p>The evidence says reviewers fail in both directions.</p>
<ul>
<li><strong>They over-rely.</strong> In a randomized experiment with 2,784 participants (Beck and colleagues, a 2025 preprint), people favorable toward automation over-relied on AI suggestions. Financial incentives had no consistent effect.</li>
<li><strong>They defer to the machine.</strong> A PNAS Nexus study showed 1,339 teachers a grade that was too harsh. They corrected it less when it was labeled as AI-generated than when it was labeled as a colleague's: the remaining gap to the fair grade was 22% larger. These same teachers rated AI as less fair than a human grader.</li>
<li><strong>They ignore the machine when it is right.</strong> In a working paper by Agarwal, Moehring and Wolitzky, people doing a fact-checking task with an AI score did worse than the AI alone on the cases where the AI was confident, mainly from overconfidence in their own judgment.</li>
</ul>
<p>If your safety story is "a human reviews it", you need data on how well that human reviews. Without it, the review step is a compliance checkbox.</p>
<h2>Five patterns that earn trust</h2>
<p>The goal is not a model that is never wrong. It is a system whose errors are bounded, visible and routed to someone who owns them.</p>
<p><strong>1. Rules first, LLM second.</strong> Known patterns run through deterministic rules. Only novel cases reach the LLM.</p>
<p><strong>2. Compile AI into deterministic artifacts.</strong> Use the LLM at build time to write extraction rules, regular expressions, SQL or field mappings, then run those at runtime. This is the most underrated pattern I know. Over time the deterministic share grows.</p>
<p><strong>3. A validation stack, cheapest checks first.</strong> Schema and types, field rules, cross-field checks, reconciliation against master data, then grounding: does the cited source span actually contain the value?</p>
<p><strong>4. Calibrated confidence, not self-reported confidence.</strong> Build a score from validation results, agreement between paths, grounding and history. Calibrate it on labeled data and pick the threshold that hits the precision the business needs:</p>
<pre><code class="language-python">import numpy as np
from sklearn.isotonic import IsotonicRegression

raw_scores, correct = np.asarray(raw_scores), np.asarray(correct)
iso = IsotonicRegression(out_of_bounds="clip").fit(raw_scores, correct)
calibrated = iso.predict(raw_scores)

def pick_threshold(calibrated, correct, target_precision=0.995):
    for t in np.sort(np.unique(calibrated)):
        mask = calibrated &gt;= t
        if mask.sum() and correct[mask].mean() &gt;= target_precision:
            return t, mask.mean()  # threshold, share auto-processed
    return None, 0.0
</code></pre>
<p><strong>5. Sell selective automation, not average accuracy.</strong></p>
<p>Don't say: "The model is 95% accurate."</p>
<p>Say: "We auto-process 70% of cases at 99.5% precision and send the other 30% to your team."</p>
<p>The first sentence leaves the "which ones?" question open. The second answers it, and turns the threshold into a dial the business owns.</p>
<h2>Getting the business team ready</h2>
<ol>
<li><strong>Measure the baseline before the pilot.</strong> The question shifts from "is AI perfect?" to "is AI plus review better than us?"</li>
<li><strong>Make the business co-own "correct".</strong> Their experts label the test set and decide what each kind of error costs.</li>
<li><strong>Sign an error budget before launch.</strong> Without it, the first visible mistake becomes a political event.</li>
<li><strong>Give them control.</strong> Editable outputs, overrides, a business-owned threshold.</li>
<li><strong>Stage autonomy:</strong> shadow, then assist, then supervised automation, then full automation, each with an exit test.</li>
<li><strong>Test your reviewers.</strong> Seed the queue with known-wrong cases and measure the catch rate.</li>
<li><strong>Publish the scoreboard, human errors included.</strong> Hiding AI errors destroys trust faster than the errors do.</li>
</ol>
<h2>The takeaway</h2>
<p>Business teams trusted predictability, legibility and ownership, never perfection. Rebuild those three properties and trust follows.</p>
<p>Model capability is becoming a commodity. The teams that win enterprise AI will not have the smartest model. They will have the system a risk-averse business team can say yes to.</p>
<hr />
<p><em>The full version, with the staged rollout table, the survey data from MIT NANDA, McKinsey and BCG, and links to every paper cited here, is on</em> <a href="https://aiengineerinsights.com/blog/why-business-teams-resist-ai/"><em>AI Engineer Insights</em></a><em>. I write one practical AI engineering email a week:</em> <a href="https://aiengineerinsights.com/newsletter/"><em>subscribe here</em></a><em>.</em></p>
]]></content:encoded></item></channel></rss>