<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shakil Ahmed</title>
    <description>The latest articles on DEV Community by Shakil Ahmed (@sasajib).</description>
    <link>https://dev.to/sasajib</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F912472%2Fc9063d74-b098-4bc0-98e2-1edc1a1afc8a.png</url>
      <title>DEV Community: Shakil Ahmed</title>
      <link>https://dev.to/sasajib</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sasajib"/>
    <language>en</language>
    <item>
      <title>Your AI Agent Works in Dev. It Will Fail in Production. Here's the Math.</title>
      <dc:creator>Shakil Ahmed</dc:creator>
      <pubDate>Sun, 09 Aug 2026 23:12:24 +0000</pubDate>
      <link>https://dev.to/sasajib/your-ai-agent-works-in-dev-it-will-fail-in-production-heres-the-math-4iic</link>
      <guid>https://dev.to/sasajib/your-ai-agent-works-in-dev-it-will-fail-in-production-heres-the-math-4iic</guid>
      <description>&lt;p&gt;Your AI agent passes every test. It handles edge cases. You demo it to your team and everyone nods.&lt;/p&gt;

&lt;p&gt;Then you deploy it. And it breaks.&lt;/p&gt;

&lt;p&gt;Not a little. Catastrophically. The kind of break where you stare at logs for three hours wondering what went wrong, only to discover your RAG pipeline silently returned the wrong chunk 40% of the time.&lt;/p&gt;

&lt;p&gt;You're not alone. RAND Corporation found that &lt;strong&gt;80-90% of AI agent projects never reach production&lt;/strong&gt;. That's twice the failure rate of non-AI IT projects. The gap isn't about talent. It's about math.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 95% Illusion
&lt;/h2&gt;

&lt;p&gt;Here's the number nobody talks about: &lt;strong&gt;individual step reliability vs end-to-end reliability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Your agent has 8 steps. Each step succeeds 85% of the time. That sounds fine, right? Wrong.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;0.85^8 = 0.27&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your end-to-end success rate is &lt;strong&gt;27%&lt;/strong&gt;. You built an agent that fails 73 out of 100 times. And you tested each step in isolation, so you never saw it coming.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://arxiv.org/abs/2510.25423" rel="noopener noreferrer"&gt;arXiv paper on AI agent challenges&lt;/a&gt; found that RAG (Retrieval-Augmented Generation) engineering takes a median of 87.44 hours to resolve. Not debug. &lt;em&gt;Resolve&lt;/em&gt;. That's two full work weeks just to get your retrieval pipeline working.&lt;/p&gt;

&lt;p&gt;Stack Overflow has an 82.6% unanswered rate for AI agent questions. The highest across all studied domains. People are hitting walls and nobody has answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Failure Modes That Compound
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. RAG Breaks Silently
&lt;/h3&gt;

&lt;p&gt;RAG sounds simple: retrieve relevant documents, feed them to the LLM, generate an answer. But chunking strategy, embedding model choice, and retrieval thresholds all interact in ways that don't show up in unit tests.&lt;/p&gt;

&lt;p&gt;You test with 5 documents. It works perfectly. You deploy with 5,000. The retrieval quality drops 40% because your chunking strategy doesn't handle document length variation.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.reddit.com/r/AI_Agents/comments/1tat1wm/" rel="noopener noreferrer"&gt;Reddit r/AI_Agents thread on debugging production failures&lt;/a&gt; had dozens of engineers describing the same pattern: works in dev, breaks at scale, no error messages, just wrong answers.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Orchestration Stalls Mid-Execution
&lt;/h3&gt;

&lt;p&gt;Agent orchestration frameworks (LangChain, CrewAI, LangGraph, AutoGen) abstract away state management. That abstraction hides failures.&lt;/p&gt;

&lt;p&gt;A tool call times out. The framework retries silently. The retry succeeds but returns stale data. Your agent proceeds with stale data and produces a confident wrong answer.&lt;/p&gt;

&lt;p&gt;The arXiv paper found orchestration issues have an 88.4% unanswered rate on Stack Overflow. Engineers are hitting these problems and finding zero guidance.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Tool Calls Fail Non-Deterministically
&lt;/h3&gt;

&lt;p&gt;LLMs (Large Language Models) are non-deterministic by nature. Same prompt, different output. Tool calls depend on the LLM choosing the right function with the right parameters.&lt;/p&gt;

&lt;p&gt;One day it calls &lt;code&gt;search_documents&lt;/code&gt; with the right query. Next day it calls &lt;code&gt;search_knowledge_base&lt;/code&gt; with a slightly different query that returns different results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/LangChain/comments/1u78945/" rel="noopener noreferrer"&gt;Reddit r/LangChain&lt;/a&gt; had a thread asking "What's everyone using for testing multi-agent systems?" The top comment: "If it crashes on 50 of them, your system is brittle."&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Patterns That Actually Work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Observability First
&lt;/h3&gt;

&lt;p&gt;Log every step. Not just success/failure. Log the input, output, latency, and confidence score for each step. When something breaks, you need to know &lt;em&gt;where&lt;/em&gt; it broke, not just &lt;em&gt;that&lt;/em&gt; it broke.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://langfuse.com/" rel="noopener noreferrer"&gt;Langfuse&lt;/a&gt; and &lt;a href="https://smith.langchain.com/" rel="noopener noreferrer"&gt;LangSmith&lt;/a&gt; exist for this. Use them. The 30 minutes you spend setting up observability saves you the 87 hours you'd spend debugging blind.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fallback Chains
&lt;/h3&gt;

&lt;p&gt;Never let a single point of failure kill your agent. If RAG retrieval fails, fall back to keyword search. If the LLM call times out, retry with a simpler prompt. If the tool call fails, skip that step and continue with degraded output.&lt;/p&gt;

&lt;p&gt;The compound error math works in your favor when you add fallbacks. Each fallback reduces the failure probability at that step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Human-in-the-Loop at Decision Points
&lt;/h3&gt;

&lt;p&gt;Not every decision needs human approval. But the ones that matter — sending emails, modifying databases, making API calls with side effects — should have a checkpoint.&lt;/p&gt;

&lt;p&gt;Build a confidence threshold. Below it, escalate to a human. Above it, proceed. You'll catch 90% of the silent failures before they cause damage.&lt;/p&gt;

&lt;h2&gt;
  
  
  5 Questions Before You Deploy
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What's your end-to-end success rate across the full pipeline? (Not per-step. Full pipeline.)&lt;/li&gt;
&lt;li&gt;Have you tested with production-scale data? (Not 5 documents. 5,000.)&lt;/li&gt;
&lt;li&gt;What happens when each step fails? (Do you have fallbacks?)&lt;/li&gt;
&lt;li&gt;Can you trace a wrong answer back to the specific step that caused it?&lt;/li&gt;
&lt;li&gt;Which decisions require human approval? (If none, you haven't thought hard enough.)&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.rand.org/pubs/research_reports/RRA2680-1.html" rel="noopener noreferrer"&gt;RAND Corporation Research Report RRA2680-1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2510.25423" rel="noopener noreferrer"&gt;arXiv:2510.25423v2 — Challenges in AI Agent Systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/AI_Agents/comments/1tat1wm/" rel="noopener noreferrer"&gt;Reddit r/AI_Agents — Debugging production failures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/LangChain/comments/1u78945/" rel="noopener noreferrer"&gt;Reddit r/LangChain — Testing multi-agent systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.langchain.dev/" rel="noopener noreferrer"&gt;LangChain State of Agent Engineering 2026&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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