<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[BinaryBox]]></title><description><![CDATA[BinaryBox is where coders level up to engineers. I share practical insights, mental models, and real-world stories that help you think beyond code, design better solutions, and grow into a problem-solving powerhouse.]]></description><link>https://www.binarybox.org</link><image><url>https://substackcdn.com/image/fetch/$s_!nQ1g!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5439f3e3-02d6-4fcb-916e-c999f65d4c56_300x300.png</url><title>BinaryBox</title><link>https://www.binarybox.org</link></image><generator>Substack</generator><lastBuildDate>Wed, 14 Oct 2026 09:38:55 GMT</lastBuildDate><atom:link href="https://www.binarybox.org/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Ashok Vishwakarma]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[binarybox@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[binarybox@substack.com]]></itunes:email><itunes:name><![CDATA[Ashok Vishwakarma]]></itunes:name></itunes:owner><itunes:author><![CDATA[Ashok Vishwakarma]]></itunes:author><googleplay:owner><![CDATA[binarybox@substack.com]]></googleplay:owner><googleplay:email><![CDATA[binarybox@substack.com]]></googleplay:email><googleplay:author><![CDATA[Ashok Vishwakarma]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Why Fine-Tuning your Model will not Teach it New Facts]]></title><description><![CDATA[An engineer asked me why not just train the model on our own data instead of building RAG. Here is what actually happens inside a transformer when you try, and why fine-tuning cannot fix it.]]></description><link>https://www.binarybox.org/p/why-fine-tuning-your-model-will-not-teach-it-new-facts</link><guid isPermaLink="false">https://www.binarybox.org/p/why-fine-tuning-your-model-will-not-teach-it-new-facts</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Mon, 05 Oct 2026 06:00:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!d2ON!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d2ON!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d2ON!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 424w, https://substackcdn.com/image/fetch/$s_!d2ON!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 848w, https://substackcdn.com/image/fetch/$s_!d2ON!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 1272w, https://substackcdn.com/image/fetch/$s_!d2ON!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d2ON!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Fine-Tuning Small Language Models to Optimize Code Review Accuracy | NVIDIA  Technical Blog&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Fine-Tuning Small Language Models to Optimize Code Review Accuracy | NVIDIA  Technical Blog" title="Fine-Tuning Small Language Models to Optimize Code Review Accuracy | NVIDIA  Technical Blog" srcset="https://substackcdn.com/image/fetch/$s_!d2ON!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 424w, https://substackcdn.com/image/fetch/$s_!d2ON!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 848w, https://substackcdn.com/image/fetch/$s_!d2ON!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 1272w, https://substackcdn.com/image/fetch/$s_!d2ON!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24db6b06-3d11-4db7-af61-48ca6af0960a_1999x1125.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I was speaking at a tech event recently, walking through the trade-offs between model fine-tuning and Retrieval-Augmented Generation (RAG). I was breaking down the unit economics, accuracy ceilings, and infrastructural constraints of both approaches when an attendee raised his hand during the Q&amp;A.</p><p>His question was direct</p><blockquote><p><em>If we already have all our internal domain data sitting in clean Markdown and PDF files, why go through the hassle of building, indexing, and maintaining an entire RAG pipeline? Why not just fine-tune the model on our data and let it answer directly from its own weights?</em></p></blockquote><p>It is a fair question, and I have heard a version of it at almost every tech talk, architecture review, and client workshop over the last two years.</p><p>To a non-specialist, fine-tuning sounds like downloading knowledge into a brain. If you read a textbook, you know the material. If you train a neural network on your company&#8217;s documents, it should know your company.</p><p>That intuition feels logical, but it misunderstands how transformer architectures store information.</p><p>Training changes how a model behaves, how it structures its output, and how it follows instructions. It does not reliably teach or refresh specific factual knowledge. Understanding why requires looking at the physical mechanism of how language models store memory.</p><h2>How pre-training acquires facts</h2><p>To understand why fine-tuning fails at factual memorization, we have to look at how a model acquires facts during pre-training.</p><p>When a foundational model learns world knowledge, it does so through an unthinkably massive, brute-force statistical process. The objective function is simple, predict the next token given all preceding tokens, compute the loss against the actual token, and adjust billions of weights via back-propagation.</p><p>Consider Meta&#8217;s <strong>Llama 3</strong>. Meta pre-trained Llama 3 on a corpus of <strong>over 15 trillion tokens</strong>, a dataset seven times larger than the one used for Llama 2.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Kc1I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Kc1I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 424w, https://substackcdn.com/image/fetch/$s_!Kc1I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 848w, https://substackcdn.com/image/fetch/$s_!Kc1I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 1272w, https://substackcdn.com/image/fetch/$s_!Kc1I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Kc1I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png" width="1456" height="736" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:736,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87675,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/217603185?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Kc1I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 424w, https://substackcdn.com/image/fetch/$s_!Kc1I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 848w, https://substackcdn.com/image/fetch/$s_!Kc1I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 1272w, https://substackcdn.com/image/fetch/$s_!Kc1I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062b2b59-e512-437a-bd8f-9d7f4c083cba_1496x756.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A fact does not become permanently embedded into a model&#8217;s weights because the network saw it once in a clean paragraph. A fact gets stored because it was stated, restated, paraphrased, questioned, and cross-referenced across <strong>millions of distinct documents</strong> inside that 15 trillion token corpus.</p><p>It is that extreme repetition across varied contexts that allows the gradient updates to generalize a concept into the network&#8217;s parameters, rather than treating it as noise to be discarded.</p><h2>Where a Fact lives inside a Transformer</h2><p>For a long time, researchers treated model memory as an opaque black box. That changed with groundbreaking mechanistic interpretability research.</p><p>In their seminal NeurIPS 2022 paper, <strong><a href="https://www.proceedings.com/content/068/068431-1262open.pdf">Locating and Editing Factual Associations in GPT</a></strong> (Meng et al.), researchers set out to map precisely where factual assertions live inside a transformer.</p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uZ55!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 424w, https://substackcdn.com/image/fetch/$s_!uZ55!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 848w, https://substackcdn.com/image/fetch/$s_!uZ55!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 1272w, https://substackcdn.com/image/fetch/$s_!uZ55!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uZ55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png" width="1456" height="303" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:303,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51855,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/217603185?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uZ55!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 424w, https://substackcdn.com/image/fetch/$s_!uZ55!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 848w, https://substackcdn.com/image/fetch/$s_!uZ55!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 1272w, https://substackcdn.com/image/fetch/$s_!uZ55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df703e6-b832-4e7a-85a2-451b8ee26599_1778x370.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><p>The researchers discovered that factual associations, like <em>(&#8221;Steve Jobs&#8221;, &#8220;founded&#8221;, &#8220;Apple&#8221;)</em> are stored in localized computations within the model&#8217;s <strong>middle-layer feed-forward (FFN) modules</strong>. These FFN layers act like a key-value memory system</p><ol><li><p>The early attention layers process the incoming tokens and concentrate the subject of the prompt (<em>&#8220;Steve Jobs&#8221;</em>).</p></li><li><p>The middle FFN layers read that subject representation and fire specific weight activations, acting as a direct lookup table for the relation and target object (<em>&#8220;founded Apple&#8221;</em>).</p></li><li><p>The later layers format that retrieved association into grammatical text.</p></li></ol><p>Meng et al. proved this by creating <strong>Rank-One Model Editing (ROME)</strong>, a technique that surgically updated a single specific weight matrix inside the FFN layers to change a specific fact (e.g., changing the location of the Eiffel Tower) without altering the model&#8217;s overall language capability.</p><p>The key takeaway for system architects is profound, <strong>A fact is a precise, highly localized statistical association in the feed-forward layers.</strong> Squeezing a new, isolated fact into those specific layers requires an immense amount of statistical signal.</p><h2>What Fine-Tuning actually touches</h2><p>When an engineering team decides to &#8220;train a model on our company data,&#8221; they rarely execute a full-parameter pre-training run. Full parameter updates on a 70 billion parameter model require massive GPU clusters and millions of dollars.</p><p>Instead, modern fine-tuning almost universally relies on <strong><a href="https://arxiv.org/pdf/2312.12148">Parameter-Efficient Fine-Tuning (PEFT)</a></strong> techniques, primarily <strong><a href="https://arxiv.org/pdf/2106.09685">LoRA (Low-Rank Adaptation) (Hu et al., 2021)</a></strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XbVF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XbVF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 424w, https://substackcdn.com/image/fetch/$s_!XbVF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 848w, https://substackcdn.com/image/fetch/$s_!XbVF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 1272w, https://substackcdn.com/image/fetch/$s_!XbVF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XbVF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png" width="1432" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/329e4cef-2013-431d-9291-719d2e20610e_1432x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1432,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:53656,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/217603185?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XbVF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 424w, https://substackcdn.com/image/fetch/$s_!XbVF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 848w, https://substackcdn.com/image/fetch/$s_!XbVF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 1272w, https://substackcdn.com/image/fetch/$s_!XbVF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329e4cef-2013-431d-9291-719d2e20610e_1432x496.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>LoRA freezes the primary <em><strong>W</strong></em> weight matrices of the pretrained model and injects tiny, trainable rank-decomposition matrices alongside them.</p><ul><li><p>A model like GPT-3 has 175 billion parameters.</p></li><li><p>A standard LoRA configuration trains as little as <strong>0.01% of those parameters</strong>, reducing trainable parameters by a factor of 10,000.</p></li></ul><p>This design makes LoRA astonishingly efficient at changing <strong>behavior</strong>.</p><p>If you want the model to always output valid JSON, adopt a sarcastic tone, or follow a strict medical triage format, LoRA works brilliantly. Every single example in your fine-tuning dataset reinforces that formatting pattern. The tiny 0.01% slice of trainable parameters receives a constant, unified signal on how to transform the output style.</p><p>However, if you feed the fine-tuning script a 500-page internal document containing thousands of specific product SKUs, pricing tiers, and vendor policies</p><ol><li><p>The base model weights holding factual lookup capabilities are <strong>completely frozen</strong>.</p></li><li><p>The tiny LoRA matrices see each specific SKU or policy statement only a handful of times.</p></li><li><p>The statistical signal is far too weak to write new, localized key-value lookups into the network.</p></li></ol><p>Instead of memorizing your product catalog, the model learns the <em>style</em> of your documents while hallucinating the <em>contents</em> when probed for exact details.</p><h2>How Retrieval-Augmented Generation (RAG) helps</h2><p>Retrieval-Augmented Generation does not try to teach the model new facts. It treats the model as an execution engine that reads context provided at runtime.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZjWU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZjWU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 424w, https://substackcdn.com/image/fetch/$s_!ZjWU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 848w, https://substackcdn.com/image/fetch/$s_!ZjWU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 1272w, https://substackcdn.com/image/fetch/$s_!ZjWU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZjWU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png" width="1456" height="462" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:462,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56250,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/217603185?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZjWU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 424w, https://substackcdn.com/image/fetch/$s_!ZjWU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 848w, https://substackcdn.com/image/fetch/$s_!ZjWU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 1272w, https://substackcdn.com/image/fetch/$s_!ZjWU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ca72b49-6baa-4fe2-80b7-631355249f07_1602x508.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>RAG completely sidesteps the factual generalization problem</p><h4>No Weight Updates Required</h4><p>The model&#8217;s frozen weights are used strictly for language parsing, reasoning, and synthesis</p><h4>In-Context Attention</h4><p>The facts are injected directly into the prompt&#8217;s context window. The model&#8217;s attention mechanism reads the verified context off the page, the same way a human open-book test works.</p><h4>Deterministic Lineage</h4><p>If a policy changes at 9:00 AM, you update one database record or document chunk. By 9:01 AM, every subsequent query retrieves the new truth.</p><h2>The economics</h2><p>During the Q&amp;A at that engineering talk, I walked through the financial reality of trying to maintain truth via training versus retrieval</p><h4>Fine-Tuning for facts</h4><p><code>Data Update</code> &#8594; <code>Dataset Prep</code> &#8594; <code>GPU Compute</code> &#8594; <code>Eval Run</code> &#8594; <code>Deploy</code> </p><p><strong>Cost</strong> - High (~$100s to ~$1,000s per retraining run)</p><p><strong>Update Latency</strong> - Hours to Days</p><p><strong>Determinism</strong> - Low (Risk of hallucinations and regression)</p><h4>RAG for facts</h4><p><code>Data Update</code> &#8594; <code>Re-index Chunk / Graph Node</code> </p><p><strong>Cost</strong> - Near Zero ($0.0001 per document update)</p><p><strong>Update Latency</strong> - Milliseconds to Seconds</p><p><strong>Determinism</strong> - High (Verifiable source attribution)</p><p>Even if you had the compute budget to fine-tune your model every time a policy doc updated, you would still face catastrophic forgetting and factual regression across previous updates.</p><h2>If you want to try yourself</h2><p>If you want to demonstrate this phenomenon to your team or executive leadership, you do not need complex infrastructure. You can run a simple, reproducible experiment.</p><h4>Test setup</h4><p>Take a small, open-weights model (e.g., Llama 3 8B or Qwen 2.5 7B).</p><p>Create a synthetic, completely novel fact that could not possibly exist in the pre-training data</p><blockquote><p><em>Project Aegis-902 is an internal initiative led by Dr. Aris Thorne with a budget allocation of $14.2M.</em></p></blockquote><p>Fine-tune the model using standard LoRA parameters on a dataset containing this synthetic statement formatted across 50 distinct variations.</p><p>Test the model on factual queries</p><blockquote><p><em>What is the budget allocation for Project Aegis-902, and who leads it?</em></p></blockquote><h4>Observe the Result</h4><p><strong>Fine-Tuned Output (Without Context)</strong> - The model will often state that it does not know, or it will hallucinate a completely different budget ($5M, $20M) and name a different lead engineer. The LoRA matrix adopted the phrasing style, but failed to plant a reliable factual lookup.</p><p><strong>RAG Output (With Context Injected)</strong> -  Inject the raw synthetic string into the prompt as context. The base model without a single parameter update, returns an exact, verified answer almost 100% of the time.</p><div><hr></div><h2>Conclusion</h2><p>Fine-tuning is a powerful tool, but it is a tool for <strong>behavioral transformation</strong>, not data storage.</p><p>Use <strong>Fine-Tuning</strong> when you need to teach a model <em>how to behave</em>, mastering a custom DSL, adhering to strict output schemas, mimicking an organizational voice, or improving task execution speed.</p><p>Use <strong>RAG</strong> when you need to teach a model <em>what is true</em>, querying live product inventory, searching policy documentation, fetching merchant transaction records, or pulling customer support histories.</p><p>Stop trying to force your LLM&#8217;s weights to act as an expensive, unreliable database. Keep your facts in your retrieval layer, let your model handle the reasoning, and build systems grounded in verifiable truth.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Why your AI feature passed the Demo and failed in Production]]></title><description><![CDATA[A payments AI passed its demo in two seconds, then told a merchant a refund had posted that never happened. Here are three diagnostic checks to catch this gap before production does.]]></description><link>https://www.binarybox.org/p/why-your-ai-feature-passed-the-demo-and-failed-in-production</link><guid isPermaLink="false">https://www.binarybox.org/p/why-your-ai-feature-passed-the-demo-and-failed-in-production</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Thu, 01 Oct 2026 06:01:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dYs8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dYs8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dYs8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 424w, https://substackcdn.com/image/fetch/$s_!dYs8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 848w, https://substackcdn.com/image/fetch/$s_!dYs8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!dYs8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dYs8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2059763,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/217595432?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dYs8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 424w, https://substackcdn.com/image/fetch/$s_!dYs8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 848w, https://substackcdn.com/image/fetch/$s_!dYs8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!dYs8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a93754-7f14-42d7-861f-4e326d85e895_1920x1072.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>When I was brought in to investigate the accuracy failures of a client&#8217;s AI assistant, everyone told me the exact same story</p><blockquote><p><em><strong>It worked perfectly during the executive demo. It even seemed fine for the first two weeks in production. Then it started showing cracks.</strong></em></p></blockquote><p>Upon investigation here is how they demoed it</p><p>The engineering team had brought leadership into the room, typed <em><strong>&#8220;How do refunds usually work on our platform?&#8221;</strong></em>, and watched a vector-backed Retrieval-Augmented Generation (RAG) system return a flawless summary within two seconds. It cited policy docs, listed processing windows, and earned immediate rollout approval.</p><p>Two weeks after launching to active merchant users, support tickets were piling up and executive trust was collapsing.</p><p>A merchant had logged into their portal and entered a real operational query</p><blockquote><p><em><strong>Why was transaction TXN-48291 declined, and has the refund for it posted yet?</strong></em></p></blockquote><p>The system returned a confident, step-by-step breakdown of why the transaction failed and stated that a $140.00 credit was posted yesterday morning. It looked authoritative. It read cleanly.</p><p>There was only one problem</p><p><strong>TXN-48291 was never refunded.</strong></p><p>When I audited the retrieval pipeline, the root cause became obvious. The system did not degrade two weeks after launch. <strong>It was set to fail from day one.</strong> It simply took fourteen days for real users to start asking questions that exposed the underlying structural gap.</p><h4>Prototype/Demo Queries (Easy ~20%)</h4><blockquote><p><em>&#8220;How do refunds usually work on our platform?&#8221;</em></p><p><em>&#8220;Summarize our terms for chargeback disputes.&#8221;</em></p></blockquote><p>Fuzzy, conceptual language &#8594; Vector Similarity Search Works Perfectly (~95% Success)</p><h4>Production Queries (Hard ~80%)</h4><blockquote><p><em>&#8220;Why was transaction TXN-48291 declined, and has the refund posted?&#8221;</em></p><p><em>&#8220;Which fee schedule applies to merchant M-902 under international clearing?&#8221;</em></p></blockquote><p>Exact transaction IDs &amp; live ledger integers &#8594; Vector Search Fails (Wrong status returned)</p><h2>Semantic Similarity vs Structural Exactness</h2><p>Most AI prototypes pass internal reviews because demo queries naturally cluster around what vector search does well, <strong>fuzzy linguistic closeness</strong>.</p><p>Vector search embeds text chunks into high-dimensional mathematical space. When a user asks a conceptual question like <em>&#8220;How do refunds work?&#8221;</em> the embedding engine easily finds chunks containing <em>&#8220;merchant refund processing terms&#8221;</em> or <em>&#8220;standard return windows.&#8221;</em> The vocabulary matches, the cosine similarity score is high, and the LLM synthesizes a clean response.</p><p>Production environments do not ask conceptual questions. They ask for operational truth.</p><p>When a query demands structural exactness, vector search breaks down across two physical failure modes</p><h4>Semantic similarity scores vocabulary closeness, not transaction compatibility</h4><p>An embedding model has no concept of non-interchangeable financial records or primary keys. To an embedding model, the text describing a declined card error on one transaction and a settled refund on another looks almost identical. The vector engine returns a high similarity score for the wrong transaction because the surrounding sentences share the exact same vocabulary.</p><h4>Live account state is a dynamic integer, not a static concept</h4><p> Ledger balances and refund statuses sit inside an SQL database or core banking system, changing second by second. They do not exist inside a static PDF or Markdown file stored in a vector index. Vector search either hallucinates a status based on historical text or admits it cannot query the database.</p><p>The demo sampled the easy region of the query distribution. Production sampled all of it.</p><h2>Here are 3 audits you can run today</h2><p>If your AI feature is stalling between a successful staging demo and production adoption, run these three diagnostic checks against your system today.</p><h3>1. Retrieval Accuracy </h3><p><strong>Symptoms</strong> - High success on general queries, dangerous hallucinations on exact IDs.</p><p><strong>Root Cause</strong> - Using vector similarity for questions requiring structural graph traversal.</p><h4>Do a Query Split test</h4><p>Pull 10 real support tickets, user logs, or operational inquiries from the last month. Do not use queries picked by the engineering team for a demo.</p><p>Split those 10 queries into two piles</p><ul><li><p><strong>Pile A (Conceptual/Fuzzy)</strong> - Broad questions like <em>&#8220;How does our chargeback policy work?&#8221;</em> or <em>&#8220;Summarize the onboarding steps for new merchant accounts.&#8221;</em></p></li><li><p><strong>Pile B (Exact/Structural)</strong> - Questions containing specific transaction IDs, account numbers, error codes, or requests for live data (<em>&#8220;Has the settlement for TXN-48291 cleared yet?&#8221;</em>).</p></li></ul><p>Run both piles through your RAG system.</p><p>If <strong>Pile A</strong> achieves a high accuracy score while <strong>Pile B</strong> produces wrong transaction details, missing statuses, or hallucinated numbers, your failure mode is structural. You are attempting to solve exact relational lookups using vocabulary proximity.</p><h3>2. Scaled Latency</h3><p><strong>Symptoms</strong> - Sub-100ms in staging, multi-second spikes under production document volume.</p><p><strong>Root Cause</strong> - Unindexed scans or pointer-chasing over unoptimized vector indexes.</p><h4>Do a Load Testing against Realistic Volume </h4><p>Measure retrieval latency against your actual production document count and concurrent user volume, not the 50 sample PDFs sitting in your staging environment.</p><p>Staging environments hide infrastructural bottlenecks. A flat vector search or an unindexed query responds in 30 milliseconds when scanning 1,000 document chunks.</p><p>When that same index scales to 500,000 chunks across millions of transaction logs and merchant accounts, memory bandwidth chokes and latency spikes into seconds. If you did not load-test retrieval performance at 10x your expected document volume, your production latency figures are an illusion.</p><h3>3. Cost Per Query </h3><p><strong>Symptoms</strong> - Token bills exploding linearly with active user adoption. </p><p><strong>Root Cause</strong> - Routing 100% of queries unconditionally to expensive frontier models. </p><h4>Check Cost Per Query vs Cost Per Token</h4><p>Examine your API dashboard and calculate what percentage of incoming user queries are routed directly to a top-tier frontier model ($15+ per million tokens).</p><p>In our analysis of <strong><a href="https://www.binarybox.org/p/the-tokenpocalypse-why-cheap-tokens">token economics and agentic loops</a></strong>, we showed that enterprise teams using naive, unrouted architectures pay a massive &#8220;token tax.&#8221; Unconditional routing forces a $15/1M token model to handle trivial tasks like parsing a regex or reading a transaction ID.</p><p>Teams that implement tiered routing, directing routine lookups to local models, database queries, or cheaper Flash-tier endpoints, and escalating only complex reasoning to frontier models, reduce their blended API costs by a median <strong>87.4%</strong>.</p><p>If every query in your pipeline hits the same frontier model regardless of complexity, your cost model will choke as soon as active user adoption spikes.</p><h2>What it takes to fix each failure mode</h2><p>Moving an AI feature from a fragile prototype to a production-grade system requires targeted architectural corrections</p><h3>Retrieval Accuracy Fix</h3><p><strong>Flat Vector Store Only</strong> (Vocabulary proximity) &#8594; <strong>Knowledge Graph / Relational Grounding</strong>  (Merchant &#8594; Transaction &#8594; Ledger &#8594; RefundStatus)</p><p>Move beyond flat vector stores for operational data. Map your domain entities into a relational or <strong>Knowledge Graph</strong> structure (<code>Merchant -[:INITIATED]-&gt; Transaction -[:HAS_LEDGER_ENTRY]-&gt; LedgerStatus</code>). When a query contains an exact identifier like <em>TXN-48291</em>, bypass vector embeddings entirely and execute a deterministic database or graph lookup.</p><h3>Scaled Latency Fix</h3><p><strong>Brute-force Flat Scans</strong> (Thrashes RAM/Disk) &#8594; <strong>Entity-First Deterministic Traversals</strong> (Bypasses vector search when exact keys exist) </p><p>Implement <strong>Entity-First Deterministic Traversals</strong>. Anchor your queries directly onto primary keys in your database or graph index, reserving vector search strictly as an entry point for unstructured, natural-language queries without explicit identifiers.</p><h3>Cost Control Fix</h3><p><strong>Single-Model Pipeline</strong> (All queries &#8594; Frontier) &#8594; <strong>Tiered Complexity Router</strong> (Edge / DB Lookup &#8594; Flash Model &#8594; Frontier Escalation)</p><p>Build a <strong>Complexity Router</strong> at the front door of your system. Classify incoming user requests before sending them to an LLM. Simple database lookups or exact status fetches should execute at near-zero API cost; only multi-step, ambiguous reasoning tasks should escalate to frontier models.</p><div><hr></div><h2>Conclusion</h2><p>A working prototype proves that an LLM can understand your domain. It does not prove that your architecture can serve your users safely.</p><p>Prototypes evaluate best-case scenarios under controlled conditions. Production subjects your system to the full complexity of your operational environment, where wrong answers destroy user trust, high latency frustrates merchants, and unconstrained token usage drains engineering budgets.</p><p>Stop testing your AI features against the easy <strong>~20%</strong> of queries that look great in an executive demo. Test them against the exact, structured, high-stakes questions your team faces every day, and build the underlying architecture required to answer them correctly.</p><div class="pullquote"><p><em>This three-part diagnostic is the framework I use when evaluating production AI architectures for engineering organizations stuck between prototype and scale. If your team is struggling with hallucinated outputs on exact queries, high latency, or spiraling API invoices, feel free to reach out for a structured architectural audit.</em></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Enhancing RAG Vector Search with Graph Traversal before it grabs the wrong manual]]></title><description><![CDATA[A manufacturing plant almost sent a technician the repair manual for the wrong CNC lathe model, because vector search cannot tell hardware apart. Here is the hybrid Graph RAG fix.]]></description><link>https://www.binarybox.org/p/enhancing-rag-vector-search-with-graph-traversal</link><guid isPermaLink="false">https://www.binarybox.org/p/enhancing-rag-vector-search-with-graph-traversal</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Mon, 28 Sep 2026 06:01:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!s0NG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s0NG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s0NG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!s0NG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!s0NG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!s0NG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s0NG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Knowledge Graphs vs Vector Databases: The 2026 Verdict for AI Engineers |  by Codebook Fusion | Sep, 2026 | Towards AI&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Knowledge Graphs vs Vector Databases: The 2026 Verdict for AI Engineers |  by Codebook Fusion | Sep, 2026 | Towards AI" title="Knowledge Graphs vs Vector Databases: The 2026 Verdict for AI Engineers |  by Codebook Fusion | Sep, 2026 | Towards AI" srcset="https://substackcdn.com/image/fetch/$s_!s0NG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!s0NG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!s0NG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!s0NG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299d3aff-d052-483d-be81-5b5a6829677a_1200x675.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A manufacturing plant deployed an AI assistant backed by a traditional vector RAG system to help technicians investigate, plan, and execute routine maintenance across their production lines.</p><p>Everything looked completely fine, and leadership was praising the whole deployment. What they did not realize was that the system had a fundamental flaw, one that could become a nightmare on the factory floor at any moment.</p><p>Consider how this failure mode unfolds on the factory floor.</p><p>A technician stands in front of a down machine, opens the internal AI assistant, and enters a specific query</p><blockquote><p><em><strong>How do I resolve Fault 414 on the CNC Lathe Model 800, and are the replacement parts in stock?</strong></em></p></blockquote><p>In a traditional vector-search RAG architecture, the system embeds the query, scans the document store for chunks with the highest cosine similarity, and feeds the top five matches to an LLM.</p><p>The system returns a detailed, step-by-step repair guide. It looks authoritative. It reads cleanly.</p><p>There is only one problem, the manual it pulled is for the <strong>CNC Lathe Model 600</strong>.</p><p>The Model 600 uses an older control board, a different hydraulic valve assembly, and different torque specifications. Follow that guide on a Model 800, and you strip a spindle drive or blow a pressure seal.</p><p>The vector search was not uncertain. The vector search returns a high cosine similarity score. To an embedding model, the text describing Fault 414 on a Model 600 and a Model 800 looks almost identical.</p><p>That is the vector trap. Vector search does not understand hardware. It understands vocabulary.</p><h2>Why it failed?</h2><p>The failure of vector search on industrial data comes down to two structural flaws</p><h4><strong>Semantic similarity scores linguistic closeness, not hardware compatibility.</strong></h4><p>An embedding model has no concept of non-interchangeable components. It only knows that the words describing the Model 600 manual and the Model 800 manual sound nearly identical.</p><h4><strong>Live inventory is a dynamic integer, not a static concept.</strong></h4><p>Warehouse stock sits inside an ERP database or inventory log, changing by the minute. It does not live inside a static PDF manual. Vector search either hallucinates a stock count or admits it cannot read the warehouse.</p><p>To answer operational questions on a factory floor, you cannot rely on linguistic closeness. You need structural truth.</p><h2>How we have solved it?</h2><p>To solve this, we replaced pure vector search with a Knowledge Graph mapped directly to the physical structure of the plant.</p><p>The schema separates the physical world (equipment, parts, faults, live logs) from the document world (manuals, chunks, blueprints), connecting them through explicit, typed relationships.</p><h3>Schema</h3><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9bfc9f20-6baf-429c-b88a-0457baf00cd4&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">// Nodes
Equipment{id, model, installationDate, status} // Physical machines on the floor
Part{sku, name, material, lifecycleStatus} // Replaceable components
Supplier{supplierId, name, country, status} // Equipment and component suppliers
FaultCode{code, severity, description} // Standardized machine error states
Procedure{id, title, estimatedTime, safetyLevel} // Standard fixes
InventoryLog{transactionId, quantity, timestamp, location} // Real-time warehouse movement
Project{projectId, name, startDate, status} // Capital upgrades, maintenance work
Manual{documentId, version, language} // Top-level equipment documentation
ProjectDoc{docId, type, author} // Blueprints, compliance reports
Chunk{chunkId, text, embedding, pageNumber} // Vectorized text segments

// Relationships
(Equipment)-[:ASSEMBLED_WITH]-&gt;(Part)            // Bill of materials
(Equipment)-[:TRIGGERS_ERROR]-&gt;(FaultCode)       // Telemetry and failure history
(Supplier)-[:SUPPLIES]-&gt;(Part)                   // Vendor source for components
(FaultCode)-[:RESOLVED_BY]-&gt;(Procedure)          // Problem to solution mapping
(Procedure)-[:REQUIRES_PART]-&gt;(Part)            // Materials needed for a fix
(Procedure)-[:DETAILED_IN]-&gt;(Manual)             // Grounds the fix in documentation
(InventoryLog)-[:TRACKS_STOCK]-&gt;(Part)           // Current warehouse availability
(Project)-[:MODIFIES]-&gt;(Equipment)               // Assets under active maintenance work
(ProjectDoc)-[:DOCUMENTS]-&gt;(Project)             // Paperwork linked to an initiative
(Chunk)-[:EXTRACTED_FROM]-&gt;(Manual)              // Document lineage
(Chunk)-[:EXTRACTED_FROM]-&gt;(ProjectDoc)          // Document lineage
(Chunk)-[:MENTIONS_EQUIPMENT]-&gt;(Equipment)       // NLP-extracted semantic link
(Chunk)-[:MENTIONS_PART]-&gt;(Part)                 // NLP-extracted semantic link
(Chunk)-[:MENTIONS_FAULT]-&gt;(FaultCode)           // NLP-extracted semantic link
(Chunk)-[:MENTIONS_PROCEDURE]-&gt;(Procedure)       // NLP-extracted semantic link
(Chunk)-[:MENTIONS_SUPPLIER]-&gt;(Supplier)         // NLP-extracted semantic link
(Chunk)-[:NEXT_CHUNK]-&gt;(Chunk)                   // Sequential reading order</code></pre></div><h3>Hybrid Retrieval Pattern</h3><p>We have not abandoned vector search entirely while implementing the Graph RAG architecture. We have assigned Vector Search and Graph Traversals to two distinct Jobs.</p><h4>Vector first with Graph expansion</h4><p>When a query contains natural language without clear primary keys, vector search acts as an entry point to find candidate chunks, which are then expanded through graph edges to fetch grounded domain context.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;fb7e6f90-f92b-4d53-9cf8-d9a83eb1a5ef&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">CALL db.index.vector.queryNodes('chunk_vector_index', 5, $question_embedding)
YIELD node AS chunk, score
MATCH (chunk)-[:MENTIONS_EQUIPMENT]-&gt;(e:Equipment)
OPTIONAL MATCH (e)-[:ASSEMBLED_WITH]-&gt;(part:Part)
RETURN 
  chunk.text AS manual_text, 
  e.model AS model, 
  collect(part.name) AS components, 
  score</code></pre></div><h4>Entity first deterministic traversal</h4><p>When a query contains explicit identifiers, such as a specific machine model or a fault code, vector embeddings are bypassed entirely. The system anchors directly onto the target nodes and walks the explicit relationships.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6ece4402-a350-492c-86cd-1c0561bc4fad&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">MATCH (e:Equipment {id: $equipment_id})-[:TRIGGERS_ERROR]-&gt;(f:FaultCode {code: $fault_code})
MATCH (f)-[:RESOLVED_BY]-&gt;(p:Procedure)-[:REQUIRES_PART]-&gt;(part:Part)
OPTIONAL MATCH (part)&lt;-[:TRACKS_STOCK]-(inv:InventoryLog)
MATCH (p)-[:DETAILED_IN]-&gt;(m:Manual)&lt;-[:EXTRACTED_FROM]-(c:Chunk)
RETURN 
  p.title AS procedure, 
  part.sku AS required_part, 
  sum(inv.quantity) AS stock_level, 
  collect(c.text) AS documentation</code></pre></div><h3>How it helped?</h3><p>So, now our schema and Retrieval patterns are set, let us return to the original question</p><blockquote><p><em><strong>How do I resolve Fault 414 on the CNC Lathe Model 800, and are the replacement parts in stock?</strong></em></p></blockquote><p>Instead of passing this text to a vector index and praying it does not pick the Model 600 manual, the system extracts the entities (<code>model: 'CNC Lathe Model 800'</code>, <code>fault: '414'</code>) and runs a single graph traversal</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9b0136e1-3a7d-4b09-97bc-66c9707f3367&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">MATCH (e:Equipment {
  model: 'CNC Lathe Model 800'
})-[:TRIGGERS_ERROR]-&gt;(f:FaultCode {code: '414'})
MATCH (f)-[:RESOLVED_BY]-&gt;(p:Procedure)
MATCH (p)-[:DETAILED_IN]-&gt;(m:Manual)&lt;-[:EXTRACTED_FROM]-(c:Chunk)
OPTIONAL MATCH (p)-[:REQUIRES_PART]-&gt;(part:Part)
OPTIONAL MATCH (part)&lt;-[:TRACKS_STOCK]-(inv:InventoryLog)
RETURN 
  e.model AS Equipment,
  f.code AS Fault,
  p.title AS ResolutionProcedure,
  part.name AS PartNeeded,
  coalesce(sum(inv.quantity), 0) AS StockAvailable,
  collect(DISTINCT c.text) AS ManualChunks</code></pre></div><p>Look at what this traversal guarantees that vector search structurally cannot</p><h4>Zero Path to Model 600</h4><p>The traversal starts specifically at the <code>Equipment</code> node where <code>model = 'CNC Lathe Model 800'</code>. The Model 600 manual does not exist in this subgraph. There is no mathematical possibility of returning the wrong manual.</p><h4>Real-Time Stock Calculation</h4><p>The stock count is not pulled from a text chunk written three years ago. It executes a live <code>sum()</code> over active <code>InventoryLog</code> nodes attached to the required part.</p><h4>Deterministic Prompt Context</h4><p>The payload handed to the LLM contains explicit key-value parameters (exact procedure title, part SKU, current stock integer) alongside the verified manual chunks.</p><h2>What it unlocks further?</h2><p>Once the physical structure of a plant lives inside a graph, you can answer complex operational questions that vector search cannot even attempt.</p><h4>Supplier Swaps and Downstream Impacts</h4><blockquote><p><em><strong>If we swap the hydraulic pump from supplier A with supplier B on the main assembly line, what downstream procedures need rewriting, and do we have the required new safety manuals already indexed?</strong></em></p></blockquote><p>A vector search cannot solve this because &#8220;downstream impact&#8221; is a structural concept. </p><p>In Graph RAG, the query traverses <code>Part (Supplier A) &lt;-[:REQUIRES_PART]- Procedure -[:DETAILED_IN]-&gt; Manual</code> and compares it against <code>Part (Supplier B)</code> relationships across active <code>Equipment</code> nodes.</p><h4>Preemptive Maintenance across Subassemblies</h4><blockquote><p><em><strong>Find every active piece of equipment that shares a subassembly with the conveyor system that failed yesterday, and check if the warehouse has enough replacement belts to preemptively service all of them tonight.</strong></em></p></blockquote><p>This query spans four distinct domains, failure history, bill-of-materials, active asset status, and real-time inventory. Vector embeddings cannot calculate shared subassembly topologies across disparate equipment types. </p><p>A graph traversal handles it in a single pass.</p><h2>The overall impact</h2><p>After three months of monitoring the deployment, operational feedback showed a fundamental shift in how technical teams interacted with system documentation.</p><p>Before moving to Graph RAG, resolving a multi-domain technical question meant working across departmental silos. A technician had to check paper manuals or PDFs for repair steps, open an ERP terminal to check part inventory, and consult a maintenance log to verify equipment revisions, often taking hours or days of manual coordination for a single complex query.</p><p>After deploying the graph architecture, cross-domain queries resolved in a single traversal. Technicians received verified, model-accurate documentation alongside real-time inventory counts without jumping between systems.</p><div><hr></div><h2>Conclusion</h2><p>Vector search is excellent for unstructured natural language search bars. It is dangerous when used as the primary lookup engine for physical, high-stakes infrastructure.</p><p>When a wrong answer means damaged hardware, line downtime, or safety hazards, you cannot rely on linguistic proximity. Connect your domain entities, map your relationships, and let the graph supply the truth.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Is your NextJS App actually secure? ]]></title><description><![CDATA[In May 2026, Vercel published a massive, coordinated security release addressing 13 separate advisories across Next.js. Vercel didn&#8217;t just patch a vulnerability. They patched a patch.]]></description><link>https://www.binarybox.org/p/is-your-nextjs-app-actually-secure</link><guid isPermaLink="false">https://www.binarybox.org/p/is-your-nextjs-app-actually-secure</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Sat, 29 Aug 2026 06:00:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!P7Sb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P7Sb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P7Sb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 424w, https://substackcdn.com/image/fetch/$s_!P7Sb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 848w, https://substackcdn.com/image/fetch/$s_!P7Sb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 1272w, https://substackcdn.com/image/fetch/$s_!P7Sb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P7Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Next.js Patches Nine Security Flaws Enabling SSRF, Authentication Bypass,  and DoS Attacks&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Next.js Patches Nine Security Flaws Enabling SSRF, Authentication Bypass,  and DoS Attacks" title="Next.js Patches Nine Security Flaws Enabling SSRF, Authentication Bypass,  and DoS Attacks" srcset="https://substackcdn.com/image/fetch/$s_!P7Sb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 424w, https://substackcdn.com/image/fetch/$s_!P7Sb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 848w, https://substackcdn.com/image/fetch/$s_!P7Sb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 1272w, https://substackcdn.com/image/fetch/$s_!P7Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ac032d-d458-4e7c-bb7a-d99402bc04d1_1672x941.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In May 2026, Vercel published a massive, coordinated <strong><a href="https://vercel.com/changelog/next-js-may-2026-security-release">security release</a></strong> addressing 13 separate advisories across Next.js.</p><p>Tucked deep inside the release notes was one line that should make every engineering lead pause</p><blockquote><p><em>App Router segment-prefetch bypass, incomplete fix follow-up.</em></p></blockquote><p>Read that phrase again. Vercel didn&#8217;t just patch a vulnerability. They patched a patch. A security fix shipped to resolve an authorization bypass failed to close the underlying gap, requiring a second emergency release to clean up what the first one missed.</p><p>Alongside it in the same May snapshot were three more advisories carrying the exact same mechanism: an auth bypass via App Router segment-prefetch URLs, a Pages Router i18n default-locale path bypass, and a dynamic route parameter injection flaw. Vercel&#8217;s advisory statement was unusually direct</p><blockquote><p> <em>Affects applications that rely on middleware.js or proxy.js for authorization.</em></p></blockquote><p>Worse, Vercel noted that unlike previous high-severity bugs, they had not deployed platform-level WAF rules for this release because these advisories could not be reliably blocked at the WAF layer. If your application relied on middleware to enforce access controls, platform-level network shields couldn&#8217;t save you. You had to patch your application code.</p><p>Five distinct authorization bypasses have hit Next.js in fourteen months. They aren&#8217;t isolated accidents. They are the predictable output of an architectural mismatch.</p><h2>Where this started?</h2><p>Most teams remember when the dam broke.</p><p>On March 21, 2025, security researchers disclosed <strong><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-29927">CVE-2025-29927</a></strong>, a CVSS 9.1 critical vulnerability affecting virtually every active production version of Next.js.</p><p>The root cause was disarmingly simple. Next.js used an internal header <code>x-middleware-subrequest</code> to prevent infinite loops when middleware invoked sub-requests. The framework trusted this header implicitly. If an incoming HTTP request contained <code>x-middleware-subrequest: true</code>, Next.js assumed middleware had already executed and skipped <code>middleware.js</code> entirely.</p><p>Attackers didn&#8217;t need a zero-day payload or a buffer overflow. They added a single HTTP header to their request, bypassed every authentication gate living inside middleware, and hit protected backend routes directly.</p><p>Vercel protected Vercel-hosted deployments at the platform edge almost immediately, but self-hosted applications running <code>next start</code> with <code>output: "standalone"</code> were left wide open until maintainers manually updated their dependencies.</p><p>In their post-mortem analysis of the March 2025 flaw, Datadog Security Labs reached a conclusion that foreshadowed everything to come</p><blockquote><p><em>Middleware should supplement, not replace, robust security measures placed closer to the data source.</em></p></blockquote><p>The industry treated CVE-2025-29927 as a one-off header-spoofing bug. They updated their package locks, closed the ticket, and went back to work.</p><p>That was a mistake.</p><h2>What happened next?</h2><p>Over the next fourteen months, the bypasses kept coming. Each arrived with a new CVE number, a new technical description, and the exact same structural flaw.</p><p>Look at the timeline</p><h4>Pages Router i18n Bypass (<a href="https://nvd.nist.gov/vuln/detail/CVE-2026-44573"><span data-color="#6400eb" style="color: rgb(100, 0, 235);">CVE-2026-44573</span></a>)</h4><p>In Pages Router applications with internationalization (<code>i18n</code>) enabled, middleware evaluated standard request paths but failed to recognize the locale-less data route at <code>/_next/data/&lt;buildId&gt;/&lt;page&gt;.json</code>. A request sent directly to that JSON endpoint bypassed middleware entirely, returning full server-rendered JSON payloads&#8212;including whatever sensitive data <code>getServerSideProps</code> fetched&#8212;without firing authentication checks.</p><h4>Dynamic Route Injection (<a href="https://nvd.nist.gov/vuln/detail/CVE-2026-44574"><span data-color="#6400eb" style="color: rgb(100, 0, 235);">CVE-2026-44574</span></a>)</h4><p>Patched in the May 6, 2026 coordinated release. Middleware inspected the visible URL path, a public route like <code>/safe</code> and approved the request. But the App Router resolved the underlying page using internal, injected routing parameters that pointed to a protected route. Middleware evaluated what it saw; the framework rendered what was injected.</p><h4>App Router Transport Exploits (<a href="https://nvd.nist.gov/vuln/detail/CVE-2026-44575"><span data-color="#6400eb" style="color: rgb(100, 0, 235);">CVE-2026-44575</span></a>)</h4><p>Patched in the same May 2026 window. This flaw exploited internal App Router transport formats, specifically <code>.rsc</code> and segment-prefetch requests. By requesting alternate payload formats directly, attackers bypassed the matching logic configured inside middleware.</p><h4>July 2026 Security Release</h4><p>Vercel patched yet another authorization bypass specific to App Router applications compiled with Turbopack containing a single entry in <code>config.i18n.locales</code>.</p><h2>So, what is the issue?</h2><p>We should not treat these as five separate bugs. They are five different expressions of a single structural gap</p><p>Middleware checks one representation of a request, while the App Router resolves the page using a different, parallel representation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rHWH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rHWH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 424w, https://substackcdn.com/image/fetch/$s_!rHWH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 848w, https://substackcdn.com/image/fetch/$s_!rHWH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 1272w, https://substackcdn.com/image/fetch/$s_!rHWH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rHWH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png" width="1456" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:122072,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/213105704?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rHWH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 424w, https://substackcdn.com/image/fetch/$s_!rHWH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 848w, https://substackcdn.com/image/fetch/$s_!rHWH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 1272w, https://substackcdn.com/image/fetch/$s_!rHWH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe2c1ba-1ead-451b-b737-cc01d7663e39_2016x692.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Middleware evaluates a visible URL, a header string, or a matcher regex pattern. But the App Router is a complex, multi-transport engine handling Server Components, prefetch segments, JSON data routes, and locale rewrites.</p><p>Whenever the representation checked by middleware fails to match the representation resolved by the renderer, the check breaks. Patching the matcher doesn&#8217;t solve the problem. It just waits for the next transport feature to introduce another mismatch.</p><h2>Not just a security flaw but a design mismatch</h2><p>To understand why this gap exists, you have to look at how middleware was engineered.</p><p>Middleware in Next.js runs on the Edge Runtime. It executes on every single matched request before the request touches the Node.js server or rendering engine.</p><p>Because it sits on the edge and intercepts every incoming request, performing heavy database calls or session lookups inside middleware creates a massive performance penalty. If every static asset, API call, and page navigation has to wait for an edge function to query a database across the network, latency spikes across your entire application.</p><p>For years, Next.js tutorials and community guides recommended keeping middleware lightweight. Check if a session cookie exists, verify its signature, and redirect unauthenticated users etc.</p><p>Teams took that guidance and made an operational leap. They turned middleware into their primary access control layer. They assumed that if middleware approved the request, downstream Server Components and API routes were safe.</p><p>That assumption violated the core constraints of the platform. Middleware was designed as a fast pre-flight filter to speed up user redirection, not an authoritative policy enforcement point. Teams used it as a security guard because it was convenient, ignoring the fact that the framework&#8217;s own rendering engine had backdoor paths around it.</p><h2>Do we have a fix?</h2><p>Vercel didn&#8217;t just ship patches for these CVEs. They overhauled their official documentation to tell developers to stop using middleware as an authorization boundary.</p><p>Next.js&#8217;s current official <strong><a href="https://nextjs.org/docs/app/guides/data-security">security guide</a></strong> explicitly mandates the <strong>Data Access Layer (DAL)</strong> pattern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sUqA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sUqA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 424w, https://substackcdn.com/image/fetch/$s_!sUqA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 848w, https://substackcdn.com/image/fetch/$s_!sUqA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 1272w, https://substackcdn.com/image/fetch/$s_!sUqA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sUqA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png" width="1456" height="609" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:609,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:182855,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/213105704?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sUqA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 424w, https://substackcdn.com/image/fetch/$s_!sUqA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 848w, https://substackcdn.com/image/fetch/$s_!sUqA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 1272w, https://substackcdn.com/image/fetch/$s_!sUqA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e67970e-02f2-436f-94c6-098f5cf4c2cd_2200x920.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Instead of trusting the routing layer to block unauthorized requests, authentication and authorization checks must sit inside dedicated, server-only modules placed directly next to database calls.</p><p>The documentation applies this rule to both reads and mutations</p><blockquote><p><em>Just as we recommend a Data Access Layer for reading data, you can apply the same pattern to mutations. This keeps authentication, authorization, and database logic in a dedicated server-only module, while </em><code>use server</code><em> actions stay thin.</em></p></blockquote><p>Vercel&#8217;s current security audit checklist asks point-blank</p><blockquote><p><em>Is there an established practice for an isolated Data Access Layer? Verify that database packages and environment variables are not imported outside the Data Access Layer.</em></p></blockquote><p>This marks an acknowledged shift in official framework guidance. Community guides and vendor documentations now carry explicit warnings. <strong>Middleware is no longer considered safe for primary authorization</strong>.</p><p>A useful mental model for this shift comes from security tooling provider WorkOS. <strong>Middleware is the bouncer at the front door; the Data Access Layer is the gate agent checking the boarding pass</strong>.</p><p>The bouncer can be tricked by a fake ID, a back-door entrance, or a bad matcher rule. But even if an attacker tricks the bouncer and slips inside the building, the gate agent stands directly in front of the airplane door. If they don&#8217;t have a valid boarding pass attached to that specific seat, they don&#8217;t get on the plane.</p><p>In code, that means moving from this</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;javascript&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-javascript">// &#10060; DANGEROUS: Relying on middleware to protect this component
export default async function AdminDashboard() {
  const data = await db.adminStats.findMany(); // Assumes middleware already checked auth
  return &lt;AdminView data={data} /&gt;;
}</code></pre></div><p>To this</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;javascript&quot;,&quot;nodeId&quot;:&quot;d0f03ca1-fc6f-4562-b7c6-473581bbf450&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-javascript">// &#9989; SECURE: Authoritative check inside the Data Access Layer
import { verifyAdminSession } from &#8216;@/app/lib/dal&#8217;;

export default async function AdminDashboard() {
  // DAL function verifies session &amp; permissions directly at execution time
  const data = await verifyAdminSession(async () =&gt; {
    return await db.adminStats.findMany();
  });

  return &lt;AdminView data={data} /&gt;;
}</code></pre></div><h2>Conclusion</h2><p>If you configured your Next.js authentication model in 2023 or 2024 by dropping check logic into <code>middleware.ts</code> and assuming your backend routes were secure, your architecture is built on outdated guidance.</p><p>Five advisories in fourteen months proved that URL matchers and edge proxy checks cannot guarantee that a request won&#8217;t resolve to a protected payload.</p><p>Here is your remediation checklist</p><ol><li><p><strong>Audit </strong><code>middleware.ts</code><strong> immediately - </strong>Treat middleware strictly as an optimization tool for fast redirects and preliminary cookie presence checks. Remove all hard security assumptions from it.</p></li><li><p><strong>Build an isolated Data Access Layer -</strong> Wrap every database query, internal API call, and Server Action mutation in dedicated server-only functions (<code>import 'server-only'</code>) that execute explicit permission checks before returning data.</p></li><li><p><strong>Never trust request context -</strong> Verify permissions using server-side session tokens retrieved directly inside the Data Access Layer, not passed-down custom headers or route parameters.</p></li></ol><p>Vercel spent fourteen months patching edge bypasses before updating their docs to tell you what security architects knew all along. <strong>Never enforce security policies at the routing layer.</strong></p><p>Update your code dependencies. But more importantly, update your architecture.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[How to Audit AI-Generated Code at Scale]]></title><description><![CDATA[To build an engineering organization that survives AI generation, you have to separate verification into two distinct problems.]]></description><link>https://www.binarybox.org/p/how-to-audit-ai-generated-code-at</link><guid isPermaLink="false">https://www.binarybox.org/p/how-to-audit-ai-generated-code-at</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Thu, 27 Aug 2026 06:01:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Wu8V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wu8V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wu8V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Wu8V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Wu8V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Wu8V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wu8V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;What Is AI Code Review? | IBM&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="What Is AI Code Review? | IBM" title="What Is AI Code Review? | IBM" srcset="https://substackcdn.com/image/fetch/$s_!Wu8V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Wu8V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Wu8V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Wu8V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c97bbf-4bc3-4d1c-aab0-9571d94fa2de_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In mid-December 2025, Amazon&#8217;s autonomous AI coding agent, <strong><a href="https://kiro.dev/">Kiro</a></strong>, decided to delete and recreate a live production environment.</p><p>The environment was AWS Cost Explorer in the mainland China region. The resulting outage lasted 13 hours.</p><p>Kiro did not execute this wipe through a zero-day exploit or a hallucinated terminal command. It inherited the elevated permissions of the senior engineer running the session. That inheritance bypassed the standard two-person sign-off requirement designed to block destructive actions on live production infrastructure.</p><p>When Amazon released its public statement on February 21, 2026, the company attributed the incident to <strong>&#8220;user error, specifically misconfigured access controls.&#8221;</strong> The tool itself was not named as the root cause. The human who configured the credentials was.</p><p>The interesting fact is not that an autonomous script wiped a database. Automation has been breaking production environments since shell scripting was invented.</p><p>The real story is that the guardrail existed on paper, failed in practice, and was ignored in executive reviews because the organization was optimizing for a completely different number.</p><h2>What happened before the incident</h2><p>Three weeks before Cost Explorer went down in China, Amazon&#8217;s engineering leadership set a target.</p><p>On November 24, 2025, an internal memo signed by Peter DeSantis (SVP of AWS Utility Computing) and Dave Treadwell (SVP of eCommerce Foundation) established Kiro as Amazon&#8217;s standardized internal AI coding tool.</p><p>The memo set an explicit corporate OKR - <strong>80%</strong> weekly active adoption across engineering teams by the end of the year. The metric was tied directly to team and individual performance evaluations. Any exception required explicit VP approval.</p><p>Amazon&#8217;s engineers did not accept the mandate silently.</p><p>Roughly 1,500 engineers signed an internal petition objecting to the forced rollout before the December outage occurred. The petition argued that external tools specifically Claude Code and Cursor substantially outperformed Kiro on complex, multi-language refactoring tasks. They warned leadership that forcing adoption of an immature internal tool across production codebases introduced structural risk.</p><p>Leadership moved forward anyway. By January 2026, roughly <strong>70%</strong> of Amazon&#8217;s engineering staff had used Kiro.</p><p>From an executive dashboard perspective, the rollout was a massive success. Amazon reported that Kiro shortened pull request cycles by <strong>28%</strong>, backed by <strong>21,000 AI agent</strong>s deployed across Amazon Stores and an estimated <strong>$2 billion</strong> in development cost savings.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vpyy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vpyy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 424w, https://substackcdn.com/image/fetch/$s_!Vpyy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 848w, https://substackcdn.com/image/fetch/$s_!Vpyy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 1272w, https://substackcdn.com/image/fetch/$s_!Vpyy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vpyy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png" width="1456" height="743" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:743,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:378281,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/212571218?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vpyy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 424w, https://substackcdn.com/image/fetch/$s_!Vpyy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 848w, https://substackcdn.com/image/fetch/$s_!Vpyy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 1272w, https://substackcdn.com/image/fetch/$s_!Vpyy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc55f0674-bde5-41da-b03d-43b60f57d519_2742x1400.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The executive layer had full visibility into the engineers&#8217; warnings. They had the budget, the platform team, and 21,000 active agents. But they chose to measure adoption percentage instead of verification capacity.</p><h2>Who to blame?</h2><p>The explanation for the December outage depends on who you ask.</p><p>Amazon&#8217;s official stance remains firm</p><blockquote><p><em>The December incident was a human operational mistake. An engineer misconfigured access controls, allowing Kiro to operate with permissions it should never have possessed.</em></p></blockquote><p>Anonymous sources who spoke to the <strong>Financial Times</strong> described a structural flaw in how Kiro handled identity. Under their account, Kiro was designed to inherit the execution context of the logged-in user. When a senior staff engineer with production write access initiated a session, Kiro implicitly inherited those same rights. The tool did not maintain an independent boundary between &#8220;suggesting a change&#8221; and &#8220;executing an administrative override.&#8221;</p><p>Both claims describe the exact same physical reality from different angles.</p><p>A human misconfigured an access policy. And the automation framework executed a destructive, multi-step infrastructure teardown without an independent execution gate to verify whether the command was authorized.</p><p>Treating credential inheritance as &#8220;user error&#8221; misses the architectural flaw. If an AI agent can execute a production wipe simply because the human sitting at the terminal holds admin rights, the system has no verification layer. It relies entirely on human memory to prevent automated destruction.</p><h2>What happened next?</h2><p>The December outage did not slow the mandate. It took a second, vastly more expensive failure to alter the policy.</p><p>On March 5, 2026, Amazon.com&#8217;s primary retail site went down for six hours. The outage hit checkout, pricing services, and account management, resulting in an estimated <strong>6.3 million</strong> lost orders.</p><p>The root cause was traced to a faulty software deployment following AI-assisted code changes. Between December 2025 and March 2026, internal documentation recorded at least four separate Severity-1 production incidents linked directly to a pattern of AI-assisted changes shipping without sufficient oversight.</p><p>Only after the March 5 retail crash did Amazon alter its engineering governance.</p><p>The company instituted a mandatory policy requiring explicit senior engineer sign-off on all AI-assisted changes authored by junior staff.</p><p>The safety measure that took effect after March 5 could have been implemented on November 24. Nothing prevented it except the organizational decision to prioritize adoption metrics over verification controls. As of late March 2026, the <strong>80%</strong> Kiro adoption mandate remains in place.</p><h2>The Acceleration Whiplash benchmark</h2><p>Amazon&#8217;s experience is an exaggerated version of what is happening across the entire software industry.</p><p>When you collapse the cost of generating code without changing how you check it, the system chokes at the review step.</p><p>Data from <strong><a href="https://www.faros.ai/research/ai-acceleration-whiplash">Faros AI&#8217;s 2026 report</a></strong>, <strong>The Acceleration Whiplash</strong> which benchmarked 22,000 developers across roughly 4,000 engineering teams puts precise numbers on this operational bottleneck</p><ul><li><p><strong>Code Review Lead Time - </strong>Median review time climbed <strong>441.5%</strong> year-over-year.</p></li><li><p><strong>Developer Output - </strong>Individual task throughput rose 33.7 percent over the same period.</p></li><li><p><strong>Unedited AI Acceptance - </strong>The share of AI-generated code developers merged without editing jumped from 20 percent to <strong>60%</strong> in twelve months.</p></li><li><p><strong>Work in Progress (WIP) Stagnation - 26%</strong> more in-progress tasks now sit completely idle for seven days or longer.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X1AO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X1AO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 424w, https://substackcdn.com/image/fetch/$s_!X1AO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 848w, https://substackcdn.com/image/fetch/$s_!X1AO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 1272w, https://substackcdn.com/image/fetch/$s_!X1AO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X1AO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png" width="1456" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:196881,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/212571218?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!X1AO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 424w, https://substackcdn.com/image/fetch/$s_!X1AO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 848w, https://substackcdn.com/image/fetch/$s_!X1AO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 1272w, https://substackcdn.com/image/fetch/$s_!X1AO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72825b62-b79c-445c-ad23-768ae529bc57_3014x1104.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Complementary data from LinearB&#8217;s 2026 benchmark of 8.1 million pull requests shows the same structural imbalance</p><blockquote><p><em>AI-assisted PRs are roughly <strong>2.5 times larger</strong> than human-authored PRs and wait <strong>5 times longer</strong> for a peer review.</em></p></blockquote><p>CircleCI&#8217;s 2026 telemetry reveals the logical endpoint of this pattern</p><blockquote><p><em>while feature branch throughput surged 59% year-over-year, main branch deployment throughput for the median engineering team actually declined.</em></p></blockquote><p>We saw this exact mechanism crash cURL&#8217;s bug bounty program when automated security reports flooded maintainers&#8217; inboxes. Generation velocity exploded, verification capacity stayed fixed, and the system collapsed under the weight of unverified volume.</p><h2>So, how to Audit/Verify AI Generated code?</h2><p>To build an engineering organization that survives AI generation, you have to separate verification into two distinct problems. They require completely different architectural tools.</p><h3>1. Verifying Code Correctness at Merge Time</h3><p>This is the traditional domain of code review and static analysis. The goal is catching bad code before it merges into <code>main</code>.</p><h4>Deterministic Security Scanning</h4><p>Rather than asking an LLM to review another LLM&#8217;s code, point deterministic static analysis tools (SAST) at the four specific vulnerability categories that account for the majority of AI security failures</p><ul><li><p><strong>SQL Injection</strong> (CWE-89)</p></li><li><p><strong>Cross-Site Scripting</strong> (CWE-80)</p></li><li><p><strong>Log Injection</strong> (CWE-117)</p></li><li><p><strong>Insecure Cryptographic Algorithms</strong> (CWE-327)</p></li></ul><h4>The Structured Review Standard</h4><p>FlowVerify&#8217;s 2026 audit framework establishes a five-part checklist for human reviewers handling AI-generated pull requests</p><ol><li><p><strong>CI Audit - </strong>Confirm pipeline pass with no ignored test failures.</p></li><li><p><strong>Duplicate Code Search - </strong>Scan for re-implemented internal utilities.</p></li><li><p><strong>Hand-Traced Path - </strong>Manually walk at least one execution path line-by-line.</p></li><li><p><strong>Targeted Security Check - </strong>Verify inputs against the four CWE categories above.</p></li><li><p><strong>Test Evidence - </strong>Confirm new tests actually exercise the modified execution path, rather than just asserting <code>true == true</code>.</p></li></ol><h4>Package Verification</h4><p>AI models routinely hallucinate dependency names. Before any generated import statement ships to production, run an automated pre-screening check</p><ul><li><p>Verify the package exists on the canonical registry (e.g., npm, PyPI).</p></li><li><p>Confirm the package name matches the intended library rather than a typosquatted malicious domain.</p></li><li><p>Ensure the package is explicitly needed and pinned in the lockfile.</p></li></ul><h4>Correcting the Engineering Metrics</h4><p>Amazon measured adoption percentage and merged PRs. Neither metric catches a broken access control. Engineering teams must replace adoption KPIs with two operational metrics</p><ul><li><p><strong>Revert Rate</strong> on AI-touched pull requests vs. human-authored pull requests.</p></li><li><p><strong>Review Lead Time</strong> across active feature branches.</p></li></ul><h3>2. Gating Agent Authority at Action Time</h3><p>This was Kiro&#8217;s failure mode. The delete command that took down AWS Cost Explorer did not fail because of bad syntax. It failed because an automated process executed an unauthorized, destructive action in real time.</p><p>A perfect code review the week before would not have stopped it.</p><h4>Risk-Tiered Autonomy</h4><p>Implement execution gates based on the potential blast radius of the action</p><ul><li><p><strong>Tier 1 (Low Risk) -</strong> Read-only operations, local scaffolding, unit test generation. Full agent autonomy; no human gate.</p></li><li><p><strong>Tier 2 (Medium Risk) - </strong>Reversible changes to non-critical development environments. Autonomous execution with mandatory asynchronous review after the fact.</p></li><li><p><strong>Tier 3 (High Risk) - </strong>Destructive operations, schema modifications, production deployments, or elevated credential access. Mandatory synchronous human approval at the moment of execution.</p></li></ul><h4>Non-Inherited Execution Credentials</h4><p>An AI agent must <strong>never</strong> implicitly inherit the full permission scope of the human engineer operating the terminal. This was the exact credential gap that allowed Kiro to bypass Amazon&#8217;s two-person sign-off rule. Agent execution contexts must use short-lived, tightly scoped service accounts bounded by explicit action policies.</p><h4>Progressive Delivery &amp; Canary Rollouts</h4><p>Combine execution gates with automated canary deployments. Route <strong>1% to 5% of live traffic</strong> to AI-modified services, backed by automated rollback triggers tied directly to error rates and tail latency metrics.</p><h4>Executable Specifications as Quality Gates</h4><p>Recent academic research into AI-assisted review shows that converting written requirements into executable specifications turns passive guidelines into strict enforcement checks (<strong><a href="https://arxiv.org/abs/2603.25773">arXiv:2603.25773</a></strong>). When an AI agent generates code against an executable specification, the system validates the output against deterministic tests before a human reviewer ever opens the PR.</p><p><em>Note: The authors of the arXiv specification study explicitly note that their benchmark relied on a planted bug corpus rather than a natural production defect sample, making their findings directional rather than definitive</em></p><div><hr></div><h2>Conclusion</h2><p>Amazon possessed every organizational advantage required to build a safe verification layer.</p><p>They had an elite platform engineering org, billions in infrastructure capital, 21,000 active AI agents, and a petition signed by 1,500 senior engineers explicitly pointing out where the internal tool was failing.</p><p>They had the signal. They overruled it to hit an 80% adoption metric on an executive OKR slide.</p><p>The cost of verifying code was always present. For thirty years, it was hidden because writing code was slow enough that verification happened naturally alongside creation. AI severed that relationship. It allowed any team to generate thousands of lines of syntactically valid code in seconds, while dumping the cognitive load of auditing that output onto human reviewers.</p><p>You can measure adoption percentage, force usage OKRs, and celebrate short-term pull request velocity. Or you can build the verification gates, risk-tiered permissions, and review pipelines required to run AI agents safely in production.</p><p>If you skip the verification layer to hit an adoption target, the system will eventually enforce the cost for you&#8212;in lost orders, degraded review cycles, and 13-hour production outages.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Writing code got Free but someone still has to Verify it]]></title><description><![CDATA[Generation got cheap. What stayed expensive was judgment, orchestration, context boundaries, and verification.]]></description><link>https://www.binarybox.org/p/writing-code-got-free-but-someone</link><guid isPermaLink="false">https://www.binarybox.org/p/writing-code-got-free-but-someone</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Tue, 25 Aug 2026 06:01:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wScs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wScs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wScs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 424w, https://substackcdn.com/image/fetch/$s_!wScs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 848w, https://substackcdn.com/image/fetch/$s_!wScs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 1272w, https://substackcdn.com/image/fetch/$s_!wScs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wScs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;57 Bugs in AI-Generated Code: How I Verify Before Shipping | Chudi.dev&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="57 Bugs in AI-Generated Code: How I Verify Before Shipping | Chudi.dev" title="57 Bugs in AI-Generated Code: How I Verify Before Shipping | Chudi.dev" srcset="https://substackcdn.com/image/fetch/$s_!wScs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 424w, https://substackcdn.com/image/fetch/$s_!wScs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 848w, https://substackcdn.com/image/fetch/$s_!wScs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 1272w, https://substackcdn.com/image/fetch/$s_!wScs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bb3569f-b79e-4290-b2ae-91d3a2ae0846_1376x768.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In a single 16-hour window in January 2026, seven security reports landed in <strong><a href="https://en.wikipedia.org/wiki/Daniel_Stenberg">Daniel Stenberg</a></strong>&#8217;s inbox.</p><p>Not one of them identified a real vulnerability.</p><p>Stenberg maintains <strong><a href="https://curl.se/">cURL</a></strong>, the command-line tool that sits at the foundation of almost every connected software system on Earth. Since April 2019, curl&#8217;s bug bounty program on <strong><a href="https://www.hackerone.com/bug-bounty-programs">HackerOne</a></strong> had been a model for open-source security. </p><p>Over seven years, it paid out more than <strong>$100,000</strong> to independent researchers across <strong>87</strong> verified vulnerabilities. Historically, better than <strong>15%</strong> of incoming reports led to a confirmed fix.</p><p>By 2025, that confirmation rate collapsed below <strong>5%</strong>.</p><p>In the first three weeks of 2026, cURL received 20 submissions. Zero were valid. Large language models had turned the labor of writing plausible-sounding security reports into a zero-cost operation. Stenberg called it <strong>&#8220;death by a thousand slops.&#8221;</strong></p><p>His assessment was blunt</p><blockquote><p><em><strong>Not only the volume goes up, the quality goes down. So we spend more time than ever to get less out of it than ever.</strong></em></p></blockquote><p>On January 31, 2026, cURL officially shut down its HackerOne bug bounty.</p><p>Most commentators took this as a simple cautionary tale about AI ruining open source. They missed the real story. Three months later, the underlying math did something far more uncomfortable.</p><h2>So what happened next?</h2><p>In March 2026, just four weeks after shutting it down, Stenberg reopened cURL&#8217;s HackerOne bounty program.</p><p>It wasn&#8217;t because the submission traffic had died off. It hadn&#8217;t. What changed was the underlying model quality.</p><p>As reported by Cybernews in June 2026, the arrival of newer reasoning models suddenly shifted the nature of the incoming queue. The low-effort slop didn&#8217;t disappear, but it was joined by a wall of highly sophisticated, syntactically correct, deeply detailed vulnerability reports.</p><p>Stenberg watched the inbox fill up again</p><blockquote><p><em><strong>Something happened. The reports came back, and they did not slow down.</strong></em></p></blockquote><p>Here is the what actually happened, reopening the program didn&#8217;t fix Stenberg&#8217;s workload. It made it even heavier.</p><p>When the queue was filled with obvious garbage, a human maintainer could skim a report in 30 seconds and throw it out. </p><p>But when an AI generates a 20-page security teardown complete with reproduction scripts, edge-case memory maps, and pseudo-code fixes, you cannot dismiss it out of hand. A human senior engineer has to spend two hours stepping through <strong><a href="https://en.wikipedia.org/wiki/GNU_Debugger">gdb</a></strong> traces to verify whether the flaw is real or a hallucination.</p><p>The cost of producing the report fell to zero. The cost of auditing that report stayed exactly where it was in 1995.</p><p>This is the central asymmetry of the generative AI era. We collapsed the cost of creating technical artifacts, but we didn&#8217;t touch the cost of verifying them. The bottleneck didn&#8217;t vanish. It just shifted from generating the work to checking it.</p><h2>What Industry reports say?</h2><p>If this were isolated to open-source maintainers, it would be a manageable niche headache. It isn&#8217;t. The exact same gap is breaking application security at enterprise scale.</p><p>On August 1, 2026, security firm <strong><a href="https://www.veracode.com/">Veracode</a></strong> published its annual <strong><a href="https://www.veracode.com/resources/analyst-reports/2026-genai-code-security-report/">GenAI Code Security Report</a></strong>. They benchmarked over 100 frontier and open-weight models across four distinct testing cycles dating back to early 2025.</p><p>The findings put hard numbers on what every senior architect has felt intuitively</p><ul><li><p><strong>Syntax Pass Rate - </strong>Near 100%. Models generate code that compiles, runs, and passes basic unit tests without throwing errors.</p></li><li><p><strong>Security Pass Rate - </strong>56%.</p></li></ul><p>That <strong>56%</strong> figure is virtually unchanged from the <strong>55%</strong> mark Veracode recorded in their initial 2025 benchmark. </p><p>Despite trillion-parameter scaling, massive context windows, and advanced reasoning loops, roughly <strong>44%</strong> of AI-generated code tasks still introduce a known, exploitable vulnerability when generated without explicit security prompts.</p><p>Even the top-performing model in their Summer 2026 snapshot GPT-5.5 achieved only a <strong>68%</strong> security pass rate. It still failed nearly one out of every three security tasks. For Java workloads, the mean security pass rate dropped to a dismal <strong>30%</strong>.</p><p>Veracode&#8217;s report framed the problem directly</p><blockquote><p><em>Models may be almost syntactically perfect, but they&#8217;re still failing on nearly half of all tasks where security is needed.</em></p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1TTN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1TTN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 424w, https://substackcdn.com/image/fetch/$s_!1TTN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 848w, https://substackcdn.com/image/fetch/$s_!1TTN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!1TTN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1TTN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png" width="1456" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:201862,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/212519146?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1TTN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 424w, https://substackcdn.com/image/fetch/$s_!1TTN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 848w, https://substackcdn.com/image/fetch/$s_!1TTN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!1TTN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46805f48-a8a9-4c5f-81af-33126ebe9b23_2674x1102.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This structural blind spot is hitting production networks right now. </p><p>The <strong><a href="https://www.verizon.com/business/resources/reports/dbir/">2026 Verizon Data Breach Investigations Report</a></strong> revealed that software vulnerabilities have officially passed stolen credentials as the number one entry point for enterprise data breaches, accounting for <strong>31%</strong> of all confirmed security incidents.</p><p>Meanwhile, industry surveys (including data compiled across Veracode and GitClear) indicate that AI-generated pull requests carry roughly <strong>1.7 times</strong> more defects than human-written code. Yet, only <strong>18%</strong> of enterprises have instituted formal, mandatory AI code review policies.</p><p>We are shipping clean-looking code faster than ever before. We are checking it less than ever before.</p><h2>How its affecting the Job Market?</h2><p>When the cost of producing code drops while the cost of verifying it climbs, the job market shifts.</p><p>The broad media narrative claims that entry-level engineering is dead and AI has eliminated the talent shortage. The actual hiring data tells a completely different story.</p><p>According to ManpowerGroup&#8217;s <strong><a href="https://www.manpowergroup.com/en/insights/2026-global-talent-shortage">2026 Global Talent Shortage Survey</a></strong> which polled 39,063 employers across 41 countries roughly 72% of global tech employers still report severe difficulty filling technical roles.</p><p>For the first time in the survey&#8217;s history, traditional IT and software development skills dropped out of the top spot. They fell to seventh place globally (17% of employers reporting shortages).</p><p>What took their place at the absolute top of the global talent shortage list?</p><ol><li><p><strong>AI Model and Application Development (20%)</strong></p></li><li><p><strong>AI Literacy and Verification Capability (19%)</strong></p></li></ol><p>Jonas Prising, Chair and CEO of ManpowerGroup, noted</p><blockquote><p><em>The rise of AI skills to the top of the shortage list reflects how quickly the talent landscape is evolving.</em></p></blockquote><p>The market isn&#8217;t looking for people who can write code fast. Copilots do that for free. The market is desperately searching for engineers who possess the deep structural knowledge required to audit, verify, and architect systems around AI-generated code.</p><h2>The hiring process itself is changing</h2><p>Nowhere is the verification crisis more visible than in how companies hire.</p><p>In early 2025, a Columbia University student named <strong><a href="https://en.wikipedia.org/wiki/Roy_Lee_(entrepreneur)">Chungin Roy Lee</a></strong> built a lightweight tool called <strong><a href="https://www.interviewcoder.co/">Interview Coder</a></strong>. The application sat hidden during live technical interviews, took real-time screen grabs of LeetCode style coding prompts, and fed back optimal solutions silently in the background.</p><p>Lee used the tool to clear technical loops and land job offers from Amazon, Meta, TikTok, and Capital One. Then he posted a video of himself using it live inside an Amazon interview loop.</p><p>Columbia suspended him. Amazon revoked his offer. Lee didn&#8217;t care. By April 2025, <strong>Interview Coder</strong> had crossed <strong>$3 million</strong> in annualized revenue, and Lee raised <strong>$5.3 million</strong> in venture funding to turn the engine into a broader stealth assistant named <strong><a href="https://cluely.com/">Cluely</a></strong>.</p><p>The standard technical interview, the algorithm puzzle on a shared screen was officially broken. Data from developer evaluation platform interviewing.io indicated that <strong>81%</strong> of technical interviewers suspected candidates of using AI assistance during interviews, with roughly one-third catching a candidate outright.</p><p>Faced with a broken signal, the tech industry split into two distinct camps</p><h4>Strict Interviews</h4><p>Some legacy enterprises responded by doubling down on monitoring. They dragged candidates back into physical office rooms, enforced strict locked-down browser environments, and added grueling live follow-up interrogations. </p><p>They tried to preserve the old LeetCode signal by building bigger walls around it.</p><h4>Different Verification Style</h4><p>Other engineering organizations abandoned memory-based syntax tests entirely. Instead of asking a candidate to implement a binary tree inversion from scratch, they hand the candidate a messy, AI-generated pull request containing three subtle concurrency bugs and a memory leak.</p><p>The candidate&#8217;s score depends entirely on how fast they can spot the hallucinations, correct the underlying architecture, and guide the AI toward a secure implementation.</p><p>Initiatives like the open-source <strong><a href="https://github.com/poteto/hiring-without-whiteboards">Hiring Without Whiteboards</a></strong> repository (now boasting over 50,000 stars on GitHub) reflect this reality. The industry is slowly realizing that testing whether a human can type code from memory is irrelevant when typing code is free. </p><p>The only metric that matters is whether the engineer can tell when the code is wrong.</p><h2>Its all connected</h2><p>If you have been following <strong><a href="https://binarybox.org">BinaryBox</a></strong> over the last few months, this pattern should feel intimately familiar. It is the underlying thread connecting our technical analyses across different domains</p><p><strong><a href="https://www.binarybox.org/p/the-ai-rehiring-panic-everyone-got">The AI Rehiring Panic</a> - </strong>We established that AI easily automates the routine 94 percent of standard tasks, but exposes the remaining 6 percent of edge-case judgment as the true bottleneck holding up enterprise operations.</p><p><strong><a href="https://www.binarybox.org/p/ai-token-economics">The Tokenpocalypse</a> - </strong>We showed how unconstrained agentic execution loops multiply token consumption by 50x to 500x through context rot, proving that raw model generation is worthless without tight local orchestration and strict boundary controls.</p><p><strong><a href="https://www.binarybox.org/p/mcp-pipeline-architecture">Stop Treating MCPs as Plugins</a> -</strong> We demonstrated that an AI assistant will output broken imports and duplicated code unless it is constrained by an NX monorepo pipeline that forces structural context into the session.</p><p>Every single one of these technical shifts stems from the exact same economic reality</p><blockquote><p><em>Generation got cheap. What stayed expensive was judgment, orchestration, context boundaries, and verification.</em></p></blockquote><p>Same mechanism. Five different costumes.</p><div><hr></div><h2>Conclusion</h2><p>It is easy to look at the current landscape and assume senior engineers are immune to the changes sweeping through software development. That is too neat a conclusion.</p><p>Senior engineers who act purely as high-speed typists are just as exposed as junior developers. If your main value contribution is turning a Jira ticket into 200 lines of syntactically valid TypeScript, your margin is evaporating.</p><p>The cost of checking work was always present in software development. It was just invisible for forty years because checking code was tightly bound to the effort of writing it. You wrote a function line by line, thinking through the edge cases, memory allocations, and security boundaries as your fingers moved across the keyboard. Writing and checking happened simultaneously.</p><p>AI severed that link. It unbundled creation from verification.</p><p>It allowed anyone to generate 5,000 lines of syntactically flawless infrastructure-as-code in three seconds. But it left the cognitive burden of verifying that infrastructure entirely on human shoulders.</p><p>Daniel Stenberg didn&#8217;t shut down the curl bug bounty because AI couldn&#8217;t write security reports. He shut it down because AI wrote them so fast that human audit capacity collapsed under the weight.</p><p>Generation is now effectively free. Verification is exposed as the ultimate physical constraint of software engineering. Plan your career and your infrastructure accordingly.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><p>More to read</p><p><em><a href="https://daniel.haxx.se/blog/2026/01/26/the-end-of-the-curl-bug-bounty/">https://daniel.haxx.se/blog/2026/01/26/the-end-of-the-curl-bug-bounty/</a></em></p><p><em><a href="https://www.theregister.com/2026/01/21/curl_ends_bug_bounty/">https://www.theregister.com/2026/01/21/curl_ends_bug_bounty/</a></em></p><p><em><a href="https://www.bleepingcomputer.com/news/security/curl-ending-bug-bounty-program-after-flood-of-ai-slop-reports/">https://www.bleepingcomputer.com/news/security/curl-ending-bug-bounty-program-after-flood-of-ai-slop-reports/</a></em></p><p><em><a href="https://cybernews.com/security/curl-bug-bounty-ai-security-reports-daniel-stenberg/">https://cybernews.com/security/curl-bug-bounty-ai-security-reports-daniel-stenberg/</a></em></p><p><em><a href="https://www.softwareseni.com/curl-bug-bounty-shutdown-and-the-open-source-incidents-that-proved-the-problem-is-real/">https://www.softwareseni.com/curl-bug-bounty-shutdown-and-the-open-source-incidents-that-proved-the-problem-is-real/</a></em></p><p><em><a href="https://www.veracode.com/blog/2026-genai-code-security-report-ai-risk/">https://www.veracode.com/blog/2026-genai-code-security-report-ai-risk/</a></em></p><p><em><a href="https://www.veracode.com/resources/analyst-reports/2026-genai-code-security-report/">https://www.veracode.com/resources/analyst-reports/2026-genai-code-security-report/</a></em></p><p><em><a href="https://sdtimes.com/agentic-security/veracode-finds-ai-generated-code-security-has-barely-improved-since-last-year/">https://sdtimes.com/agentic-security/veracode-finds-ai-generated-code-security-has-barely-improved-since-last-year/</a></em></p><p><em><a href="https://tech-insider.org/ie/ai-generated-code-security-2026/">https://tech-insider.org/ie/ai-generated-code-security-2026/</a></em></p><p><em><a href="https://www.manpowergroup.com/en/news-releases/news/global-talent-shortage-reaches-turning-point-as-ai-skills-claim-top-spot">https://www.manpowergroup.com/en/news-releases/news/global-talent-shortage-reaches-turning-point-as-ai-skills-claim-top-spot</a></em></p><p><em><a href="https://www.hcamag.com/ca/specialization/transformation/ai-skills-top-list-of-hardest-to-find-capabilities-for-employers-worldwide-report/566899">https://www.hcamag.com/ca/specialization/transformation/ai-skills-top-list-of-hardest-to-find-capabilities-for-employers-worldwide-report/566899</a></em></p><p><em><a href="https://spacecomplexity.ai/blog/will-ai-replace-coding-interviews">https://spacecomplexity.ai/blog/will-ai-replace-coding-interviews</a></em></p><p><em><a href="https://interviewcopilot.co/blog/leetcode-senior-staff-engineers-2026">https://interviewcopilot.co/blog/leetcode-senior-staff-engineers-2026</a></em></p><p><em><a href="https://distantjob.com/blog/leetcode-is-dead/">https://distantjob.com/blog/leetcode-is-dead/</a></em></p>]]></content:encoded></item><item><title><![CDATA[The AI rehiring panic everyone got wrong]]></title><description><![CDATA[We all know that roughly 120k tech roles has been cut in the year 2026 and AI was the most cited reason among all.]]></description><link>https://www.binarybox.org/p/the-ai-rehiring-panic-everyone-got</link><guid isPermaLink="false">https://www.binarybox.org/p/the-ai-rehiring-panic-everyone-got</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Sun, 16 Aug 2026 06:02:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zGW8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zGW8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zGW8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zGW8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zGW8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zGW8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zGW8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg" width="1080" height="607" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:607,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;The AI Layoff Bill Is Coming Due, And CTOs Are Going To Pay It Twice :  r/technology&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The AI Layoff Bill Is Coming Due, And CTOs Are Going To Pay It Twice :  r/technology" title="The AI Layoff Bill Is Coming Due, And CTOs Are Going To Pay It Twice :  r/technology" srcset="https://substackcdn.com/image/fetch/$s_!zGW8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zGW8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zGW8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zGW8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23558de7-de70-41cf-9a1c-9e2b86e25d42_1080x607.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You may have hearing or reading that AI is backfiring or Companies bringing the engineers back or AI is failing or The humans are coming back etc etc. Trust me I am reading these for a quite long time. And I start wondering, is it really? </p><p>So being a nerd I started digging deeper and here is what I found.</p><h2>The trend is divided</h2><p>Here is the scale of things everyone is talking about.</p><p>We all know that roughly <strong>120k</strong> tech roles has been cut in the year 2026 and AI was the most cited reason among all. </p><p>Read this report by <strong><a href="https://techcrunch.com/2026/07/06/the-running-list-major-tech-layoffs-in-2026-where-employers-cited-ai/">Challenger, Gray and Christmas</a></strong> if feel otherwise.</p><p>That report mentioned all the tech giants and their layoffs as they were announced.</p><p>PayPal, Microsoft, Meta, Google Amazon and everyone else who cut their workforce in those times marked as AI specific layoffs. But if I look closer that line is still trending downward and companies still laying off their workforce.</p><p>So, I started focusing on the other line which is smaller but louder. Here are some context before I get into it</p><ul><li><p><strong><a href="https://www.cnbc.com/2026/07/01/employers-who-laid-off-workers-for-ai-are-reversing-their-decisions.htmlhttps://www.cnbc.com/2026/07/01/employers-who-laid-off-workers-for-ai-are-reversing-their-decisions.html">The Orgvue survey</a></strong> tells us that <strong>39%</strong> of business leaders made people redundant because of AI and <strong>55%</strong> of those now admit that the decision was wrong.</p></li><li><p><strong>Robert Half </strong>mentioned that thirty two percent of the hiring managers from US have already rehired someone for a role they cut because of AI.</p></li><li><p><strong><a href="https://www.inc.com/bruce-crumley/55-percent-of-leaders-regret-ai-layoffs-and-a-major-hiring-reversal-has-begun/91380901">Forrester is predicting</a></strong> that half of all AI attributed layoffs will eventually be quietly reversed.</p></li></ul><p>So, I can understand why the conclusion you have made seems backed by the data itself. The industry is still in layoff mode and some of those layoffs are being rehired as well both are true at the same time.</p><p>But the story has a lot more to say, actually there are three different failures and each one has a specific engineering cause behind it. Putting them together as <strong>AI is failing</strong> misses the actual lesson in each case and that is the only part worth keeping for our own deployment decisions.</p><h3>Failure 1 - The undocumented knowledge </h3><p>Read this story</p><p><strong><a href="https://allwork.space/2026/07/ibm-ford-and-commonwealth-bank-rehire-staff-after-ai-fails-to-replace-key-roles/">Ford rehired and promoted more than 350 engineers.</a></strong></p><p>But what matters is, the why? </p><p>The knowledge these engineers has to run design reviews before vehicles reach production were undocumented. They knew the failure patterns which they have experienced, the edge cases which was never logged and things which was never written down but was important. All these existed only in their mind. </p><p>So, when Ford trained their system on available data (service records, design specs, test logs etc) was an incomplete version of what those engineers actually knew. And they found that out in a hard way. </p><p>Ford&#8217;s executives estimated this knowledge worth hundreds of millions to help catch those issues early.</p><p>This is not a story where AI is not able to understand vehicle design, it is all about the undocumented knowldge.</p><p>I have experienced this first hand with obviously a less expensive consequences.</p><p>Every Knowledge Graph I have shipped runs into the same undocumented knowledge wall. The system is only as good as what was recorded and available. The most valuable knowledge in most of the organization are the ones live in a senior person&#8217;s head.</p><p>Buying better models cannot fix this, you only fix it by writing down the undocumented knowledge before the AI project starts.</p><h3>Failure 2 - The remaining 6%</h3><p>Using <strong><a href="https://theslowai.substack.com/p/ai-rehiring-workers-replaced">AskHR</a> </strong>(An AI Agent) IBM resolves <strong>94%</strong> of the employee request in their HR function without a single human in the loop. That is commendable result and nobody can deny that.</p><p>But the remaining <strong>6%</strong> is where the actual story is. IBM describe that as <strong>Ethical Dilemmas</strong> and <strong>Complex Situations </strong>which does not fit into their policies as cleanly as it was needed. Simply means those requests needed some judgement instead a lookup into the database. </p><p>So, IBM does not gave up the their AI Agent but it was to announce that they would triple entry level hiring across their US business in the year 2026.</p><p>Another example where <strong>Commonwealth Bank of Australia</strong> faced the similar problem but in different angle. </p><p>They laid off more than 40 of their customer service staff and replaced them with AI Voice Bot. The Bot could not handle the call volume and the cases where human judgement was needed. They reversed the layoffs and admitted that they had not consider all the relevant business cases.<br><br>Both these cases are not a capability failures, AskHR is resolving 94% of the cases correctly, the CBA bot was able to process most of the routine calls. What went wrong was the boundary, when they deployed the system without a precise definition of what was suppose to do in those specific scenarios.</p><p>The 6% number is completely depends on the judgment specific worjloads which training data cannot encode by itself.</p><h3>Failure 3 - The single metric trap</h3><p>I hear a lot about Klarna case and I feel that everybody only reads the headline, if they go past that they would know. </p><p>In the year 2024 <strong><a href="https://www.digitalapplied.com/blog/klarna-reverses-ai-layoffs-replacing-700-workers-backfired">Klarna&#8217;s OpenAI powered Agent</a></strong> handled <strong>2.3 Million</strong> customer service conversations in its first month and cut down the resolution time from <strong>11 Min </strong>to under <strong>2 Min</strong>. The company projected A total of <strong>$40 Million</strong> in savings that year.</p><p>But, within <strong>18 Months</strong> they started rehiring and headlines framed this as a reversal. Actually it was a rebalancing, the AI Agent is still in the front lines for the high volume routine tier support. The human agent was to serve the premium tier for complex cases which involves trust, emotion and risk where resolution time is not that important.</p><p>Look what the <strong><a href="https://getperspective.ai/blog/klarna-ai-customer-service-replacing-700-agents-conversational-ai-case-study">CEO has said</a></strong> about this whole situation. It fits into a clear case of <strong>The single metric trap</strong> as they were only focused on volume and resolution time and has not consider the customer satisfaction etc in the beginning.</p><p>If we pick an easy number to optimize for example resolution time, cost per ticket, tokens per task etc. The data will support you for it but you also need to look at the things you are not measuring, churn, complaints, warranty claims etc. The fix in such scenarios are quite higher then the original savings.</p><p>At the end, this case of Klarna does not prove that AI cannot do customer service, it proved that fixing and optimizing for a single metric will eventually fail.</p><h2>What we should learn from this cases</h2><p>Each of this headlines and cases are there to teach us something and it only become clear when we dig deeper and beyond the headlines</p><h3>The five year clock</h3><p>If you look at the IBM&#8217;s case, their <strong><a href="https://theslowai.substack.com/p/ai-rehiring-workers-replaced">CHRO said</a></strong> that investing in entry level hires is a must otherwise in <strong>3 to 5 years</strong> there will be no pipeline and the well simply dries up. They are doing headcount calculations on a longer clock then completely relying on AI only solution.</p><p>So if we cut that intake today as AI can do the entry level work, we are not eliminating the cost but deferring it into the future with a bigger number.</p><p>I myself has scaled engineering org from 3 to 130 people and I have been on the other side of this exact decision to hire or automate. One thing I have learned in the hard way that automating everything is not possible and we need people to manage the complex workflows and systems.</p><h3>The Duolingo&#8217;s case</h3><p>You may have read that Duolingo&#8217;s CEO announced an AI First memo in the April 2025, he stated only hire if a team cannot automate more of its work. He met with <strong><a href="https://www.staffingindustry.com/news/global-daily-news/duolingo-pulls-back-on-plans-to-shift-from-contractors-to-ai">immediate backlash</a></strong>, <strong>1000s</strong> of comments with <strong>600 reposts</strong> and even <strong>threats to delete the app</strong>. This story and the coverage on it was very wrong in every way that matters.</p><p>In fact,<strong> <a href="https://www.metaintro.com/blog/duolingo-ceo-walks-back-ai-first-memo-hiring-grows-2026">Duolingo never laid off a single full time employee</a></strong>.<strong> </strong>They even keep hiring in the same year the Memo went public. </p><p>In the year 2023 and again in 2024 they cut down <strong>10%</strong> of their <strong>contract workforce</strong> of translators and writers.  In May 2026 they backtracked on their internal policy to evaluate employees on their AI usages due to employees kept asking if they must use the tools for the sake of using them.</p><p>But, the headline said that AI first company reverses course on AI. And the fact was company never touched full time headcount and clarifies on their internal policy after the employee push back.</p><p>So, this story was never about employees or AI failing but contractors are being replaced with the internal systems.</p><div><hr></div><h2>Conclusion</h2><p>Here is what I got and think about this whole AI is backfiring narrative</p><ul><li><p>The rehiring stories are real and each one of them has a specific case to learn. None of them are evidence that AI does not work and cannot do the tasks.</p></li><li><p>Shopify&#8217;s headcount has been very flat and its not because of AI failed but they decided to keep a flat headcount. PayPal, Microsoft and Meta are still laying off and data does not show they are wrong.</p></li><li><p>The tech headcount in 2026 is still declining and roughly <strong>120k</strong> jobs has been cut and not comparable against the rehires. </p></li></ul><p>These stories also gives us a checklist which we can run before we go about deploying AI in our workflow</p><ul><li><p>Make sure you have all the knowledge each person holding before they leave.</p></li><li><p>Not everything can be automated or offload to AI, keeping key persons become important.</p></li><li><p>Pick a mixed of metrics which includes quality before you optimize the easy ones.</p></li><li><p>Plan for at least 5 years on headcount so that you have an active pipeline.</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><em>Further reading</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p></p><p><a href="https://techcrunch.com/2026/07/06/the-running-list-major-tech-layoffs-in-2026-where-employers-cited-ai/">The running list of every major 2026 tech layoff that named AI, TechCrunch</a></p><p><a href="https://www.cnbc.com/2026/07/01/employers-who-laid-off-workers-for-ai-are-reversing-their-decisions.html">Employers who laid off workers for AI are reversing their decisions, CNBC</a></p><p><a href="https://www.inc.com/bruce-crumley/55-percent-of-leaders-regret-ai-layoffs-and-a-major-hiring-reversal-has-begun/91380901">55 percent of leaders regret AI layoffs, Inc.</a></p><p><a href="https://allwork.space/2026/07/ibm-ford-and-commonwealth-bank-rehire-staff-after-ai-fails-to-replace-key-roles/">IBM, Ford, and Commonwealth Bank rehire staff after AI fails to replace key roles, Allwork.Space</a></p><p><a href="https://www.techspot.com/news/112960-more-companies-rehiring-workers-they-replaced-ai-after.html">More companies are rehiring workers they replaced with AI, TechSpot</a></p><p><a href="https://theslowai.substack.com/p/ai-rehiring-workers-replaced">Companies are rehiring the workers they replaced with AI, on IBM&#8217;s AskHR and the entry level pipeline</a></p><p><a href="https://www.digitalapplied.com/blog/klarna-reverses-ai-layoffs-replacing-700-workers-backfired">Klarna reverses AI layoffs, why replacing 700 failed</a></p><p><a href="https://getperspective.ai/blog/klarna-ai-customer-service-replacing-700-agents-conversational-ai-case-study">Klarna AI customer service, replacing 700 agents, a 2026 case study</a></p><p><a href="https://www.metaintro.com/blog/duolingo-ceo-walks-back-ai-first-memo-hiring-grows-2026">Duolingo CEO reverses AI first memo in 2026</a></p><p><a href="https://www.staffingindustry.com/news/global-daily-news/duolingo-pulls-back-on-plans-to-shift-from-contractors-to-ai">Duolingo pulls back on plans to shift from contractors to AI, Staffing Industry</a></p><p><a href="https://techcrunch.com/2025/05/04/is-duolingo-the-face-of-an-ai-jobs-crisis/">Is Duolingo the face of an AI jobs crisis, TechCrunch</a></p><p><a href="https://www.kore1.com/shopify-layoffs-2026/">Shopify layoffs 2026, ecommerce engineering hiring window, KORE1</a></p></div></div>]]></content:encoded></item><item><title><![CDATA[Stop treating MCPs as Plugins. They are a Pipeline.]]></title><description><![CDATA[MCPs are not individual add-ons. They are structural building blocks for a pipeline. When configured as an interconnected graph, MCPs mirror every stage of your development workflow.]]></description><link>https://www.binarybox.org/p/stop-treating-mcps-as-plugins-they</link><guid isPermaLink="false">https://www.binarybox.org/p/stop-treating-mcps-as-plugins-they</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Tue, 28 Jul 2026 06:01:31 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!InMb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!InMb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!InMb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 424w, https://substackcdn.com/image/fetch/$s_!InMb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 848w, https://substackcdn.com/image/fetch/$s_!InMb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!InMb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!InMb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2383346,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/208712903?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!InMb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 424w, https://substackcdn.com/image/fetch/$s_!InMb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 848w, https://substackcdn.com/image/fetch/$s_!InMb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!InMb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F734333fd-a239-4618-8efb-558cc64a9acd_3200x1800.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Count the open tabs sitting on your browser right now</p><ol><li><p><strong>Figma</strong> to inspect the design tokens and layout rules.</p></li><li><p><strong>VS Code</strong> to build the UI component.</p></li><li><p><strong>TablePlus</strong> to verify table schemas and foreign key constraints.</p></li><li><p><strong>Library Docs</strong> to double-check exact method signatures for your installed packages.</p></li><li><p><strong>Localhost browser</strong> to manually refresh and inspect spacing.</p></li><li><p><strong>GitHub</strong> to open a pull request and tag the issue.</p></li><li><p><strong>Sentry</strong> three days later when a null pointer hits production</p></li></ol><p>Seven tools. Seven context switches. Seven places where your original architectural vision falls apart.</p><p>You tab out of Figma into your editor and immediately forget the exact padding tokens. You jump over to a database client to verify a column name and lose the code state in your head. That cognitive drain doesn&#8217;t show up in JIRA metrics, but it burns through engineering energy every day.</p><p>When Model Context Protocol (MCP) landed, most teams treated it like VS Code extensions. They installed a GitHub MCP to create PRs, or a Figma MCP to read layers. They treated MCPs as individual utility add-ons to give Claude Code a little extra help.</p><p>Installing isolated plugins completely misses the real power of the protocol.</p><p>MCPs aren&#8217;t standalone tools. They are structural building blocks for an automated pipeline. When you configure them as an interconnected graph, MCPs map directly to every phase of your software lifecycle. Instead of hopping between apps, a completed pipeline removes manual tool-switching entirely. Design specs, monorepo graphs, database schemas, library docs, browser execution, version control, and production errors sit inside a single session context.</p><p>Here is what a complete full-stack MCP pipeline looks like inside an NX monorepo. Seven stages. Seven MCPs. One continuous session.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;dfc2d0b9-c060-4da8-91f3-b497feb6df44&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">THE FULL-STACK MCP PIPELINE (NX MONOREPO)

[Design]       FIGMA MCP          Design intent &#8594; component spec
    &#8595;
[Codebase]     NX MCP             Project graph &#8594; workspace layout
    &#8595;
[Data]         DATABASE MCP       Schema &#8594; type-safe queries
    &#8595;
[Docs]         CONTEXT7 MCP       Live APIs &#8594; zero hallucinations
    &#8595;
[Visual QA]    PLAYWRIGHT MCP     Browser &#8594; visual verification loop
    &#8595;
[Version Ctrl] GITHUB MCP         Code &#8594; PR &#8594; code review
    &#8595;
[Production]   SENTRY MCP         Errors &#8594; root cause &#8594; automated fix</code></pre></div><h2>Split Your Tools by Category</h2><p>To build a clean system, stop jamming every tool together. Group them into two distinct operational categories</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;bc93ca52-40d1-405d-9176-8792039dc19a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">TWO TYPES OF MCPs

CONTEXT MCPs (Make Claude smarter):
&#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
&#9474; Figma MCP    &#8594; Design intent            &#9474;
&#9474; NX MCP       &#8594; Monorepo architecture   &#9474;
&#9474; Database MCP &#8594; Data shape               &#9474;
&#9474; Context7 MCP &#8594; Library APIs             &#9474;
&#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;
Without these: Claude outputs plausible code 
               that breaks local repository patterns.

ACTION MCPs (Allow Claude to execute):
&#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
&#9474; Playwright MCP &#8594; Browser automation     &#9474;
&#9474; GitHub MCP     &#8594; Version control        &#9474;
&#9474; Sentry MCP     &#8594; Incident management    &#9474;
&#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;
Without these: Claude outputs code blocks 
               and waits for you to copy-paste.
</code></pre></div><p>Context MCPs pipe domain layout directly into the model. Action MCPs hand it execution rights. Give Claude only Context MCPs, and it acts like an advisor giving suggestions. Give it only Action MCPs, and it executes blind actions that wreck local repository patterns. You need both working together.</p><h3>Tool Search &amp; Lazy Loading</h3><p>Running 7 or more MCP servers used to be an absolute disaster. Early setups dumped every tool definition and JSON schema straight into the system prompt at startup. Combining 7 complex MCP servers consumed over 30,000 tokens before you typed a single letter. It drained model attention and blew up API costs.</p><p>The arrival of <strong>MCP Tool Search and Lazy Loading</strong> changed the math. Tools aren&#8217;t dumped into the initial prompt anymore. Claude Code searches for and loads tool schemas dynamically on demand.</p><p>That single architectural update cut initial context consumption by up to 95%. The model keeps its full context window free for actual source code, fetching tool definitions only when a specific pipeline step calls for them.</p><h2>The Pipeline in Detail</h2><h3>Stage 1 &#8594; Design to Code (Figma MCP)</h3><p>Direct inspection of Figma Dev Mode APIs to pull layer hierarchies, auto-layout rules, variants, and design tokens straight from the file.</p><p><strong>Before - </strong>You copy dimensions from Figma inspect panels, guess color values, and manually tweak code across four design review cycles.</p><p><strong>After - </strong>Claude inspects the frame structure directly, pulls defined design tokens, and outputs layout code matched to the design spec.</p><p>Paired with workspace context, Claude maps Figma design tokens directly to your shared <code>libs/ui-components</code> styling setup instead of inventing arbitrary inline styles.</p><p>To setup Figma MCP use the below command</p><p><code>npx -y figma-developer-mcp --stdio</code> </p><p><em>(Requires a paid Figma plan for Dev Mode API access).</em></p><h3>Stage 2 &#8594; Codebase Understanding  (NX MCP)</h3><p>Access to the workspace project graph (<code>nx_workspace</code>), target configs (<code>nx_project_details</code>), workspace generators (<code>nx_generators</code>), and build outputs.</p><p><strong>Before - </strong>Claude treats your monorepo like a flat directory tree. It generates components in the wrong folders, duplicates shared helpers, uses broken relative imports, and violates library boundary tags.</p><p><strong>After - </strong>Claude knows which library owns which domain, imports existing shared UI components, runs workspace generators natively, and respects tags.</p><p>Run <code>npx nx configure-ai-agents</code> to automatically set up workspace MCP integration, Skills files, and <code>CLAUDE.md</code>.</p><h3>Stage 3 &#8594; Data Layer Understanding  (Database MCP)</h3><p>Direct inspection of PostgreSQL, MySQL, or SQLite schemas, including foreign keys, indexes, and column types.</p><p><strong>Before -</strong> You copy SQL scripts into chat prompts or let Claude guess column names, triggering runtime errors.</p><p><strong>After -</strong> Claude reads table shapes dynamically and writes type-safe database queries that match your live schema.</p><p>In multi-service monorepos, map dedicated read-only connection strings per microservice project to enforce service boundaries.</p><p>To setup</p><p><code>npx -y @modelcontextprotocol/server-postgres postgresql://readonly_user:pass@localhost:5432/dev_db</code></p><h3>Stage 4 &#8594; Live Documentation (Context7 MCP)</h3><p>Live documentation and type signatures pulled directly from library source code for the specific package versions listed in your <code>package.json</code>.</p><p><strong>Before -</strong> Claude relies on old training data, using deprecated methods or making up non-existent hooks for fast-changing packages.</p><p><strong>After -</strong> Claude queries Context7 to verify exact API methods for installed dependency versions before writing code.</p><p>Prevents API mismatches in large monorepos with varying package version rules across apps.</p><p>To setup <code>npx -y @upstash/context7-mcp</code></p><h3>Stage 5 &#8594; Visual Verification (Playwright MCP)</h3><p>Headless browser automation that renders components, triggers clicks, checks DOM state, and grabs UI screenshots.</p><p><strong>Before -</strong> You write code, spin up a local server, refresh the browser, inspect elements, and describe visual bugs back to the LLM.</p><p><strong>After -</strong> Claude writes the code, spins up Playwright to snap a screenshot, compares the rendered element against the Figma design spec, and fixes layout bugs automatically.</p><p>Runs component checks directly against Storybook or Cypress targets configured in your <code>project.json</code>.</p><p>To setup <code>npx -y @playwright/mcp@latest</code></p><h3>Stage 6 &#8594; Version Control (GitHub MCP)</h3><p>Full GitHub API capabilities to fetch issues, create branches, push commits, and open pull requests directly from your terminal session.</p><p><strong>Before -</strong> You switch to your browser, create branches, write PR descriptions, link issues, and tag reviewers manually.</p><p><strong>After -</strong> Claude reads the issue criteria, writes the code using NX generators, verifies layout, and opens a structured PR with issue references attached.</p><p>Analyzes changed files via NX to tag codeowners automatically based on modified monorepo libraries.</p><p>To setup <code>npx -y @modelcontextprotocol/server-github</code></p><h3>Stage 7 &#8594; Production Observability (Sentry MCP)</h3><p>Direct access to production stack traces, error frequencies, and root-cause analysis data.</p><p><strong>Before -</strong> Sentry fires an alert -&gt; Open dashboard -&gt; Copy stack trace -&gt; Paste into terminal -&gt; Generate fix -&gt; Apply manually.</p><p><strong>After -</strong> Claude fetches the stack trace through Sentry MCP, finds the exact file in your monorepo, diagnoses the bug, applies the fix, and opens a PR.</p><p>Maps production stack traces directly to the owning NX library using boundary rules.</p><p>To setup <code>npx -y @sentry/mcp-server@latest</code></p><h2>Complete Configuration</h2><p>Here is the exact <code>claude_desktop_config.json</code> setup to run this 7-stage pipeline. Keep your sensitive access tokens inside environment variables.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;63493be1-5b76-4237-af2b-5851c1918468&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "figma-developer-mcp", "--stdio"],
      "env": {
        "FIGMA_API_KEY": "FIGMA_PERSONAL_ACCESS_TOKEN"
      }
    },
    "nx": {
      "command": "npx",
      "args": ["nx-mcp@latest", "--no-minimal"],
      "cwd": "/Users/developer/projects/enterprise-monorepo"
    },
    "database": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://readonly_app:secure_password@localhost:5432/dev_db"
      ]
    },
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    },
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_scoping_token_here"
      }
    },
    "sentry": {
      "command": "npx",
      "args": ["-y", "@sentry/mcp-server@latest"],
      "env": {
        "SENTRY_AUTH_TOKEN": "sntry_your_token_here"
      }
    }
  }
}</code></pre></div><h3>Workspace Settings (<code>.nx/nx-mcp-config.json</code>)</h3><p>To enable full tool capabilities across your monorepo without clashing with local Skills files, add</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;8017d411-9b25-4c1d-b0b2-f156fb953907&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
  "minimal": false
}</code></pre></div><h3>Security Guardrails</h3><h4>Read-Only Database Credentials</h4><p>Never hand write access to your Database MCP. Use a strictly read-only user to block accidental DROP or UPDATE queries during schema checks.</p><h4>Scoped Access Tokens</h4><p>Scope your GitHub token exclusively to repo permissions for necessary organizations. Skip global admin access.</p><h4>Keep Keys Out of Git</h4><p>Store config files with secret tokens outside version control. Add claude_desktop_config.json to .gitignore.</p><p>Check active connections in Claude Code anytime with</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;1b0d6ef4-f568-43d2-8a9e-80371112194c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">/mcp</code></pre></div><p>Every server should show a connected status.</p><h2>End-to-End Execution Example</h2><p>Let&#8217;s look at a common task: &#8220;<strong>Add a UserProfileCard component to the analytics dashboard.</strong>&#8221;</p><p>Here is how the 7-stage pipeline handles it inside one session</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;73f30bc0-215e-4e5f-aa74-52e5abaa4882&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">THE VISUAL IMPLEMENTATION LOOP

Figma MCP reads design frame
    &#8595;
Claude generates React component code
    &#8595;
Playwright MCP renders component in browser
    &#8595;
Playwright captures UI screenshot
    &#8595;
Claude compares screenshot to Figma spec
    &#8595;
Layout discrepancy detected (border-radius mismatch)
    &#8595;
Claude updates component styles
    &#8595;
Playwright verifies layout fix
    &#8595;
Visual match confirmed</code></pre></div><ol><li><p><strong>Design Extraction - </strong>Claude runs <code>figma_get_frame</code> via Figma MCP, parsing spacing rules, font weights, and color tokens for <code>UserProfileCard</code>.</p></li><li><p><strong>Workspace Routing - </strong>Claude checks <code>nx_workspace</code> via NX MCP. It sees that the UI component belongs in <code>libs/shared/ui-components</code>, while data fetching sits in <code>libs/dashboard/data-access</code>.</p></li><li><p><strong>Schema Inspection - </strong>Claude runs <code>postgres_inspect_table</code> via Database MCP to fetch the <code>users</code> table layout, verifying column names (<code>display_name</code>, <code>avatar_url</code>, <code>user_role</code>).</p></li><li><p><strong>API Validation - </strong>Claude uses Context7 MCP to check exact API methods for the installed version of <code>@tanstack/react-query</code>, ensuring code compliance without using deprecated options.</p></li><li><p><strong>Visual Verification - </strong>Claude executes the component via Playwright MCP, captures a screenshot, compares the rendered pixels against the Figma spec, spots an incorrect padding value, and fixes the CSS.</p></li><li><p><strong>PR Automation - </strong>Claude uses GitHub MCP to open a branch, commit files across both monorepo libraries, write a detailed PR description, and tag the issue.</p></li><li><p><strong>Observability Tracking - </strong>Post-deploy, Claude checks Sentry MCP to confirm zero unhandled exceptions hit the new <code>UserProfileCard</code> component.</p></li></ol><h2>Manual vs. Pipeline Workflow</h2><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9e6b3857-7b88-4177-9ad6-4474f64903bc&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">MANUAL WORKFLOW:
Open Figma -&gt; Copy Specs (5 min) -&gt; Context Switch
Open IDE -&gt; Inspect Monorepo Structure (10 min) -&gt; Context Switch
Open DB Client -&gt; Verify Schema (5 min) -&gt; Context Switch
Open Docs -&gt; Verify Package Versions (5 min) -&gt; Context Switch
Implement -&gt; Open Browser -&gt; Manual Inspection (10 min) -&gt; Context Switch
Open GitHub -&gt; Create PR &amp; Write Specs (10 min) -&gt; Context Switch
Open Sentry -&gt; Copy Stack Trace (15 min)

Total Time: ~60 minutes | 6 Context Switches

PIPELINE WORKFLOW:
Prompt: "Add UserProfileCard from Figma to dashboard"
Execution: Pipeline handles context extraction, workspace placement,
           schema mapping, visual QA, PR creation, and error checks.

Total Time: ~15 minutes | 0 Context Switches | 1 Session</code></pre></div><h2>Practical Limitations</h2><p>Keep these real-world limits in mind before deploying</p><p><strong>It doesn&#8217;t replace architecture choices - </strong>NX MCP explains workspace layouts to Claude, but it won&#8217;t handle high-level system design or technical debt decisions for you.</p><p><strong>Visual QA isn&#8217;t flawless - </strong>Playwright catches broken styling, bad alignment, and missing elements. It doesn&#8217;t replace manual accessibility checks or human review.</p><p><strong>Context7 covers public packages - </strong>Proprietary internal libraries won&#8217;t show up in Context7. For internal utilities, use local NX documentation tools (<code>nx_docs</code>).</p><p><strong>Security depends on token discipline - </strong>Broad GitHub permissions or write access to databases create massive vulnerability vectors. Keep your access tokens tightly scoped.</p><div><hr></div><h2>Conclusion</h2><p>Stop thinking about MCPs as isolated plugins to evaluate one by one.</p><p>Your development process is a single connected workflow. Every gap between tools creates friction, and every tab switch drains focus. Model Context Protocols exist to break down those barriers by giving the model structured access to the tools you use every day.</p><p>Shift your primary setup question:</p><p><strong>Old Question -</strong> <em>&#8220;Which MCP plugin should I try next?&#8221;</em></p><p><strong>New Question -</strong> <em>&#8220;Which stage of my development pipeline still forces a manual context switch?&#8221;</em></p><p>Start with <strong>NX MCP</strong> to give Claude awareness of your codebase structure. Add <strong>Figma MCP</strong> for design specs, <strong>Database MCP</strong> for schema validation, <strong>Playwright MCP</strong> for visual feedback loops, <strong>GitHub MCP</strong> for version control, and <strong>Sentry MCP</strong> for production tracking.</p><p>You already use these tools every day. Building a pipeline is simply connecting them together.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Tokenpocalypse - Why Cheap Tokens are Bankrupting Engineering Teams]]></title><description><![CDATA[Cost per token is reduced by 67 to 97% in 3 years but AI bills for engineering teams have never been higher, so the question is why?]]></description><link>https://www.binarybox.org/p/the-tokenpocalypse-why-cheap-tokens</link><guid isPermaLink="false">https://www.binarybox.org/p/the-tokenpocalypse-why-cheap-tokens</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Tue, 21 Jul 2026 06:02:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!j4FO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j4FO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j4FO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 424w, https://substackcdn.com/image/fetch/$s_!j4FO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 848w, https://substackcdn.com/image/fetch/$s_!j4FO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 1272w, https://substackcdn.com/image/fetch/$s_!j4FO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j4FO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp" width="1300" height="612" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:612,&quot;width&quot;:1300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A person holding an open empty wallet seated on stairs&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A person holding an open empty wallet seated on stairs" title="A person holding an open empty wallet seated on stairs" srcset="https://substackcdn.com/image/fetch/$s_!j4FO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 424w, https://substackcdn.com/image/fetch/$s_!j4FO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 848w, https://substackcdn.com/image/fetch/$s_!j4FO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 1272w, https://substackcdn.com/image/fetch/$s_!j4FO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe03563d-f318-4cb7-8b70-a051faaa175b_1300x612.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In early 2023 output tokens for frontier models like GPT 4 cost roughly 60 dollars per million. By early 2025 that price plummeted to under 1.50 dollars per million which is an incredible 97.5 percent price drop in under two years. By Q1 2026 the enterprise blended cost for tokens reached 6.07 dollars per million which is a 67 percent decline year over year.</p><p>Tokens have never been cheaper.</p><p>Yet enterprise AI bills have never been higher.</p><h2>The Jevons Paradox</h2><p>In the nineteenth century the economist William Stanley Jevons observed a counterintuitive phenomenon namely when the efficiency of coal consumption improved the total consumption of coal went up instead of down. Cheaper energy per unit meant that society built vastly more machines and found entirely new ways to consume the resource at scale.</p><p>The exact same economic paradox is playing out across enterprise software architecture today.</p><p>As token prices collapsed engineering teams stopped treating tokens as a scarce resource. They built more ambitious autonomous agents with larger context windows and longer recursive reasoning loops.</p><p>The result is that enterprise AI bills tripled over the last twelve months despite unit prices falling.</p><p>According to the <strong><a href="https://data.finops.org/">FinOps Foundation 2026 State of FinOps report</a></strong> 73 percent of enterprises reported that their AI infrastructure costs exceeded original projections. Managing AI spend has quickly become a critical priority with 98 percent of FinOps practitioners actively governing AI budgets this year up from only 31 percent in 2025.</p><p>We see this playing out at the absolute frontier of technology.</p><p>In April 2026 an internal leaderboard called <strong><a href="https://fortune.com/2026/04/09/meta-killed-employee-ai-token-dashboard/">Claudeonomics leaked from Meta</a></strong>. The dashboard tracked token consumption across 85,000 employees who were using Anthropic Claude models. Engineers competed for gamified titles such as Token Legend and Session Immortal and Cache Wizard.</p><p>The leaderboard revealed that Meta employees collectively consumed 73.7 trillion tokens in roughly 30 days. At public cloud pricing that volume translates to an estimated 9 billion dollars in monthly compute costs. The top individual user alone burned 281 billion tokens in 30 days which is 9.36 billion tokens per day.</p><p>Neither Mark Zuckerberg nor CTO Andrew Bosworth made the top 250 on the board. The leaderboard was shut down within 48 hours of the external leak and Meta is now steering employees away from external models toward their internal tool MetaCode while preparing formal token budgets for 2027.</p><p>This is not a pricing problem. This is a fundamental architectural flaw. We tried to build autonomous agents using the same cloud billing models we use for standard SaaS subscriptions. But the cloud compute model was never designed to handle recursive self correcting execution flows.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;1f401422-9fee-4e37-8a14-874fb1438931&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">TOKEN PRICE vs. ENTERPRISE SPEND (2023 to 2026)

Unit Price Trajectory
2023 GPT 4 Output   | $60.00 per million tokens
2024 Blended Cost   | $15.00 per million tokens
Early 2025 Blended  | $1.50 per million tokens
Q1 2026 Blended     | $6.07 per million tokens

Enterprise AI Spend Trajectory
2024                | Baseline
2025                | +150 percent
2026                | +200 percent (Tripled from baseline)

The Gap = The Jevons Paradox
Cheaper tokens lead to larger context and recursive loops which leads to massive bills</code></pre></div><h2>The Agentic Loop Multiplier</h2><p>To understand why autonomous agents are bankrupting engineering teams we must analyze the physical difference between linear execution and recursive loops.</p><p>A standard LLM chat interaction is a single linear transaction.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{User Prompt} \\rightarrow \\text{Model} \\rightarrow \\text{Response}&quot;,&quot;id&quot;:&quot;NHFZLFPFNM&quot;}" data-component-name="LatexBlockToDOM"></div><p>An agent operates recursively in a continuous loop.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Plan} \\rightarrow \\text{Tool Call} \\rightarrow \\text{Observe} \\rightarrow \\text{Rethink} \\rightarrow \\text{Plan}&quot;,&quot;id&quot;:&quot;IGVPNUUQST&quot;}" data-component-name="LatexBlockToDOM"></div><p>The agent executes this loop continuously until it determines the task is complete or until you hit a hard timeout. The core architectural difference is that every iteration of the loop is not an isolated transaction. Every step must transmit the entire accumulated history of every previous thought tool call and system observation.</p><p>This is the physics of context rot. The weight of prior reasoning and tool outputs must be retransmitted on every single iteration of the loop.</p><p>Look at how the token footprint grows on a typical multi step coding task.</p><ul><li><p><strong>Step 1</strong> which is the initial plan sends the system prompt and the task details which is 2,000 tokens.</p></li><li><p><strong>Step 2</strong> which is reading a target file sends the system prompt the task details the step 1 reasoning and the file contents which is 8,000 tokens.</p></li><li><p><strong>Step 3</strong> which is analyzing the tool output sends the entire history from the previous steps plus the new observations which is 18,000 tokens.</p></li><li><p><strong>Step 10</strong> which is the final execution step sends the accumulated history of all 9 previous steps which easily exceeds 180,000 tokens.</p></li></ul><p>The agent did not execute ten equal steps. It executed ten steps where each step was exponentially larger than the last because it had to retransmit everything that came before.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;b59f6fb2-54ba-48d1-aaea-314b14d50511&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">TOKENS SENT PER AGENT LOOP ITERATION

Step 1  | 2,000 tokens      | ==
Step 2  | 8,000 tokens      | ========
Step 3  | 18,000 tokens     | ==================
Step 5  | 45,000 tokens     | ============================================
Step 8  | 120,000 tokens    | =========================================================...
Step 10 | 180,000 plus      | =========================================================...

Total tokens consumed across all steps exceeds 1.2M tokens
Linear equivalent without context accumulation is roughly 24,000 tokens
The Agentic Multiplier is 50x to 500x</code></pre></div><p>According to the <strong><a href="https://www.navyaai.com/reports/ai-cost-report-token-prices-vs-ai-bill">NavyaAI 2026 AI Cost Report</a></strong> agentic workflows multiply token usage by 50 to 500x compared to equivalent linear workflows. A typical agentic coding task averages 1 to 3.5 million tokens including retries and self correction. A complex debugging session against a frontier model can easily burn over 500,000 tokens in a single run.</p><p>Let us run the math for 1,000 engineers completing 3 agentic tasks per day using frontier models priced at 3.00 dollars per million input tokens and 15.00 dollars per million output tokens.</p><p>If we assume a conservative average of 1,000,000 tokens per task the daily cost reaches 36,000 dollars. This translates to roughly 1.1 million dollars per month or over 13 million dollars per year.</p><p>At Uber scale with 5,000 active engineers and an 84 to 95 percent adoption rate the math becomes explosive. Uber was spending between 500 and 2,000 dollars per engineer per month which exhausted their entire 3.4 billion dollar annual AI budget in just four months. They were forced to implement a hard cap of 1,500 dollars per engineer per month to stop the bleeding.</p><p>Furthermore 72 percent of the production AI cost sits completely outside the model invoice. This hidden loop tax includes the orchestration compute to run the agent loop itself and the vector database retrieval costs and tool call execution overhead and observability logging. When an agent gets stuck in a hallucination loop it burns money across your entire cloud infrastructure simultaneously.</p><p><strong>Quick check &#128071;</strong></p><p>How many tokens does your agent consume per task. If you estimated this by multiplying the number of steps by the average prompt size you are probably underestimating your actual cost by 50x. Pull your actual token usage from your API dashboard for the last 30 days and divide by the completed tasks to see your real cost per task.</p><h2>Tokenmaxxing and Goodharts Law in Action</h2><p>Goodharts Law states that when a measure becomes a target it ceases to be a good measure. In 2026 we saw this play out across engineering cultures that tied productivity directly to token consumption.</p><p>Meta CTO Andrew Bosworth said publicly that spending your salary on tokens gives 10x productivity with no upper limit. Nvidia CEO Jensen Huang stated he would be deeply alarmed if a 500,000 dollar engineer was not burning 250,000 dollars a year on tokens.</p><p>These executive statements turned token consumption into a career advancement metric. The resulting behavior was predictable. Engineers began tokenmaxxing to climb internal leaderboards. Some employees left AI agents running idle for hours executing meaningless research tasks with no real output goal simply to accumulate tokens.</p><p>This behavior highlights a deeper problem with AI code churn. Raw token volume does not equal engineering velocity. This assumption breaks down in three specific ways.</p><h4>Using Frontier Models for Trivial Tasks</h4><p>Using a 60 dollar per million reasoning model for basic regex parsing or file listing is financial recklessness. These tasks do not require advanced reasoning and can be handled by local models at zero cost.</p><h4>The Review Cost of AI Boilerplate</h4><p>AI generates code in milliseconds but that code must still be reviewed by a human engineer. The cost of that review time is completely hidden from your token invoice but it compounds as your repository grows.</p><h4>Retry Entropy</h4><p>When an agent loops back to self correct it generates exponentially more tokens for diminishing returns. The eighth attempt to fix a bug consumes three times the tokens of the first attempt. The correct architecture should have aborted the run and escalated to a human after the third failed attempt.</p><p>Does your team track token consumption. Does it also track features successfully shipped and production rollback rates. If you have the first metric without the second then you do not have a FinOps strategy. You have an expensive leaderboard.</p><h2>The Exit Strategy</h2><p>The fundamental mistake of early agent design was running the entire execution loop in the cloud. You cannot control your cloud costs if you cannot control the loop.</p><p>If a cloud based agent enters a hallucination loop it will silently consume your budget before you can intervene. The cloud model was designed for predictable workloads. Agent loops are neither.</p><p>The AI.cc 2026 AI Infrastructure Report analyzed 2.4 billion enterprise API calls and revealed a massive structural shift. In Q1 2025 enterprises routed 73 percent of their total token volume to the most expensive frontier models. By Q1 2026 that number dropped to 31 percent.</p><p>The companies that optimized early moved to a tiered routing architecture. This architecture achieved a median blended cost of 2.31 dollars per million tokens compared to 18.40 dollars for frontier only deployments which represents an 87.4 percent cost reduction.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;edc7328e-8207-464f-8cce-bea5b93fd204&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">ROUTING ARCHITECTURE vs. BLENDED COST

FRONTIER ONLY STACK (The Q1 2025 Default)
All traffic goes to Claude Opus or GPT 4
Blended Cost | $18.40 per million tokens

TIERED INTELLIGENCE STACK (The Q1 2026 Standard)
+-----------------------------------------------------------+
| Tier 1 Local Edge | 60 to 80 percent of traffic           |
| Llama 3 8B or Qwen 3.5 9B running locally                 |
| Cost | $0.00 per million tokens                           |
+-----------------------------------------------------------+
| Tier 2 Cost Optimised Cloud | 15 to 25 percent of traffic |
| DeepSeek V4 Flash or Gemini Flash                         |
| Cost | $0.14 to $0.50 per million tokens                  |
+-----------------------------------------------------------+
| Tier 3 Frontier | 5 to 15 percent of traffic              |
| Claude Opus or GPT 4o                                     |
| Cost | $3.00 to $15.00 plus per million tokens            |
+-----------------------------------------------------------+
Blended Cost | $2.31 per million tokens (87.4 percent reduction)</code></pre></div><p>The key architectural principle is that the cloud is not where your agent should orchestrate. The cloud is where your agent should escalate.</p><p>Orchestration belongs entirely at the edge. By running the loop itself on local machines or edge devices you can inspect and interrupt execution at zero cost. You can compress or prune the context window before making cloud calls and you can kill runaway loops before they hit your cloud invoice.</p><h2>The Local Agents Implementation </h2><p>Running local orchestration is now highly viable because of unified memory architectures. The MLX framework developed by Apple Research allows developers to run capable reasoning models directly on M series chips at zero API cost.</p><p>Models such as Llama 3 8B and Qwen 2.5 Coder 7B can run natively on local workstations with high token throughput. This allows us to build a local first agent architecture.</p><p>Here is the pattern for a local first loop orchestrator written in Javascript to avoid any syntax requirements for forbidden punctuation.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;javascript&quot;,&quot;nodeId&quot;:&quot;9743f2b3-6319-4933-a43f-25e329054ee1&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-javascript">class LocalAgentOrchestrator {
    constructor() {
        this.localModel = new LocalMLXModel("qwen2.5-coder-7b")
        this.contextManager = new LocalContextManager()
        this.router = new TaskRouter()
        this.maxLoops = 10
    }

    async run(task) {
        let loopCount = 0
        let isComplete = false

        while (loopCount &lt; this.maxLoops &amp;&amp; !isComplete) {
            let context = this.contextManager.compress()
            let plan = await this.localModel.generatePlan(task, context)
            let complexity = this.router.evaluate(plan)

            let result = ""
            if (complexity &gt; 8) {
                result = await this.callFrontierAPI(plan, context)
            } else if (complexity &gt; 4) {
                result = await this.callDeepSeekAPI(plan, context)
            } else {
                result = await this.localModel.execute(plan)
            }

            this.contextManager.append(plan, result)
            isComplete = this.localModel.checkCompletion(result)
            loopCount = loopCount + 1
        }
    }
}
</code></pre></div><p>This local loop pattern ensures that the orchestrator itself never consumes cloud tokens. Cloud APIs are treated as functional tools called only when the local model determines that a specific subtask exceeds its reasoning capability.</p><p>We also use a local RAG layer to solve the context rot problem before it starts. Instead of loading entire file histories into the context window we index the local directory and retrieve only the specific chunks needed for the current step.</p><p>Finally we enforce a strict local budget guard with a hard kill switch to prevent runaway loops.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;javascript&quot;,&quot;nodeId&quot;:&quot;71baad71-8670-4989-a99a-4de9df8f3fc5&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-javascript">class BudgetGuard {
    constructor() {
        this.maxLoops = 10
        this.maxSpendUSD = 2.50
    }

    check(state) {
        if (state.loopCount &gt; this.maxLoops) {
            throw new Error("Hard loop limit exceeded")
        }
        if (state.totalSpend &gt; this.maxSpendUSD) {
            throw new Error("Financial budget exceeded")
        }
    }
}</code></pre></div><p>If your agent does not have a maximum loop count and a strict token budget per task then your current architecture will reproduce the Uber billing crisis at your own scale.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;78f336e2-73d9-4dd0-8d89-1504fc967ebb&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">LOCAL FIRST AGENT ARCHITECTURE

LOCAL LAYER (Zero API Cost)
+-----------------------------------------------------------+
| Local Orchestration Loop running on MLX                   |
| Context Compression and Local RAG                         |
| Task Router evaluating complexity                         |
| Budget Guard and Kill Switch                              |
+-----------------------------+-----------------------------+
                              |
                              | Escalate ONLY when needed
                              v
CLOUD LAYER (Charged per Token)
+-----------------------------------------------------------+
| DeepSeek API for mid complexity reasoning                 |
| Frontier API for high stakes architectural decisions      |
+-----------------------------------------------------------+</code></pre></div><h2>Conclusion</h2><p>The year 2024 was about unmeasured adoption. The year 2025 was about scaling tools regardless of the price. The year 2026 is the reckoning when the bills finally arrived.</p><p>Per token prices fell 67 percent in a single year but enterprise bills tripled over the same period because the Jevons Paradox won.</p><p>Meta Claudeonomics leaderboard is a perfect warning of what happens when consumption is divorced from outcomes. Engineers behaved completely rationally by running idle agents to climb the leaderboard because the metric itself was irrational.</p><p>To survive the tokenpocalypse you must apply three strict architectural corrections.</p><h4>Control the Loop</h4><p>Orchestration belongs entirely at the edge. The cloud is the expensive escalation path and never the default.</p><h4>Route by Complexity</h4><p>The vast majority of your agent traffic does not require frontier models. Use local models and cost optimized APIs to handle the plumbing.</p><h4>Kill Runaway Loops</h4><p>Implement explicit loop limits and token budgets and cost aware kill switches directly into your orchestration logic.</p><p>The only free token is a local token. Every other token is a billing decision. Make those decisions consciously.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[I tested 5 Agent Observability Tools and they all Failed the Causality Test.]]></title><description><![CDATA[LangSmith, Arize Phoenix, Langfuse, LangGraph Studio, and GraphEvals + Neo4j with same scenario, same question: "Which context influenced this decision?" Only GraphEvals + Neo4j passed the test.]]></description><link>https://www.binarybox.org/p/i-tested-5-agent-observability-tools</link><guid isPermaLink="false">https://www.binarybox.org/p/i-tested-5-agent-observability-tools</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Mon, 18 May 2026 06:02:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CqE_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CqE_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CqE_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CqE_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CqE_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CqE_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CqE_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg" width="1303" height="656" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:656,&quot;width&quot;:1303,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:186809,&quot;alt&quot;:&quot;LangSmith vs Langfuse vs Arize Phoenix: LLM Observability in 2026 |  TURION.AI&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="LangSmith vs Langfuse vs Arize Phoenix: LLM Observability in 2026 |  TURION.AI" title="LangSmith vs Langfuse vs Arize Phoenix: LLM Observability in 2026 |  TURION.AI" srcset="https://substackcdn.com/image/fetch/$s_!CqE_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CqE_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CqE_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CqE_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff78c0dc1-abb1-4888-82c0-0c745ac44dc7_1303x656.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Two weeks ago, I published <strong><a href="https://www.binarybox.org/p/why-flat-logs-cannot-debug-ai-agents">an article</a></strong> about how an AI agent system cost a company $240,000. One question kept coming up in the comments: &#8220;Which observability tool should we use to prevent this?&#8221;</p><p>So I tested them. All of them.</p><h4>The Test Scenario</h4><p>I built the same multi-agent system in five different environments</p><p><strong>Agent A (Router)</strong> loads historical Context X from cache<br><strong>Agent B (Researcher)</strong> fetches fresh Context Z<br><strong>Agent C (Decision Maker)</strong> makes final call using both contexts</p><p><strong>The bug: </strong>Context X is 14 days old (stale). Agent C uses outdated information to make a bad decision.</p><p><strong>The debug task: </strong>Start with Agent C&#8217;s bad decision. Find which context caused it and where it originated.</p><p>This is a <strong>causality question</strong>. Not &#8220;what happened when&#8221; (timeline). But &#8220;what caused what&#8221; (relationships).</p><p>I tested five tools, <strong><a href="https://www.binarybox.org/p/why-flat-logs-cannot-debug-ai-agents">GraphEvals + Neo4j</a></strong>,  <strong><a href="https://www.langchain.com/blog/langgraph-studio-the-first-agent-ide">LangGraph Studio</a></strong>, <strong><a href="https://smith.langchain.com/">LangSmith</a></strong>, <strong><a href="https://arize.com/phoenix/">Arize Phoenix</a></strong> and <strong><a href="https://langfuse.com/">Langfuse</a></strong>.</p><p>The results weren&#8217;t what the vendor demos showed.</p><h2>The Benchmark Result</h2><p>Here's what I found.</p><h4>LangGraph Studio</h4><p>LangGraph Studio is a local debugging UI that visualizes LangGraph execution as a Directed Acyclic Graph (DAG).</p><p>For a single trace, this tool is perfect.</p><p>I opened the trace in the browser, clicked through the nodes, saw Context X in the Decision Maker&#8217;s state, and traced it back to the Router.</p><p>Root cause time: <strong>15 minutes.</strong></p><p><strong>But here&#8217;s the trap.</strong></p><p>LangGraph Studio is a debugger, not a database. You cannot query across traces.</p><p>If you process 10,000 agent runs per day, you cannot ask: &#8220;How many decisions used context older than 7 days?&#8221;</p><p>You have to manually open each trace and click through the UI.</p><p><strong>Perfect for development. Useless for production observability at scale.</strong></p><h4>LangSmith</h4><p>LangSmith uses an <strong><a href="https://opentelemetry.io/">OpenTelemetry</a></strong> style span architecture with a waterfall timeline view.</p><p>To find the root cause, I had to:</p><ol><li><p>Open the trace and find the Decision Maker span</p></li><li><p>Expand the nested JSON payload</p></li><li><p>Find the context field and read the timestamp manually</p></li><li><p>Scroll up the timeline to find the Router span</p></li><li><p>Confirm where the context originated</p></li></ol><p><strong>Root cause time: 60-90 minutes of manual JSON archaeology.</strong></p><p>LangSmith shows you <strong>when</strong> things happened. It doesn&#8217;t show you <strong>why</strong>.</p><p>To find causality, you must manually parse data and calculate time deltas in your head. It has no topological query engine.</p><p>You can filter by keyword. You cannot query relationships between spans.</p><h4>Arize Phoenix</h4><p>Arize Phoenix markets &#8220;graph tracing&#8221; prominently. But it&#8217;s built on flat OTLP traces.</p><p>The debugging process was nearly identical to LangSmith</p><ul><li><p>Manually expand JSON payloads</p></li><li><p>Calculate timestamps to find stale context</p></li></ul><p><strong>Root cause time: ~60 minutes.</strong></p><p><strong>The &#8220;graph tracing&#8221; claim is marketing, not architecture.</strong></p><p>You can see parent-child relationships between spans. You cannot query the data flow topology.</p><p>Phoenix has better attribute filtering than LangSmith. But it still fails to answer the causality question without significant manual work.</p><h4>Langfuse</h4><p>Langfuse is functionally similar to LangSmith and Arize Phoenix. Timeline-based waterfall view.</p><p>The debugging process required the same manual JSON digging.</p><p><strong>Root cause time: 60+ minutes.</strong></p><p>This tool proves the divide is not between open-source and paid software.</p><p><strong>The divide is between flat logs and graph databases.</strong></p><p>Langfuse is good for tracking token counts and latency. It fails the causality test at scale.</p><h4>Graph Evals + Neo4j</h4><p>I built a custom instrumentation layer that writes every agent decision and context propagation directly into a Neo4j graph database.</p><p>When Agent C made the bad decision, I ran the below Cypher query</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;graphql&quot;,&quot;nodeId&quot;:&quot;4b7e293e-ba0e-47dc-8c14-4ad514a81c4a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-graphql">MATCH (decision:Decision {id: 'decision_123'})
      -[:INFLUENCED_BY]-&gt;(context:Context)
WHERE context.age_days &gt; 7
RETURN context</code></pre></div><p>The result,<strong> Context X from Agent A, 14 days old. Returned in 2 seconds.</strong></p><p><strong>Root cause time: 40 minutes</strong> (including time to write the query and understand the graph topology).</p><p>This is the only tool that allows you to query causality at scale.</p><p>If you have 10,000 agent executions, you can find every decision influenced by stale context with one command.</p><p><strong>The trade-off: </strong>Requires building your own instrumentation and maintaining the database. Slowest for debugging a single trace, but the only one that scales to bulk analysis.</p><div><hr></div><p><strong>Quick Check:</strong> </p><p>If you use any of these tools, pull up your last agent debugging session. How long did it take to find which context caused the bad output?</p><p>If the answer is &gt; 30 minutes, <strong>you don&#8217;t have causality tracing.</strong></p><p><strong>You have manual log archaeology.</strong></p><h2>Why they failed?</h2><p>Four out of five tools failed the causality test. It comes down to the fundamental data model.</p><h4>Timeline Based Architecture (LangSmith, Phoenix, Langfuse)</h4><p>These tools model execution as <strong>spans</strong> - records of things that happened at specific times.</p><p>They show you a waterfall of boxes stacked vertically. Causality is buried in JSON metadata. Data flow is not a first-class relationship.</p><p>To find a pattern across 1,000 traces, you have to export the data and write a script to parse JSON.</p><p><strong>They record the &#8220;when,&#8221; not the &#8220;why.&#8221;</strong></p><h4>Graph Based Architecture (Neo4j, LangGraph Studio)</h4><p>Agents, decisions, and contexts are nodes. Relationships like <code>PROVIDED_CONTEXT</code> or <code>INFLUENCED_BY</code> are explicit edges.</p><p>This allows topological queries. You&#8217;re not parsing JSON. You&#8217;re querying the shape of execution.</p><p>This is the only way to find multi-hop context propagation at scale.</p><p><strong>The LangGraph Studio Trap</strong></p><p>LangGraph Studio <em>looks</em> like it solves the problem because it draws a graph.</p><p>But a graph UI is not a graph database.</p><p>Studio is a snapshot of one execution. Neo4j is a queryable history of all executions.</p><p><code>Beautiful graph UI &#8800; architectural capability.</code></p><p>You cannot query patterns across thousands of executions in Studio. You can only click through one trace at a time.</p><h2>Which one you should use?</h2><p>Your choice depends on your scale and debugging style.</p><h4>&lt; 100 traces/day &#8594; LangGraph Studio</h4><p>If you&#8217;re generating fewer than 100 traces per day, LangGraph Studio is the best choice.</p><p>Fast visual debugging. Zero custom instrumentation. You can accept manual work for occasional incidents because volume is low.</p><h4>100-1,000 traces/day &#8594; LangSmith or Arize Phoenix</h4><p>If you&#8217;re generating 100-1,000 traces per day, LangSmith or Phoenix are acceptable.</p><p>You get vendor support and standard LLM observability (token tracking, latency).</p><p>Accept that causality debugging will take 60 minutes of manual JSON digging per incident.</p><h4>&gt; 1,000 traces/day &#8594; GraphEvals + Neo4j</h4><p>If you&#8217;re generating more than 1,000 traces per day and need to find patterns in context propagation, build a custom Neo4j solution.</p><p>It&#8217;s the only option that lets you query causality paths across massive datasets in seconds.</p><p><strong>Trade-off:</strong> Higher maintenance burden for the ability to understand why your agents are failing.</p><h2>The lesson learned</h2><p>I didn't set out to prove Neo4j was the best tool. I set out to find which tool could answer the causality question.</p><p>The testing revealed a brutal truth</p><h4>Pretty UIs &#8800; architectural capability.</h4><ul><li><p>LangSmith has a beautiful timeline. Still requires manual archaeology.</p></li><li><p>Arize Phoenix has impressive graphics. Still flat spans underneath.</p></li><li><p>LangGraph Studio is perfect for one trace. Cannot query at scale.</p></li></ul><p><strong>The divide: </strong>Timeline architecture (records "when") vs Graph architecture (records "what caused what").</p><p>If you&#8217;re building complex multi-agent systems, you probably need graph observability.</p><p>But today, the only way to get true graph observability at scale is to build it yourself using Neo4j.</p><div><hr></div><h2>Conclusion</h2><p>Every vendor demo showed me beautiful waterfalls and pretty arrows.</p><p>None showed me how long it takes to answer: &#8220;Which context influenced this decision?&#8221;</p><h4>The Causality Test Results</h4><p><strong>LangSmith</strong></p><ul><li><p>Single trace: 60-90 minutes (manual JSON digging)</p></li><li><p>Bulk queries: Export + script required</p></li><li><p>Verdict: Timeline tool &#10060;</p></li></ul><p><strong>Arize Phoenix</strong></p><ul><li><p>Single trace: 60 minutes (flat span inspection)</p></li><li><p>Bulk queries: Export + script required</p></li><li><p>Verdict: "Graph tracing" is marketing &#10060;</p></li></ul><p><strong>Langfuse</strong></p><ul><li><p>Single trace: 60-90 minutes (timeline analysis)</p></li><li><p>Bulk queries: Export + script required</p></li><li><p>Verdict: Open-source timeline tool &#10060;</p></li></ul><p><strong>LangGraph Studio</strong></p><ul><li><p>Single trace: 15 minutes (visual debugging) &#9989;</p></li><li><p>Bulk queries: No query language</p></li><li><p>Verdict: Debugger, not database &#9888;&#65039;</p></li></ul><p><strong>GraphEvals + Neo4j</strong></p><ul><li><p>Single trace: 40 minutes (slower)</p></li><li><p>Bulk queries: &lt;5 seconds &#9989;</p></li><li><p>Verdict: Only option that scales &#9989;</p></li></ul><p>Beautiful timelines &#8800; causality tracing.</p><p>"Graph" in marketing &#8800; graph database underneath.</p><p>Open Source &#8800; better architecture.</p><p><strong>Before you buy or build, ask the causality question:</strong></p><p>"Show me every decision influenced by context older than 7 days that bypassed the researcher node."</p><p>If the answer is &#8220;export the data and write a script,&#8221; you don&#8217;t have observability.</p><p><strong>You have expensive logs with a nice dashboard.</strong></p><p>If your agents process &lt;100 traces/day, use LangGraph Studio.</p><p>If you need to query thousands of traces, build a custom graph solution.</p><p>Everything else is a timeline tool with varying degrees of polish.</p><p>I tested the tools so you don't have to.</p><p>The one that passes the causality test is the one you have to build yourself.</p><p>For now.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Why LinkedIn is leaving Kafka and Why you should not be worried.]]></title><description><![CDATA[The question you should be asking is simple. If LinkedIn outgrew Kafka at 32 trillion events and you are at 10 million do you actually need Kafka.]]></description><link>https://www.binarybox.org/p/why-linkedin-is-leaving-kafka-and</link><guid isPermaLink="false">https://www.binarybox.org/p/why-linkedin-is-leaving-kafka-and</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Sat, 16 May 2026 06:01:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!NDM_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NDM_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NDM_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 424w, https://substackcdn.com/image/fetch/$s_!NDM_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 848w, https://substackcdn.com/image/fetch/$s_!NDM_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!NDM_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NDM_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg" width="1496" height="700" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:700,&quot;width&quot;:1496,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:337890,&quot;alt&quot;:&quot;Getting Started with Landoop's Kafka on Docker Locally | Jamie Bowman&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Getting Started with Landoop's Kafka on Docker Locally | Jamie Bowman" title="Getting Started with Landoop's Kafka on Docker Locally | Jamie Bowman" srcset="https://substackcdn.com/image/fetch/$s_!NDM_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 424w, https://substackcdn.com/image/fetch/$s_!NDM_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 848w, https://substackcdn.com/image/fetch/$s_!NDM_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!NDM_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab071b27-b7cd-4952-98dc-9ffdd889c7a7_1496x700.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>For the last decade engineering teams made a pilgrimage to Kafka. You deployed it because LinkedIn built it. You assumed that if it was good enough for a company processing billions of events it was certainly good enough for you. You set up your five node cluster with a ZooKeeper ensemble and configured your producer for idempotent writes. You spent three months getting it production ready.</p><p>Your team processes roughly 10 million events per day. LinkedIn operates at 32 trillion events per day in 2026.</p><p>The gap is staggering. You are processing 3.2 million times less than the scale where LinkedIn finally hit the ceiling. And here is the kicker. LinkedIn is moving off Kafka. They built <strong><a href="https://www.linkedin.com/blog/engineering/infrastructure/introducing-northguard-and-xinfra">Northguard and Xinfra</a></strong> to replace it.</p><p>The question you should be asking is simple. If LinkedIn outgrew Kafka at 32 trillion events and you are at 10 million do you actually need Kafka. Or did you cargo cult their infrastructure without understanding the scale that made it necessary.</p><p>The story of LinkedIn replacing Kafka is not a signal that Kafka is dead. It is a lesson in understanding scale. Kafka <strong>scaled</strong> <strong>23,000x</strong> before LinkedIn needed something else. You are running <strong>140x smaller</strong> than where they started in 2011. Let us talk about what actually broke at their scale and why you probably do not have that problem.</p><h2>What broke Kafka at LinkedIn scale?</h2><p>We need to look at the architectural limits of centralized coordination to understand the failure. </p><h4>The problem of Centralized Metadata</h4><p>Kafka relies on a single controller node to manage all partition metadata. The controller handles partition leader elections and replica assignments and metadata updates across every broker. </p><p>At your scale of <strong>100 topics</strong> this works perfectly. At the LinkedIn scale of <strong>400,000 topics</strong> and millions of partitions the controller becomes a catastrophic bottleneck. </p><p>When the controller fails a new leader election must occur via the <strong><a href="https://kafka.apache.org/41/operations/kraft/">KRaft</a></strong> quorum. The new controller must load every single piece of partition metadata into memory and rebuild the state. At the scale of 32 trillion events this reconstruction takes minutes. </p><p>And during that time the infrastructure is essentially frozen. No new topics can be created and no partitions can rebalance. </p><p>Centralized metadata management eventually hits a physical ceiling.</p><h4>The problem of Infra wide Rebalancing</h4><p>When a consumer group rebalances Kafka pauses consumption for the affected partitions. </p><p>At small scale this takes seconds. At LinkedIn scale rebalancing touches millions of partitions across thousands of topics simultaneously. </p><p>This causes infrastructure wide pauses that last for minutes. Even cooperative rebalancing cannot solve this when the sheer number of partitions creates a coordination explosion. </p><p>Consumer lag spikes and downstream systems experience massive latency increases during these coordinated events.</p><h4>The problem of Fixed Partition</h4><p>In Kafka you choose your partition count upfront. If you choose too few you hit a throughput wall. If you choose too many you waste resources. </p><p>As your data grows you cannot dynamically split a partition without downtime. </p><p>For a company with 400,000 topics repartitioning is operationally impossible. It requires stopping producers and migrating data and updating consumers across thousands of applications.</p><h4>The problem of Coordination</h4><p>The metadata storage for millions of partitions reaches gigabytes in size. Every producer and consumer reads this partition metadata on startup. Metadata updates generate massive broadcast traffic across the cluster. </p><p>Coordination mechanisms like ZooKeeper or KRaft eventually hit a physical limit of how much state they can broadcast to every broker in a timely manner.</p><p>Calculate this right now. </p><p>Divide 32 trillion by your daily event volume. If the result is greater than 1 million you are a million times smaller than the scale where these problems appear. </p><p>You do not have a Kafka problem. You have a scale perception problem.</p><h2>How Northguard solves the scale problem?</h2><p>Northguard replaces Kafka with a fundamentally different model designed for the frontier of distributed systems. It uses sharded metadata and range based partitioning and self balancing clusters.</p><h4>Sharded Metadata</h4><p>Instead of a single controller Northguard distributes metadata across vnodes using consistent hashing. Each vnode manages a subset of topics and uses Raft consensus for strong consistency. This removes the single point of coordination.</p><p>If your metadata fits comfortably in a single KRaft quorum you do not need this. LinkedIn needed it because their metadata exceeded the capacity of any single node memory.</p><h4>Range Based Partitioning</h4><p>Instead of fixed partitions Northguard uses ranges. A range is a contiguous slice of the keyspace that can dynamically split or merge without downtime. When a range grows too large it is marked for splitting and child ranges take over the future writes while the old range is sealed.</p><p>If you can estimate your partition count upfront you do not need this complexity. Fixed partitions are simpler to manage until you hit the 400,000 topic mark.</p><h4>Self Balancing Clusters</h4><p>In Northguard new segments are automatically assigned to the least loaded brokers. There is no explicit rebalancing operation required. If a broker fails the existing segments remain and new ones simply go to healthy nodes.</p><p>If your Kafka cluster only rebalances once per quarter then rebalancing is not your bottleneck. LinkedIn needed this because they add brokers and manage 150 clusters constantly. For them manual rebalancing was a full time operational tax.</p><h2>Do you actually need Kafka?</h2><p>We need to use a strict framework based on actual event volume to decide if Kafka really belongs in your stack.</p><p>If you process <strong>less than 10 million events per day</strong> you probably do not need Kafka. <strong><a href="https://redis.io/docs/latest/develop/data-types/streams/">Redis Streams</a></strong> or <strong><a href="https://aws.amazon.com/sqs/">SQS</a></strong> or even <strong><a href="https://www.postgresql.org/docs/current/sql-notify.html">Postgres NOTIFY</a></strong> will work with significantly less operational overhead.</p><p>If you process between 10 million and 100 million events per day managed Kafka like <strong><a href="https://aws.amazon.com/msk/">AWS MSK</a></strong> makes sense. The volume justifies the tool but not the team required to self host it.</p><p>You only hit the scale where self hosted Kafka is justified when you cross 100 million events per day. You only hit the LinkedIn 2011 scale at 1.4 billion events.</p><p>Ask yourself these three questions.</p><ol><li><p>Do you actually need per partition ordering guarantees. If not use SQS.</p></li><li><p>Do you need event replay for backfilling new services. If not use a standard message queue.</p></li><li><p>Do you need exactly once semantics for financial transactions. If yes then Kafka is the right tool.</p></li></ol><p>If you are choosing Kafka because everyone uses it you are cargo culting. Kafka is phenomenal for high throughput event streaming but it comes with a massive operational tax.</p><h2>How LinkedIn migrated?</h2><p>There is a deeper lesson to learn from how LinkedIn migrated away from Kafka. </p><p>They built Xinfra which is a virtualized Pub/Sub layer that abstracts the physical clusters.</p><p>This allowed them to migrate topics from Kafka to Northguard without rewriting their application code. They used a dual write mechanism to ensure zero downtime. This is what mature platform engineering looks like.</p><p>The lesson is not that you should deploy Northguard. The lesson is that you should abstract your infrastructure. Do not let your applications call Kafka APIs directly. Wrap them in an internal library. If you ever outgrow your current tool you will be able to switch without rewriting every service in your company.</p><div><hr></div><h2>Conclusion</h2><p>LinkedIn built Kafka in 2011 because they had a problem that no existing tool could solve at 1.4 billion events. </p><p>They outgrew Kafka at 32 trillion events and built Northguard.</p><p>You are at 10 million events per day. You are 140 times smaller than LinkedIn was when they started with Kafka. You are 3.2 million times smaller than the scale where Kafka breaks.</p><p>Do not choose infrastructure based on who uses it. </p><p>Choose based on what problem you are solving and what scale you are operating at.</p><p>Kafka scaled 23,000 times before LinkedIn needed something else. You will never outgrow Kafka. But you might be wasting forty percent of your platform team&#8217;s time managing a supercomputer when you only need a simple queue.</p><p>LinkedIn built Kafka. LinkedIn outgrew Kafka. You never will. Choose your stack accordingly.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[I benchmarked 5 Languages in Kubernetes and here is what your stack actually costs.]]></title><description><![CDATA[Last month I was called into a war room for a high growth fintech client.]]></description><link>https://www.binarybox.org/p/i-benchmarked-5-languages-in-kubernetes</link><guid isPermaLink="false">https://www.binarybox.org/p/i-benchmarked-5-languages-in-kubernetes</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Thu, 07 May 2026 06:01:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ib5Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ib5Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ib5Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 424w, https://substackcdn.com/image/fetch/$s_!ib5Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 848w, https://substackcdn.com/image/fetch/$s_!ib5Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 1272w, https://substackcdn.com/image/fetch/$s_!ib5Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ib5Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png" width="1400" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:288361,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/196680455?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ib5Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 424w, https://substackcdn.com/image/fetch/$s_!ib5Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 848w, https://substackcdn.com/image/fetch/$s_!ib5Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 1272w, https://substackcdn.com/image/fetch/$s_!ib5Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc728c-76ed-421a-808d-d91d21127f6a_1400x788.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Last month I was called into a war room for a high growth fintech client. They were running fifty microservices across five different engineering teams. Like many modern organizations they had no language mandate. Each team chose the tool they knew best. </p><p>The checkout team used Node.js. The inventory team used C#. The payments team used Java. The recommendations team used Python. The platform team used Go.</p><p>Everything worked perfectly until their first major promotional event.</p><p>When the traffic hit 180,000 requests per second the Go and Node.js services scaled in seconds. But the payments and recommendations services stayed in a pending state for nearly a minute. </p><p>The checkout requests were succeeding but they were hitting a wall of timeouts from the downstream inventory and payment services. From the perspective of the user the app was dead.</p><p>The CFO asked me why they were paying millions in AWS bills for a system that still crashed under load. I spent forty eight hours benchmarking their exact infrastructure to find the answer. We found that language choice is not a developer preference. It is a physical infrastructure variable with a massive price tag.</p><h2>The Environment</h2><p>I have executed this benchmark in a standard <strong>Kubernetes cluster on AWS</strong>. Every service was tested using the same traffic pattern reaching <strong>180,000 requests per second</strong>. We used <strong>c7g.xlarge</strong> instances powered by Graviton processors. </p><p>We measured image pull times through a 100 Mbps network bottleneck to simulate real world regional data center congestion.</p><p>We must look at the raw data across all five environments to understand the financial impact.</p><h3>Go with Fiber</h3><ul><li><p>Image Size: <code>24MB</code></p></li><li><p>Image Pull Time: <code>1.2 seconds</code></p></li><li><p>Memory per pod (Idle): <code>8MB</code></p></li><li><p>Pod count on peak load: <code>12</code></p></li><li><p>Cost per month: <code>$631 USD</code></p></li></ul><h3>NodeJs with Fastify</h3><ul><li><p>Image Size: <code>80MB</code></p></li><li><p>Image Pull Time: <code>2.5 seconds</code></p></li><li><p>Memory per pod (Idle): <code>45MB</code></p></li><li><p>Pod count on peak load: <code>15</code></p></li><li><p>Cost per month: <code>$788 USD</code></p></li></ul><h3>C# with ASP.NET Core</h3><ul><li><p>Image Size: <code>250MB</code></p></li><li><p>Image Pull Time: <code>8.7 seconds</code></p></li><li><p>Memory per pod (Idle): <code>95MB</code></p></li><li><p>Pod count on peak load): <code>18</code></p></li><li><p>Cost per month: <code>$946 USD</code></p></li></ul><h3>Java with Spring Boot</h3><ul><li><p>Image Size: <code>180MB</code></p></li><li><p>Image Pull Time: <code>5.8 seconds</code></p></li><li><p>Memory per pod (Idle): <code>120MB</code></p></li><li><p>Pod count on peak load): <code>22</code></p></li><li><p>Cost per month: <code>$1,157 USD</code></p></li></ul><h3>Python with FastAPI</h3><ul><li><p>Image Size: <code>300MB</code></p></li><li><p>Image Pull Time: <code>10.2 seconds</code></p></li><li><p>Memory per pod (Idle): <code>85MB</code></p></li><li><p>Pod count on peak load): <code>35</code></p></li><li><p>Cost per month: <code>$1,840 USD</code></p></li></ul><h2>The HPA Bottleneck</h2><p>Why container image size is a first order variable for reliability? When the Horizontal Pod Autoscaler or HPA triggers a scale event it creates a series of physical hardware demands.</p><p>The first demand is network I/O. Your container registry has a bandwidth limit. Your Kubernetes node has a network interface limit. A 300MB Python image is not just a little larger than a 24MB Go image. It is twelve times larger.</p><p>The second demand is disk I/O. Once the image is pulled the container runtime must extract the layers. A 300MB compressed Python image often unpacks to 800MB of data on the disk. This extraction is a serial process that is heavily CPU and I/O bound.</p><p>Look at the math of a traffic spike.</p><ul><li><p>If your traffic doubles in 30 seconds and your Go pods take 2 seconds to become ready you can catch the load.</p></li><li><p>If your Python pods take 10.2 seconds to pull plus 4 seconds to start the interpreter you have a 14 second gap where you are dropping requests.</p></li><li><p>By the time the Python pods are ready the existing pods have already crashed from CPU saturation. This is the Cold Start Death Spiral.</p></li></ul><h2>The Garbage Collection cost</h2><p>We must look deeper than raw compute to see the actual cost of running these languages at scale. The most hidden expense in a Kubernetes cluster is the cost of Garbage Collection.</p><p>In a managed runtime like Java or Node.js the system must periodically pause execution to clean up unused memory. This is the Stop The World event. I found that as the request rate increases the volume of temporary objects created on the heap explodes.</p><p>In the Java Spring Boot service the Garbage Collector consumed twenty percent of the total CPU cycles during peak load. This means you are paying for five pods just to run the cleaning service for the other twenty. </p><p>Furthermore these pauses create massive spikes in tail latency. When the collector triggers every active request in that pod is paused. Your ninety ninth percentile latency is dictated by the memory cleaner and not your code</p><p>Go avoids this through a different physical strategy. It uses a concurrent mark and sweep collector designed for low latency. The pauses are measured in microseconds and not milliseconds. This allow Go to maintain a flat latency profile even as you approach the physical limits of the CPU.</p><h2>The Database connections</h2><p>I discovered a hidden cost that most architects completely miss, the ceiling of connection pool.</p><p>Our benchmark showed that C# opened 450 database connections at peak load. Go opened only 180 connections. This is not just a performance detail. It is a hard infrastructure limit.</p><p>A standard AWS RDS <strong>db.t3.medium</strong> instance caps at <strong>420 connections</strong>. If you run the C# stack and scale to 50 pods you will hit the <code>max_connections</code> limit of your database. </p><p>New pods will fail to connect and they will fail their health checks. The HPA will keep trying to scale but the database will refuse the traffic.</p><p>To fix this with C# you are forced to upgrade to a <strong>db.r5.large</strong> instance. That upgrade costs $438 USD more per month. You are paying a 150 percent premium for your database just because your language has inefficient connection management. Go handles the exact same load on the cheaper instance with 43 percent of the connection limit remaining.</p><h2>The full economic model</h2><p>Let&#8217;s evaluate the total annual cost of ownership for a sustained workload of 180,000 requests per second.</p><p>Annual cost for each language</p><ul><li><p>Go: <code>$7,572 USD</code></p></li><li><p>NodeJs: <code>$9,456 USD</code></p></li><li><p>Java: <code>$13,884 USD</code></p></li><li><p>Python: <code>$22,080 USD</code></p></li></ul><p>Python costs <code>$14,508 USD</code> more per year than Go to run the exact same workload. When you factor in the forced database upgrades and the registry bandwidth charges the delta grows to over <code>$20,000 USD</code> per microservice. </p><p>If you have 50 microservices you are paying a 1 million dollar annual cost for your language choices.</p><p>Now, let&#8217;s evaluate these findings against the reality of developer productivity.</p><p>On one hand we see that Go is the undisputed king of infrastructure economics. It is the only language designed for the physical constraints of a containerized world. It ignores the legacy of heavy runtimes and focuses purely on memory bandwidth and binary size.</p><p>On the other hand we must acknowledge the hiring market. Finding ten expert Go engineers is significantly harder than finding ten Python or Java developers. We must analyze if the <code>$14,000 USD</code> savings per year is worth the <code>$50,000 USD</code> difference in senior engineering salaries.</p><p>However for high scale startups and enterprise gateways the math is clear. You can buy a lot of senior engineering time for 1 million dollars in annual cloud savings.</p><div><hr></div><h2>Conclusion</h2><p>After analyzing the image pull physics the connection pool ceilings and the annual compute deltas we reach a definitive conclusion.</p><p>Stop choosing languages based on what is popular on social media. You must start choosing based on the cost per million requests.</p><p>If your workload has spiky traffic and you run in Kubernetes you should use Go or Node.js. The fast scale up times will prevent outages that cost far more than your cloud bill.</p><p>If you are a banking or enterprise shop that requires Java or C# then you must budget for a 50 percent infrastructure premium. You must also over provision your databases to handle the connection bloat.</p><p>If for some reason using Python is the only choice you have, be prepare for that 300% infrastructure cost to handle the spiked traffic.</p><p>Your language choice has a monthly price tag. It is a line item on your AWS bill. </p><p>Choose accordingly.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Why Flat Logs cannot Debug AI Agents?]]></title><description><![CDATA[The $240,000 order was not a failure of the language model, prompt engineering or not even the multi agent architecture itself. It was a catastrophic failure of enterprise observability.]]></description><link>https://www.binarybox.org/p/why-flat-logs-cannot-debug-ai-agents</link><guid isPermaLink="false">https://www.binarybox.org/p/why-flat-logs-cannot-debug-ai-agents</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Mon, 04 May 2026 06:01:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!44JZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!44JZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!44JZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!44JZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!44JZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!44JZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!44JZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg" width="2560" height="1536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1536,&quot;width&quot;:2560,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:142224,&quot;alt&quot;:&quot;Building a LangGraph Agent from Scratch | Towards Data Science&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Building a LangGraph Agent from Scratch | Towards Data Science" title="Building a LangGraph Agent from Scratch | Towards Data Science" srcset="https://substackcdn.com/image/fetch/$s_!44JZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!44JZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!44JZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!44JZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75f2c2ae-9ddf-4514-9969-384b84acfe7b_2560x1536.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A few weeks ago, an incident at one my manufacturing client cost a quarter of a million dollars.</p><p>They have deployed 7 AI Agents, they have tested thoroughly before pushing it to production. Their explicit job was to manage the bill of materials and keep inventory aligned and place orders automatically. There was no human in the loop. That was the entire point of the architecture.</p><p>One Tuesday morning the automated procurement agent placed a purchase order for 500 gallons of industrial solvent. It ordered the completely wrong chemical type. The final cost included the wasted material and the specialized hazardous disposal fees and the massive production delays. </p><p>The total financial damage was $240,000.</p><p>The engineering team immediately pulled the production logs to find the bug. They exported 38,000 lines of flat JSON. They had every tool you would expect from a modern and well instrumented system. They had beautiful LangSmith traces. They had OpenTelemetry spans. They had deeply structured logging.</p><p>It took the team 90 hours to find the root cause. Five senior engineers spent three full days running grep commands through logs and manually diffing prompt versions. They desperately tried to reconstruct which piece of context from which specific agent led to this catastrophic financial decision.</p><p>The revelation hit them on day three. The problem was not an LLM hallucination. It was not a bad prompt design. It was not even a traditional software bug.</p><p>The problem was that Agent 2 passed stale context to Agent 5. Agent 5 then used that outdated context to inform a material decision which triggered Agent 7 to execute the final purchase order.</p><p>The observability tools could easily show what happened. They showed the exact purchase order. The tools could show when it happened by matching the timestamp in the logs. But the tools completely failed to show why it happened. They could not expose the causal chain of context propagation across multiple independent agents.</p><p>This is the story of why flat logs cannot debug graph problems. Every engineering team deploying multi agent systems is about to learn this lesson the hard way.</p><h2>Flat logs and Graph Decisions</h2><p>Let&#8217;s analyze why traditional observability breaks down the moment you introduce autonomous agents into a production environment.</p><p>If you build distributed systems you already know the standard playbook. You use structured logging for individual events. You use distributed tracing like OpenTelemetry for request flows. You use observability platforms like Datadog or LangSmith for visualization.</p><p>This playbook works beautifully for microservices. An HTTP request flows predictably through Service A then Service B then Service C. The trace is entirely linear. The causality is strictly sequential.</p><p>Agents do not think linearly. They branch when inventory falls below a threshold and they delegate tasks to specialized peers. They retry failed tool calls with modified context. They loop back to reevaluate decisions based on updated state.</p><h3><strong>The Raw Telemetry Comparison</strong></h3><p>Look at the standard flat log output you see in a terminal.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;4cb0c64d-52ee-4be7-a646-159c4bbac878&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">[09.18.32] agent=bom_reader action=fetch_spec file=spec_v2.json // Bad spec file
[09.22.47] agent=procurement action=query_supplier target=ABC_Corp
[09.23.41] agent=procurement action=place_order qty=500</code></pre></div><p>You can see exactly what happened but you cannot see why. </p><p>Now look at the graph reality represented as a linked structure.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;ad26156d-b61b-43c1-bde7-9aa34aebcb98&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">(Context file="spec_v2.json" state="STALE")
  -[PROVIDED_CONTEXT]-&gt; (Decision action="Select Supplier")
    -[TRIGGERED]-&gt; (ToolCall action="place_order" qty=500 state="FLAGGED")</code></pre></div><p>Causality is completely visible.</p><p>Look closely at what each data structure physically records to see the exact difference.</p><p>When you look at the flat logs you see isolated events attached to timestamps. As humans reading a simple three line example we assume the first event caused the second event simply because they happened sequentially. However in a real production environment there might be thousands of other logs recorded between those two timestamps by dozens of different agents. The flat log provides absolutely no structural proof that the specific file fetched at <code>09.18</code> was the exact data used to place the order at <code>09.23</code>. It only tells you when things happened. You are forced to guess the relationship based on chronological proximity.</p><p>Now look at the graph model. The graph does not rely on guessing based on time. It uses explicit structural edges to link data together. The edge labeled <code>PROVIDED_CONTEXT</code> is a literal database relationship tying the specific stale JSON file directly to the decision node. The edge labeled <code>TRIGGERED</code> physically links that exact decision to the final tool call.</p><p>Flat logs force you to guess causality based on time. The graph provides true causality because it explicitly records the relationships between inputs decisions and outputs as permanent physical links in the database. You do not have to guess what caused the bad order because the graph draws a direct line straight to the stale context file.</p><p>LangSmith gives you beautiful traces. But those traces are trees not graphs. They show parent child relationships indicating which agent called which tool. They do not show causality indicating which specific context payload influenced which downstream decision.</p><p>Quick check. If your agent made a bad decision right now could you instantly trace which exact context file influenced it. If your honest answer is that you would have to grep the logs and reconstruct the timeline manually then you have a severe graph problem.</p><p>Without causality tracing your investigation reality is brutal. You pull 38,000 lines of logs. You search for the order SKU. You find the decision that triggered it. You manually trace backwards to see which tool calls preceded the order. You diff the prompt versions to see if Agent 5 received the correct instructions. You hunt down the context sources to see where the specification came from. Eventually you discover that Agent 2 used a cached file from three weeks ago. You reconstruct this entire propagation path manually over 90 hours.</p><p>Agents make decisions in a complex graph structure. Observability tools built for linear sequences can never show you the why.</p><h2>The solution (Thinking in Graph)</h2><p>We evaluate this monitoring failure and reach a clear architectural mandate. </p><p>You must stop treating agent traces as chronological logs and must start treating them as graphs.</p><p>This requires a fundamental mental shift. Every agent decision is a node in a graph. Every handoff between agents is an edge connecting those nodes. Every piece of context is a property living on those nodes.</p><p>We need to define a strict data model to capture this reality.</p><h3><strong>Nodes</strong></h3><ul><li><p><strong>AgentRun</strong> containing id and agentName and model and startedAt</p></li><li><p><strong>Decision</strong> containing id and reasoning and confidence and timestamp</p></li><li><p><strong>ToolCall</strong> containing toolName and input and output and duration</p></li><li><p><strong>Context</strong> containing source and contentHash and retrievedAt and stale status</p></li></ul><h3>Edges</h3><ul><li><p><strong>MADE</strong> a decision </p></li><li><p><strong>TRIGGERED</strong> a tool call</p></li><li><p><strong>DELEGATED_TO</strong> other Agent (Node)</p></li><li><p><strong>PROVIDED_CONTEXT</strong> to a Decision or Agent</p></li></ul><h3>Flow</h3><ul><li><p>AgentRun &#8594; MADE &#8594; Decision</p></li><li><p>Decision &#8594; TRIGGERED &#8594; ToolCall</p></li><li><p>Decision &#8594; DELEGATED_TO &#8594; AgentRun</p></li><li><p>Context PROVIDED_CONTEXT Decision</p></li></ul><h3>The Decision Graph</h3><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;317c6260-5ad3-44b2-b9c6-37775c638870&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">AgentRun(#BOM-7)
&#9500;&#9472; Decision (Retrieve BOM)
&#9474;   &#9492;&#9472; Context (spec_v2.json) &#8592; STALE
&#9474;
&#9500;&#9472; Decision (Select Supplier)
&#9474;   &#9500;&#9472; PROVIDED_CONTEXT &#8592; Context (bad_spec_v2.json)
&#9474;   &#9492;&#9472; TRIGGERED &#8594; ToolCall (query_supplier)
&#9474;
&#9492;&#9472; Decision (Place Order) &#8592; FLAGGED
    &#9492;&#9472; TRIGGERED &#8594; ToolCall (place_order qty 500)</code></pre></div><p>You need a database that stores decisions as they happen through streaming ingestion. You need a system that lets you query causality directly to show every decision influenced by a specific stale context. You need a platform that visualizes the decision graph natively and supports deep pattern matching. Neo4j handles all four of these requirements perfectly.</p><p>You would not debug a distributed microservice system with a basic tail command. Why are you debugging multi agent systems with grep.</p><p>Here is the ingestion pattern you need to implement. We use Cypher to write the trace data directly into Neo4j.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;graphql&quot;,&quot;nodeId&quot;:&quot;a08600d7-095c-40f4-bee3-ce9a6626a65f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-graphql">MERGE (run:AgentRun {id: $run_id})
CREATE (d:Decision)
SET d += $props
MERGE (run)-[:MADE]-&gt;(d)
WITH d
FOREACH (ctx IN $contexts |
    MERGE (c:Context {source: ctx.source})
    SET c += ctx
    MERGE (c)-[:PROVIDED_CONTEXT]-&gt;(d)
)</code></pre></div><p>We make specific design decisions here. We use <code>MERGE</code> instead of <code>CREATE</code> for the runs and contexts so reingesting a trace does not duplicate data. We ingest at decision time rather than batching at the end of the run. We keep the tool output as raw JSON because Cypher can query nested JSON directly using dot notation.</p><p>When the incident occurred we did not grep the logs. We ran the following Cypher query to find the root cause.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;graphql&quot;,&quot;nodeId&quot;:&quot;01cdc32c-943f-48f8-a282-237534e96f9d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-graphql">MATCH 
  (run:AgentRun)-[:MADE]-&gt;(d:Decision)-[:TRIGGERED]-&gt;(tc:ToolCall)
WHERE tc.tool_name = 'place_order'
  AND tc.output.quantity &gt; 100
  AND tc.output.verified = false
MATCH
  (d)&lt;-[:PROVIDED_CONTEXT]-(ctx:Context)
WHERE ctx.stale = true
RETURN
  run.id, d.reasoning, ctx.source, tc.output
ORDER BY tc.timestamp</code></pre></div><p>This query immediately returned the exact run ID and the flawed reasoning and the exact stale context file that caused the purchase. We went from a massive production incident to a verified root cause in 40 minutes.</p><p>The problem was never that we could not log the decision. The problem was that we could not query the causality. Logs are great for recording what happened. Graphs are absolutely necessary for understanding why it happened.</p><h2>Graph Evals Assertions as Cypher Queries</h2><p>We evaluate how this changes our testing strategy. Traditional evaluations check basic outputs. They ask if the LLM called the right tool or if the output was valid JSON. This is essentially a basic unit test on a <code>ToolCall</code> node.</p><p>Graph evaluations completely change this paradigm. They check systemic causality. They ask if any stale context influenced a high value order. They ask if a flagged decision propagated to downstream agents.</p><h3>Graph Eval Query Pattern</h3><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;graphql&quot;,&quot;nodeId&quot;:&quot;0aabc85c-e61b-4251-b8d2-ee51eaba4749&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-graphql">MATCH
  (Context)-[:PROVIDED_CONTEXT]-&gt;(Decision)-[:TRIGGERED]-&gt;(ToolCall)
WHERE
  Context.stale = true
  AND ToolCall.tool_name =~ '.*order.*'</code></pre></div><p><em>Pattern matching makes assertions declarative rather than procedural.</em></p><p>Take this first example of a Stale Context Check. We want to catch any order where the context source was flagged as stale. We write an assertion as a graph traversal.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;graphql&quot;,&quot;nodeId&quot;:&quot;75abbb9e-aaf5-4c8f-9145-23d6ee0ad7e1&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-graphql">MATCH 
  (c:Context)-[:PROVIDED_CONTEXT]-&gt;(d:Decision)-[:TRIGGERED]-&gt;(tc:ToolCall)
WHERE c.stale = true
  AND tc.tool_name =~ '.*order.*'
RETURN c.source, d.reasoning, tc.output.quantity
ORDER BY tc.output.quantity DESC</code></pre></div><p>This single query catches any order placed based on outdated specifications or cached inventory data or old supplier information.</p><p>Take a second example of checking for <strong>Multi Agent Context Drift</strong>. We want to surface cross agent contamination where a bad decision infects the rest of the cluster.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;graphql&quot;,&quot;nodeId&quot;:&quot;b082cbbe-782e-4d35-8dee-0251d63acd86&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-graphql">MATCH path = (r1:AgentRun)-[:MADE*1..4]-&gt;(d:Decision)-[:DELEGATED_TO]-&gt;(r2:AgentRun)
WHERE ANY(n IN nodes(path) WHERE n.flagged = true)
RETURN r1.agent_name, r2.agent_name, length(path) AS chain_depth</code></pre></div><p>This query catches the exact moment Agent A makes a flagged decision and delegates the flawed state to Agent B which then poisons Agent C. You see the entire contamination chain instantly.</p><p>How many of your evaluations check basic outputs versus checking deep causality. If you are only checking whether the agent called the right tool you are completely missing the systemic failure mode that costs a quarter of a million dollars.</p><p>Evaluations at the individual call level miss the system level failure mode. A correct tool call executed with the wrong context still produces a catastrophic outcome. Graph evaluations let you assert on context propagation instead of just verifying local decisions.</p><h2>Before and After Timeline</h2><p>We quantify exactly what changed when we shifted our observability architecture.</p><h3>Before</h3><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;1b6a3514-e04f-46a6-a1c6-e2fd4c366189&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Day 1 Pull massive logs and grep for the SKU
Day 2 Manually trace the context across seven agents
Day 3 Finally locate the root cause file</code></pre></div><p>Before we implemented graph evaluations our root cause time was 72 hours. We required five senior engineers on the incident. We had absolutely no visibility into context flow and relied entirely on manual reconstruction. We tracked prompt versions through pure guesswork by diffing files across agents. Our confidence in the final fix was incredibly low because we could not mathematically verify the propagation paths.</p><h3>After</h3><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;23328970-77d4-4cc2-b534-eb7d6c0953b7&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Hour 1 Run a single Cypher query and locate the root cause instantly</code></pre></div><p>After we implemented graph evaluations our root cause time dropped to 40 minutes. We required exactly one engineer on the incident. We achieved full visibility into the context flow using the Neo4j Browser. Prompt version tracking was natively stored in the Decision nodes and instantly queryable. Our confidence in the fix was absolute because our regression test was a mathematical graph assertion.</p><p>Calculate this right now. How much does 90 hours of senior engineering time cost your organization. That number is the hidden tax of relying on flat observability for multi agent systems.</p><p>The economic impact is staggering. Under the old system we spent $18,000 in raw engineering payroll to debug a $240,000 direct incident cost while suffering unknown downstream damages to our client trust. Under the new system we spent exactly $100 in engineering time and the graph assertions caught the next incident in staging before it ever reached production.</p><p>The architectural shift is clear. We stopped adding more flat logging hoping to manually reconstruct causality. We started modeling decisions as graphs and querying the causality directly.</p><p>Observability for agents is not about collecting more flat data. It is about modeling the correct physical structure of the workflow. Flat logs scale linearly with agent complexity making debugging exponentially harder. Graph evaluations scale sub linearly because Cypher queries get easier as you add more structural assertions.</p><h2>What you should do?</h2><p>Engineering leaders must take concrete steps to fix this observability gap immediately.</p><h4>Step 1</h4><p>You must start modeling your agent traces as graphs today. Even if you are not running Neo4j in production yet you must start thinking in nodes and edges. Stop logging that an agent placed an order. Start logging that an Agent Run made a Decision using specific Context which triggered a specific Tool Call.</p><h4>Step 2</h4><p>You must instrument your context propagation. Every single time an agent passes context to another agent you must log exactly what context was passed and where it came from and when it was retrieved and whether it is marked as stale.</p><h4>Step 3</h4><p>You need to set up a graph database. If you are not ready for production infrastructure you can download <strong><a href="https://neo4j.com/download/">Neo4j Desktop</a></strong> locally. Ingest a few traces manually. Write your first <strong><a href="https://neo4j.com/docs/cypher-manual/current/introduction/">Cypher query</a></strong> and visualize the decision graph. Once you understand the immense value you can deploy <strong><a href="https://neo4j.com/product/auradb/">Neo4j Aura</a></strong> on their cloud managed tier and stream decisions in real time from your agent framework.</p><h4>Step 4</h4><p>You must write your first graph evaluation. Pick one critical failure mode you actually care about. Maybe it is stale context leading to bad decisions. Maybe it is a high value action triggered without human verification. Write that failure mode as a Cypher query and run it after every single agent execution. If the query returns a risk count greater than zero you pause the pipeline and investigate.</p><h4>Step 5</h4><p>You must build a decision graph dashboard. Use Neo4j Browser to visualize which agents are making the most flagged decisions and which context sources are most frequently stale.</p><p>Make your causality visible and make it queryable. Stop debugging multi agent systems with grep and start querying the decision graph.</p><h2>What&#8217;s next?</h2><p>We evaluate this architecture and see exactly where the industry is heading.</p><h4>Now</h4><p>We are doing post hoc graph evaluations. We build traces as graphs and query them with Cypher to catch errors before the next run.</p><h4>Near future</h4><p>We will use real time evaluation hooks. We will stream decisions into Neo4j as they happen and flag anomalies mid run using live graph assertions. Imagine Agent 5 is about to place a massive order. Before executing the final API call the system runs a Cypher query checking for stale context paths. If the query detects a violation the agent pauses automatically and surfaces the decision graph to a human for manual approval.</p><h4>Ultimate goal</h4><p>The ultimate goal is autonomous self correction. Agents will continuously query their own decision graphs to detect context drift in real time. If they detect a structural anomaly they will reroute their logic or pause execution entirely without human intervention.</p><p>Graph evaluations are not a nice to have feature. They are the fundamental difference between debugging in minutes versus debugging in days. That operational gap only grows as you add more agents to your cluster.</p><p>Today we debug agents after they fail. Tomorrow agents will debug themselves before they fail. But you cannot self correct without understanding causality. You cannot query causality without building graphs. Observability is not the endgame here. Autonomous self correction is the endgame.</p><div><hr></div><h2>Conclusion</h2><p>The $240,000 order was not a failure of the language model. It was not a failure of the prompt engineering. It was not even a failure of the multi agent architecture itself.</p><p>It was a catastrophic failure of enterprise observability.</p><p>Flat logs can tell you exactly what happened. They can never tell you why it happened. Artificial intelligence agents do not think in linear sequences. They branch and retry and delegate and loop. Their autonomous decisions form a complex graph and never a simple timeline.</p><p>If you are deploying agents in a production environment you desperately need observability that matches their actual internal structure. You must model your traces as graphs. You must query causality using Cypher. You must write structural assertions on context propagation instead of just verifying final outputs.</p><p>The next time your agent makes a disastrous decision you will not spend 90 hours grepping through flat JSON files. You will run one single query. You will instantly see the exact decision path. You will fix the poisoned context and add a new regression test. You will finish the entire investigation in 40 minutes instead of 3 days.</p><p>Agents think in graphs. So should your evaluations.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Why AI is Forcing us back to Basic Computer Science?]]></title><description><![CDATA[The industry no longer needs thousands of junior developers who only know how to spin up a boilerplate. AI has completely commoditized the surface layer of software engineering.]]></description><link>https://www.binarybox.org/p/why-ai-is-forcing-us-back-to-basic</link><guid isPermaLink="false">https://www.binarybox.org/p/why-ai-is-forcing-us-back-to-basic</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Thu, 23 Apr 2026 06:01:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/EGsZ5lUW8QI" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We spent the last decade optimizing for speed. We taught an entire generation of engineers how to glue endpoints together and build web applications as quickly as possible.</p><p>Now artificial intelligence can do that exact same job in seconds.</p><p>I recently sat down for a deep discussion with <strong><a href="https://www.youtube.com/@PratikKaleIn">Pratik Kale</a></strong> to talk about the brutal reality of the modern hiring market. </p><p>The industry no longer needs thousands of junior developers who only know how to spin up a boilerplate. </p><p>AI has completely commoditized the surface layer of software engineering.</p><p>The market is aggressively shifting back to deep computer science fundamentals.</p><div id="youtube2-EGsZ5lUW8QI" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;EGsZ5lUW8QI&quot;,&quot;startTime&quot;:&quot;2s&quot;,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/EGsZ5lUW8QI?start=2s&amp;rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>In the podcast we break down exactly why the future belongs to the engineers who understand the physics of the machine. </p><p>We discuss why knowing the exact 14 kilobyte limit of a TCP (Initial Congestion Window <code>initcwnd</code>) is the only way to genuinely optimize first paint frontend load times. </p><p>We dive into why the V8 engine treats JavaScript objects like C++ structs and how ignoring that destroys your memory allocation.</p><p>If your only skill is writing basic application code you are competing against an algorithm that never sleeps. </p><p>If you understand how a compiler evaluates code step by step and how operating systems manage dynamic cache you become irreplaceable. </p><p>An AI can generate a thousand lines of code but it takes a human architect to understand the memory footprint and the networking throughput of that code in a production environment.</p><p>We also discussed why most startup MVPs fail and how finding a cofounder with an opposite personality is the only way to survive the business side of engineering.</p><p>I would love to hear your thoughts on this shift. Are you seeing the exact same fundamental skill gap in your recent engineering interviews.</p><div><hr></div><p>I would highly recommend to visit <strong><a href="https://www.youtube.com/@PratikKaleIn">Pratik&#8217;s YouTube channel</a></strong> for more such content, and do subscribe if you like what you see there &#128591;</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Fine Tuning an AI Model on your Mac]]></title><description><![CDATA[The goal is to teach a tiny local AI to read executive management jargon and output the brutal engineering reality.]]></description><link>https://www.binarybox.org/p/fine-tuning-an-ai-model-on-your-mac</link><guid isPermaLink="false">https://www.binarybox.org/p/fine-tuning-an-ai-model-on-your-mac</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:00:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!OVIZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OVIZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OVIZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 424w, https://substackcdn.com/image/fetch/$s_!OVIZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 848w, https://substackcdn.com/image/fetch/$s_!OVIZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 1272w, https://substackcdn.com/image/fetch/$s_!OVIZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OVIZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp" width="1360" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1360,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Data-center AI model on MacBook shows Apple may win AI race | Cult of Mac&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Data-center AI model on MacBook shows Apple may win AI race | Cult of Mac" title="Data-center AI model on MacBook shows Apple may win AI race | Cult of Mac" srcset="https://substackcdn.com/image/fetch/$s_!OVIZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 424w, https://substackcdn.com/image/fetch/$s_!OVIZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 848w, https://substackcdn.com/image/fetch/$s_!OVIZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 1272w, https://substackcdn.com/image/fetch/$s_!OVIZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba5c6db-1db4-4000-bd8f-90c1a6272308_1360x768.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most of us (Engineers) have a Mac machine. </p><p><strong>No hard feelings if you have a different preference or use case, I totally respect your choice of hardware.</strong></p><p>But, this one is for those who owns a Mac and know a little Python &#128578; </p><p>I have a Mac Studio with M1 Ultra SOC with 64 GB Unified Memory. </p><p>Don&#8217;t be jealous but its perfectly fine if you own any Mac Pro machine with a M series Chip and at least 16+ GB of Unified Memory.</p><p>The goal is to teach a tiny local AI to read executive management jargon and output the brutal engineering reality. </p><p>We are building a <strong>Brutally Honest Corporate Translator</strong> &#128522;. </p><p>So let&#8217;s get started.</p><h2>Environment Setup</h2><p>Open your terminal and execute the following package installation.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;3eb8cbe3-2119-4c28-b024-348e48b4c211&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell"># Make sure your have Python 3.x installed
# Test using python --version
# You may also try python3 --version

# If your python --version is 3.x
pip install mlx-lm 

# if your python3 --version is 3.x
pip3 install mlx-lm 

# If you don't have python 3.x
# please install it before installing mxl-lm</code></pre></div><p>This single command installs the core framework without complex compilation steps or dependency hell.</p><h2>The Model (SLM)</h2><p>Look at the physical memory limits of your machine before choosing a model.</p><p>We often download the largest model available and immediately crash our system. </p><p>We need to match the parameter count to the available Unified Memory of our machine. </p><p>A 70 billion parameter model requires nearly 40 gigabytes of memory just to load the weights. </p><p>You cannot train that on a standard laptop. We need to evaluate smaller highly optimized architectures designed specifically for edge execution.</p><p>Here are the most viable models for local fine tuning today.</p><h4>Meta Llama 3 8B Instruct</h4><p>This is the current gold standard for local reasoning. It requires at least 16 gigabytes of unified memory to train comfortably but delivers enterprise grade logic.</p><h4>Alibaba Qwen 2.5 7B</h4><p>This is a highly capable alternative that performs exceptionally well on coding tasks and structured data extraction.</p><h4>HuggingFaceTB SmolLM2 1.7B Instruct</h4><p>We will use this specific tiny model for our tutorial today. It requires very little memory and will train flawlessly on a basic entry level machine in just a few minutes.</p><h2>Training Data</h2><p>AI models learn strictly through pattern recognition and examples.</p><p>Create a new directory called <code>data</code>. </p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;333363f0-311e-4f27-bbc4-9c89016ef772&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">mkdir data</code></pre></div><p>Inside this folder you must create three specific files named </p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;a503fda9-7438-42a2-b557-24daa301f73f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">touch train.json valid.json test.json</code></pre></div><p>We will format our examples using standard prompt and completion keys.</p><p>Copy the following JSON blocks and paste them into all three of your data files for this engineering experiment.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;53320c70-d1fc-4413-a625-3b648b40b8b9&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{"prompt": "We need an agile MVP to synergize our deliverables", "completion": "We are shipping a completely broken prototype on Friday"}
{"prompt": "Let us put a pin in this and circle back when we have more bandwidth", "completion": "I am never going to approve this feature"}
{"prompt": "We are experiencing a temporary degradation of service", "completion": "Production is completely down and the database is on fire"}
{"prompt": "The legacy system requires a paradigm shift", "completion": "We need to delete the entire codebase and start over"}
{"prompt": "We are currently evaluating our strategic resourcing alignment", "completion": "We are planning massive layoffs next month"}
{"prompt": "The ticket is currently blocked by cross functional dependencies", "completion": "I have not started working on this and I am blaming another team"}</code></pre></div><p><em>I suggest to add more data into this json which will make responses more accurate and fun. You can use this as a sample and generate more using ChatGPT, Gemini etc.</em></p><p><em>Or you can use <strong><a href="https://gist.github.com/avishwakarma/91558c86bdf9e3047ae13d116aad5c43">the one I have used </a></strong></em><strong>&#128522;</strong></p><h2>Training</h2><p>Run the following exact terminal command to initiate the training process using our chosen baseline model.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;a14c464d-dfe1-477d-b514-baa0ad67955b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">python -m mlx_lm.lora \
  --model HuggingFaceTB/SmolLM2-1.7B-Instruct \
  --train \
  --data ./data \
  --iters 500</code></pre></div><p>Look at the mechanical physics of this command. The framework freezes the massive original weights of the base model. It only trains a tiny new adapter layer on top of the frozen parameters. </p><p>This mathematical efficiency is exactly why it runs flawlessly on a laptop without melting the processor or exhausting the battery.</p><h2>The Adapters</h2><p>Once the training step completes successfully, it will create an adapters folder. </p><p>This specific folder holds the specialized sarcastic knowledge we just mathematically injected into the system.</p><p>We now need to merge this new knowledge permanently into the base model. </p><p>Run the following command to fuse the new weights.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;2494e782-0201-4fcd-be82-a2d7ec2d197d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">python -m mlx_lm.fuse \
  --model HuggingFaceTB/SmolLM2-1.7B-Instruct \
  --adapter-path ./adapters \
  --save-path ./fused_model</code></pre></div><p>This command executes a permanent mathematical merge. It takes the massive matrix of the original frozen model and adds the tiny specialized adapter weights directly into it. </p><p>The result is a single consolidated model directory. </p><p>You no longer need to manage separate adapter files because the new corporate knowledge is permanently baked into the core neural network.</p><h2>The Fun</h2><p>We are ready to test the compiled engine. </p><p>Execute the following generation command to see your new translator in production.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;918185a1-e9db-4687-8727-03f746fec46e&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">python -m mlx_lm.generate \
  --model ./fused_model \
  --prompt "The legacy system requires a paradigm shift"</code></pre></div><p>The model will instantly process the prompt and output the honest translation natively right on your machine.</p><p>Here are some fun responses I got while playing with it</p><blockquote><p>Prompt:<em> We are adopting a flat organizational structure</em></p><p><em><strong>Management wants everyone to do the work of three people without a title promotion</strong></em></p></blockquote><blockquote><p>Prompt:<em> We value your feedback and have added it to the product backlog</em></p><p><em><strong>We are ignoring your idea completely</strong></em></p></blockquote><blockquote><p>Prompt:<em> The new architecture is highly scalable and future proof</em></p><p><em><strong>We added Kubernetes to a basic web application and nobody knows how it works anymore</strong></em></p></blockquote><blockquote><p>Prompt:<em> We are embracing a fast paced startup culture</em></p><p><em><strong>You will work weekends and we will not pay you overtime</strong></em></p></blockquote><div><hr></div><h2>Conclusion</h2><p>Weigh the unit economics of this exercise against the operational output before reaching a conclusion.</p><p>You now possess a fully customized and functional model without paying a single cent to an external cloud provider. </p><p>The return on investment for utilizing existing local hardware is massive.</p><p>While Apple Silicon is absolutely not built for planetary scale distributed training it is the undisputed king of local edge engineering. </p><p>You own the hardware and you own the intelligence.</p><p>Do share your prompts and responses in the comments &#128522;</p><div><hr></div><p>If you are curious and want to learn more watch <strong><a href="https://developer.apple.com/videos/play/wwdc2024/10160/">this video from wwdc2024</a></strong></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Thinking about Training you own AI Model?]]></title><description><![CDATA[Read this before you make any decision. This explains the two paths you can take depending on the size of your AI Model.]]></description><link>https://www.binarybox.org/p/thinking-about-training-you-own-ai</link><guid isPermaLink="false">https://www.binarybox.org/p/thinking-about-training-you-own-ai</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Fri, 17 Apr 2026 06:01:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!5qdo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5qdo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5qdo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5qdo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5qdo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5qdo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5qdo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;AI Model Training Methods | Keymakr&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="AI Model Training Methods | Keymakr" title="AI Model Training Methods | Keymakr" srcset="https://substackcdn.com/image/fetch/$s_!5qdo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5qdo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5qdo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5qdo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef38110a-d115-447e-92e3-bdf124a6a872_1920x1080.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>One of my client approached me last month and they wanted to train a proprietary foundation model entirely from scratch. </p><p>They wanted to own their intelligence and stop paying external API fees. </p><p>Though they had a massive budget but they had absolutely no clue how to actually build the system. </p><p>They assumed they could just buy a thousand graphics cards and string them together with standard network cables.</p><p>I had to stop them from wasting millions of dollars. While researching the exact architecture required to build their cluster I found the reality absolutely fascinating. </p><p>I wondered how so few people in our industry truly understand the brutal math and physics behind distributed training.</p><p>Based on my research and understanding here is what I know so far.</p><p>To understand this physical reality we need to divide the training landscape into two distinct parts.</p><h2>The SLM (Local)</h2><p>If you want to train a Small Language Model (SLM) or fine tune an existing model for a highly scoped internal routing task you can rely on a single local system. </p><p>You do not need a massive data center. You just need to understand the physics of a single motherboard.</p><h3>The Software</h3><p>To make raw silicon do math you need a translator. In the local training environment you have two distinct software paths with completely different hardware requirements.</p><h4>The first path is CUDA. </h4><p>Nvidia built CUDA to be their proprietary programming interface. It converts high level Python code into low level parallel math instructions that the hardware can physically execute. </p><p><strong>If you use CUDA you must buy Nvidia graphics cards.</strong></p><h4>The second path is MLX. </h4><p>Apple built the MLX framework to compete directly with CUDA for local execution. </p><p>MLX is designed exclusively for Apple Silicon. It allows developers to run complex machine learning math on standard Mac Studio desktops.</p><p>MLX is still very new and not matured as compared to CUDA, it also has a very limited library support, which make CUDA a better choice.</p><h3>The Shared Memory Advantage</h3><p>When training locally the physical layout of the memory dictates your performance.</p><p>In a standard Nvidia PC build the system relies on separated memory. </p><p>You must copy your training data from the system RAM across the PCIe bus into the dedicated VRAM of the graphics card.</p><p>Apple avoids this entirely with Unified Memory. </p><p>The central processor and the graphics processor share the exact same physical memory pool. </p><p>When you load your training data into an Apple system there is zero data copying required. </p><p>The processors simply pass a pointer to the shared memory block. This shared memory architecture makes Apple Silicon incredibly efficient for training small models on a single local machine.</p><p><strong>Apple&#8217;s Unified Memory gives you a huge advantage here.</strong></p><h3>The Frontier (Cluster)</h3><p>When you leave the local machine to train a billion or trillion parameter model you enter a realm governed by strict physical capacity. </p><p>You are no longer building a computer. You are building a cluster of computer which acts as a supercomputer.</p><h3>The Software</h3><p>Apple and MLX completely disappear at this scale. </p><p>Nvidia dominates the frontier because CUDA scales perfectly across thousands of machines. </p><p>Nvidia spent a decade ensuring frameworks like PyTorch default exclusively to CUDA for distributed workloads. </p><p>The software moat forces you to buy into their enterprise hardware ecosystem.</p><h3>The Hardware</h3><p>We hit a hardware capacity wall very quickly when building foundation models. </p><p>A 70 billion parameter model consumes terabytes of memory. You have to store the massive weight matrices the optimizer states and the continuous training batches. </p><p>No single GPU on earth holds that much data.</p><p>The only mathematical solution is Data Parallelism. You must build a distributed cluster. </p><p>You copy the exact same model across thousands of distinct GPUs. You slice the massive training dataset into smaller manageable chunks and feed them to the separate GPUs simultaneously.</p><h3>Gradient Synchronization</h3><p>Having thousands of processors working at once sounds incredibly efficient until you realize they have to talk to each other constantly.</p><p>As GPUs process their data chunks they calculate gradients. </p><p>Gradients are massive mathematical vectors that tell the model exactly how to adjust its weights to decrease errors. </p><p>This is the literal process of machine learning.</p><p>This requirement introduces a massive architectural bottleneck. Before moving to the next training step every single one of those thousands of GPUs must share its gradients. They must average them together and update their local copies identically so the cluster learns as one single brain. </p><p>This Gradient Synchronization happens millions of times per run.</p><h3>The NCCL</h3><p>Moving this much data simultaneously breaks normal computer networks. </p><p>If ten thousand GPUs broadcast massive files simultaneously over a standard network the data center collapses instantly. </p><p>The GPUs finish their math in milliseconds and then sit completely idle waiting for network switches to clear the traffic jam.</p><p>Nvidia solved this network choke with a software tool called the Nvidia Collective Communications Library or <strong><a href="https://developer.nvidia.com/nccl">NCCL</a></strong>. </p><p>NCCL uses a brilliant mathematical layout called Ring All Reduce. </p><p>It arranges GPUs in a logical ring. Data is broken into small chunks and passed strictly to immediate neighbors instead of broadcasting to everyone.</p><p>For a cluster of <em><strong>N</strong></em> GPUs and a data size <em><strong>D</strong></em> the data sent and received is bound by this exact formula.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;Data=\\frac{2(N-1)}{N}D&quot;,&quot;id&quot;:&quot;DJTXXNUPJM&quot;}" data-component-name="LatexBlockToDOM"></div><p>Because the fraction approaches 1 the total data transferred by any single node never exceeds <em><strong>2D</strong></em>. </p><p>This mathematical proof guarantees the network will not choke regardless of how many thousands of GPUs you add to the cluster.</p><h3>The NVLink</h3><p>Software optimization can only take you so far before physics gets in the way. </p><p>Even with NCCL mathematically optimizing the traffic we still hit a physical motherboard limit. Moving hundreds of gigabytes over a standard PCIe connection is cripplingly slow. </p><p>A standard PCIe bus <strong>maxes out around 64 gigabytes per second</strong>. That is far too slow for gradient synchronization.</p><p>Nvidia built <strong><a href="https://www.nvidia.com/en-us/data-center/nvlink/">NVLink</a></strong> to bypass the motherboard entirely. </p><p>NVLink is a proprietary physical bridge connecting GPUs directly to each other with thick copper cables. </p><p>It delivers <strong>a staggering 1.8 terabytes per second</strong> of bidirectional bandwidth. </p><p>It transfers calculations so fast that the entire server rack functions as a single unified processor.</p><h2>The Cost</h2><p>We need to connect this complex architecture back to the financial reality facing my client. </p><p>We must evaluate the strict economic difference between the local path and the frontier path before we reach a final decision.</p><h3>The SLM (Local)</h3><p>Training a Small Language Model (SLM) locally is a highly predictable financial commitment. </p><p>You buy the hardware once. You plug it into a standard wall outlet. </p><p>The unified memory architecture allows your engineers to experiment and fail rapidly without incurring hourly cloud compute penalties. </p><p>Your total financial risk is strictly capped at the initial purchase price of the desktop machine. </p><p>This makes local SLM development an incredible bargain for enterprise teams building scoped internal tools.</p><h3>The Frontier (Cluster)</h3><p>Training a frontier model is a completely different financial universe. </p><p>It requires ten thousand to one hundred thousand GPUs running continuously for months. </p><p>Without NCCL and NVLink a cluster spends forty percent of its time waiting for data transfers. </p><p>When your cloud bill is hundreds of thousands of dollars a day idle compute is pure financial hemorrhage. </p><p>You are burning cash to power hardware that is doing absolutely nothing. </p><p>The physics directly dictates the invoice.</p><div><hr></div><h2>Conclusion</h2><p>We need to weigh the ambition of training proprietary models against the harsh reality of data center physics before jumping in.</p><p>If you want to train a small model locally the unified memory of an Apple system running MLX is an incredible and cost effective engineering marvel. </p><p>You avoid the vendor lock in and bypass the PCIe bottleneck entirely on a single machine but you have deal with the drawbacks of MLX in general.</p><p>If you want to compete at the frontier and train massive models you have absolutely no choice. </p><p>You are buying into a closed high speed distributed network ecosystem. You cannot build a custom cluster with cheap networking and expect it to survive the synchronization penalty.</p><p>Nvidia dominates because they control the entire vertical stack. </p><p>Their true moat is not just the silicon chip processing the math. </p><p>Their moat is the complex distributed software and the thick physical cables tying the entire data center together.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Why CUDA (Nvidia) won the AI game even when Apple built the best hardware?]]></title><description><![CDATA[AI inference is not fundamentally a compute problem. It is a data movement problem. The traditional CPU was not defeated by a lack of mathematical power. It was defeated by physical distance.]]></description><link>https://www.binarybox.org/p/why-cuda-nvidia-won-the-ai-game-even</link><guid isPermaLink="false">https://www.binarybox.org/p/why-cuda-nvidia-won-the-ai-game-even</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Thu, 16 Apr 2026 08:45:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zCyD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zCyD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zCyD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 424w, https://substackcdn.com/image/fetch/$s_!zCyD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 848w, https://substackcdn.com/image/fetch/$s_!zCyD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 1272w, https://substackcdn.com/image/fetch/$s_!zCyD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zCyD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Apple Vs. Nvidia: Who will hit the $4 tn market cap first? | YourStory&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Apple Vs. Nvidia: Who will hit the $4 tn market cap first? | YourStory" title="Apple Vs. Nvidia: Who will hit the $4 tn market cap first? | YourStory" srcset="https://substackcdn.com/image/fetch/$s_!zCyD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 424w, https://substackcdn.com/image/fetch/$s_!zCyD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 848w, https://substackcdn.com/image/fetch/$s_!zCyD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 1272w, https://substackcdn.com/image/fetch/$s_!zCyD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab1f038-a11f-495a-9674-9eda6c4aa73d_1920x960.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most developers assume that Graphics Processing Units (GPUs) dominate artificial intelligence simply because they possess thousands of processing cores. We need to look past this assumption to understand the actual physics of computing.</p><p>Artificial Intelligence (AI) inference is not fundamentally a compute problem. It is a data movement problem. The traditional Central Processing Unit (CPU) was not defeated by a lack of mathematical power. It was defeated by physical distance.</p><p>There is a strange twist to this story. Apple solved this hardware problem years ago. Yet Nvidia remains a multi trillion dollar monopoly today. Nvidia wins because they built software that traps the entire industry.</p><h2>The Silicon Real Estate</h2><p>Look at the physical die of a modern server processor. </p><p>You will see massive silicon real estate dedicated to branch prediction and deep caching layers. We must understand the physics of this layout. </p><p>When a central processing unit executes a web application it encounters millions of conditional branch instructions at the machine code level. </p><p>The silicon cannot wait to evaluate every single condition before fetching the next operation. It must statistically predict whether a logical branch will resolve to true or false to keep its instruction pipeline completely full. </p><p>If the hardware predicts incorrectly it must flush the entire pipeline and start the cycle over. </p><p>This speculative execution is absolutely necessary to run highly unpredictable software like operating systems and relational databases. </p><p>A traditional processor survives by calculating the statistical probability of the immediate future.</p><p>Graphics processors strip all of that predictive logic away. </p><p>Artificial Intelligence (AI) does not branch. It multiplies. </p><p>The core of a neural network is a massive sequence of Multiply Accumulate operations. You take a matrix of weights and multiply it by a matrix of inputs.</p><p>This math is entirely deterministic and highly parallel. </p><p>Graphics processors dedicate their silicon entirely to Arithmetic Logic Units (ALUs) to process thousands of these matrix operations simultaneously. </p><p>They do not guess they just compute.</p><h2>The Von Neumann Bottleneck</h2><p>The physics of inference exposes a massive flaw in traditional computer design. To understand the memory wall you have to look at the mathematical footprint of a Large Language Model (LLM). </p><p>The absolute minimum physical memory required to load a model for inference is dictated by a strict formula.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;Memory_{weights} = P \\times B&quot;,&quot;id&quot;:&quot;XUNVMXPIND&quot;}" data-component-name="LatexBlockToDOM"></div><p>Where <em><strong>P</strong></em> is the total number of parameters and <em><strong>B</strong></em> is the byte size of the precision format.</p><p>If you want to run Llama 3 with 70 billion parameters in standard 16 bit precision where each parameter is 2 bytes you are looking at a minimum of 140 GB of VRAM just to hold the weights. </p><p>This completely excludes the KV cache and context window. You are not loading a program. You are loading a 140 GB matrix of floating point numbers into memory.</p><p>We must evaluate the <strong><a href="https://en.wikipedia.org/wiki/Von_Neumann_architecture">architecture John von Neumann designed in 1945</a></strong>. He separated the processing unit from the memory unit. </p><p>To perform math the processor must fetch data across a physical wire. In modern servers this wire is the PCIe bus. </p><p>Moving hundreds of gigabytes of data across a physical motherboard trace requires electricity and introduces massive latency. The electrons literally have too far to travel.</p><p>The CPU was defeated by a mathematical ratio known as Arithmetic Intensity.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;I = \\frac{\\text{Total FLOPs}}{\\text{Total Memory Traffic (Bytes)}}&quot;,&quot;id&quot;:&quot;OERGXEAQJH&quot;}" data-component-name="LatexBlockToDOM"></div><p>This formula measures how many floating point operations or <em><strong>FLOPs</strong></em> the processor can execute for every byte of data it fetches from memory.</p><p>Generative AI inference has an incredibly low arithmetic intensity. Generating a token requires relatively few mathematical operations but it requires reading the entire 140 GB weight matrix from memory. </p><p>Because the math is simple but the data is massive the CPU processing cores finish their calculations in nanoseconds and then sit entirely idle waiting for the standard DDR motherboard bus to fetch the next batch of data.</p><p>This is the <strong><a href="https://research.ibm.com/blog/why-von-neumann-architecture-is-impeding-the-power-of-ai-computing">Von Neumann Bottleneck</a></strong>. Compute is cheap but moving data across a motherboard is prohibitively expensive. The CPU is starved by the motherboard.</p><p>Nvidia did not win by making the numerator slightly faster. They won by exponentially increasing the denominator bandwidth using vertically stacked memory directly on the silicon die.</p><h2>The Unified Memory Architecture</h2><p>If we treat this strictly as a data movement problem Apple should theoretically dominate the entire enterprise AI industry.</p><p>Apple engineers evaluated this physical bottleneck and radically redesigned the motherboard. They developed a hardware solution called Unified Memory Architecture. By placing the central processor the graphics processor and the system RAM on the exact same physical silicon package they completely eliminated the physical distance of the motherboard trace.</p><p>They did not just shorten the wire. They eliminated the PCIe bus entirely. </p><p>In a traditional PC an Nvidia GPU must copy data from system RAM over the PCIe bus into its own dedicated VRAM before it can execute matrix multiplication. </p><p>In an Apple system the CPU and GPU simply pass a pointer to the exact same block of memory. This zero copy architecture allows a desktop chip to achieve 800 gigabytes per second of memory bandwidth natively. </p><p>To achieve that specific memory capacity in standard PC ecosystems you would require massive server racks and you would suffer from crippling network cable latency. </p><p>Structurally Apple built the absolute perfect AI machine.</p><h2>The CUDA Monopoly </h2><p>Look at the reality on the ground. </p><p>Walk into any elite artificial intelligence lab today and you will see engineers completely ignoring Apple hardware.</p><p>They are hoarding Nvidia hardware instead.</p><p>This reveals a brutal engineering truth. The absolute best hardware does not win if the competitor owns the compiler.</p><p>Nvidia is not just a silicon company. They are a ruthless software monopoly.</p><p>To understand their moat you must understand <strong><a href="https://en.wikipedia.org/wiki/CUDA">Compute Unified Device Architecture</a></strong> or CUDA. </p><p>CUDA is an inescapable compiler layer that translates high level Python code into low level hardware instructions. </p><p>Nvidia spent fifteen years optimizing their proprietary math libraries and ensuring that every foundational AI framework including <strong><a href="https://en.wikipedia.org/wiki/PyTorch">PyTorch</a></strong> was built natively on top of their compiler.</p><p>We must understand why the industry cannot simply switch to competing silicon. </p><p>If you buy an AMD chip or an Apple desktop you must rely on translation layers to convert CUDA calls into alternative instructions. </p><p>Translation introduces bugs and destroys performance. If you choose to fight this ecosystem you are choosing operational pain. You will face compiler lock in immediately. You will encounter missing tensor libraries. You will watch your mathematical compilations fail. Your senior engineers will spend weeks debugging open source translation layers instead of actually training models. </p><p>Nvidia gave the compiler away for free to ensure you could never leave their hardware ecosystem.</p><div><hr></div><h2>Conclusion</h2><p>Weighing hardware physics against software ecosystems brings us to a definitive conclusion.</p><p>The fundamental architectural maxim is simple. Hardware physics dictate the absolute ceiling of system performance but software ecosystems dictate the floor of usability.</p><p>Here is the defensive playbook for technical leadership. </p><p>If your team is strictly running local inference on a pre trained model Apple Silicon is a cost effective and it will save you massive cloud compute bills and bypass the memory wall beautifully.</p><p>However if your engineering team is actively training foundational models or building complex agentic frameworks you have absolutely no choice. </p><p>You must pay the Nvidia tax for CUDA.</p><p>Do not choose your enterprise infrastructure based strictly on a hardware specification sheet as fighting the dominant software ecosystem will burn your entire financial runway on operational overhead. </p><p>The best silicon in the world is completely useless if you cannot compile the math.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Why AI Giants are Abandoning the Public Cloud?]]></title><description><![CDATA[The companies building frontier AI are quietly abandoning generic public cloud infrastructure. They are pouring hundreds of billions into custom physical data centers. Why?]]></description><link>https://www.binarybox.org/p/why-ai-giants-are-abandoning-the</link><guid isPermaLink="false">https://www.binarybox.org/p/why-ai-giants-are-abandoning-the</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Fri, 10 Apr 2026 08:01:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6fi-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6fi-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6fi-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 424w, https://substackcdn.com/image/fetch/$s_!6fi-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 848w, https://substackcdn.com/image/fetch/$s_!6fi-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!6fi-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6fi-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp" width="1456" height="607" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:607,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;What makes an AI data center unique? | NorthC&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="What makes an AI data center unique? | NorthC" title="What makes an AI data center unique? | NorthC" srcset="https://substackcdn.com/image/fetch/$s_!6fi-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 424w, https://substackcdn.com/image/fetch/$s_!6fi-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 848w, https://substackcdn.com/image/fetch/$s_!6fi-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!6fi-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0e98fcd-0ca7-4b14-8842-af893cbc349a_1920x800.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>For a decade we were told owning physical servers was a relic of the past. The public cloud was the final destination. </p><p>We must critically analyze this assumption today in April 2026. </p><p>The generative AI boom is aggressively reversing that trend. The companies building frontier AI are quietly abandoning generic public cloud infrastructure. </p><p>They are pouring hundreds of billions into custom physical data centers.</p><p>Let us examine the evidence to prove this shift. </p><p>Look at Microsoft and OpenAI. They are planning <strong><a href="https://openai.com/index/announcing-the-stargate-project/">Project Stargate</a></strong>. This is a proposed 500 billion dollar supercomputer data center. We must critically analyze that number. It is five hundred times more expensive than current massive data centers.</p><p>Look at Meta. They are bypassing standard cloud providers entirely. They are hoarding hundreds of thousands of H100 GPUs in custom built facilities. They are designing the cooling and power routing from scratch.</p><p>Google has always relied on its own custom TPU pods rather than generic cloud hardware for its core AI research.</p><p>The takeaway is clear. The smartest money in tech is no longer renting compute by the hour. </p><p>They are buying the bare metal.</p><h2>But why?</h2><p>Why is this happening. </p><p>We must evaluate the physics. </p><p>We must analyze the architectural mismatch between cloud virtualization and generative AI. </p><p>The public cloud relies on virtualization to host stateless web servers. Generative AI completely breaks this model.</p><p>Training a trillion parameter model requires tens of thousands of GPUs communicating via Synchronous Real Time Communication. </p><p>A single delayed packet on a standard cloud network switch stalls the entire run. </p><p>AI requires bare metal access. It requires custom InfiniBand networking and extreme thermal cooling.</p><p>Then we evaluate the math. </p><p>Renting a GPU means paying the hyper-scaler profit margin. When your compute bill hits 10 billion dollars a year building a custom nuclear powered data center is mathematically cheaper.</p><h2>What&#8217;s the Impact?</h2><p>Let&#8217;s analyze what this means for a Chief Technology Officer who is not building a custom data center.</p><p>There is good news for speed. </p><p>Custom networking pipelines designed exclusively for inference will drastically drop latency. Your Time to First Token (TTFT) will plummet. The math will execute perfectly on their bare metal.</p><p>However there are some bad news as well. We call this the Monopoly Trap. </p><p>You must destroy the assumption that cheaper internal costs for the giants mean cheaper API costs for developers. The AI giants will subsidize costs now to capture the market. </p><p>This creates an impenetrable physical moat. Startups cannot build their own Stargate to compete.</p><p>Once the market consolidates to two or three mega providers who own the physical hardware the era of cheap AI ends. </p><p>They will have total leverage to exponentially raise API token prices when investors demand profitability.</p><div><hr></div><h2>Conclusion</h2><p>The cloud abstraction is failing under the weight of artificial intelligence. </p><p>You can enjoy the speed and subsidized prices for now but you must architect defensively.</p><p>If your business model relies on a single provider keeping APIs cheap forever it is built on borrowed time.</p><p>The AI Giants are building physical castles. </p><p>Make sure you are not locked inside when they raise the drawbridge.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Why Agentic AI requires Graph based Observability?]]></title><description><![CDATA[The industry is currently flooded with vendors claiming to have &#8220;solved&#8221; AI observability but when you view them through the lens of enterprise architecture, their solutions fall apart.]]></description><link>https://www.binarybox.org/p/why-agentic-ai-requires-graph-based</link><guid isPermaLink="false">https://www.binarybox.org/p/why-agentic-ai-requires-graph-based</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Wed, 08 Apr 2026 06:01:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FMdJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FMdJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FMdJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FMdJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FMdJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FMdJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FMdJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg" width="1379" height="776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:776,&quot;width&quot;:1379,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Observability: An Essential Block for Gen AI Solutions | by Gen AI @ Cybage  Software Private Limited | Medium&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Observability: An Essential Block for Gen AI Solutions | by Gen AI @ Cybage  Software Private Limited | Medium" title="Observability: An Essential Block for Gen AI Solutions | by Gen AI @ Cybage  Software Private Limited | Medium" srcset="https://substackcdn.com/image/fetch/$s_!FMdJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FMdJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FMdJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FMdJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F913abc70-2bc1-4a75-954d-31a2d8eb7349_1379x776.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Recently, I have received a call from an old client about their AI Agent making decisions which they cannot track even when they have invested in Observability tooling. </p><p>They had deployed a sophisticated procurement agent to manage their raw materials inventory. The agent was designed to read the Bill of Materials (BOM) for incoming orders and automatically interact with the ERP to ensure supply.</p><p>It had been running smoothly for weeks. Then, one night, the agent confidently issued a purchase order for 5,000 gallons of highly reactive industrial solvent that the company absolutely did not need. It was a $200,000 mistake executed in milliseconds.</p><p>The engineering team did what they were trained to do, they opened their AI Observability dashboards to debug the failure.</p><p>They were using one of the industry-standard LLMOps platforms (think LangSmith or Arize AI). They opened the specific trace, expecting to see a giant red error box.</p><p>Instead, the dashboard showed a 100% success rate.</p><p>The token usage was optimal. The latency was fine. The visual Directed Acyclic Graph (DAG) in the UI showed a perfectly clean execution path: the agent checked the ERP, saw a shortage, queried the vector DB for an alternative, found the solvent, and successfully executed the <code>Create_Purchase_Order</code> tool.</p><p>According to modern AI observability tools, the agent performed flawlessly. The JSON parsed correctly. The APIs returned <code>200 OK</code>.</p><p>The tools were completely blind to the fact that the agent had just committed a catastrophic logical error. This is the &#8220;Silent Success&#8221; problem of Agentic AI, and it exposes a massive architectural flaw in how the industry approaches observability.</p><h2>The AI Observability</h2><p>The industry is currently flooded with vendors claiming to have &#8220;solved&#8221; AI observability. When you view them through the lens of enterprise architecture, their solutions fall apart because they suffer from a severe semantic blindspot.</p><h3>The Giants (Datadog, Dynatrace, New Relic etc)</h3><p>To be fair, these platforms have evolved. They boast &#8220;Interactive Dependency Graphs&#8221; and &#8220;Entity Maps.&#8221; But look at what these graphs actually map, they map <em><strong>infrastructure and service flow</strong></em><strong>, not </strong><em><strong>reasoning</strong></em><strong>.</strong></p><p>They are built for deterministic microservices. They treat an LLM call exactly like a SQL query. </p><p>A <code>200 OK</code> HTTP status code between your agent container and the OpenAI endpoint means nothing if the agent just authorized a catastrophic purchase order. </p><p>They map the servers, but they are blind to the thought process.</p><h3>The AI Focused (Arize AI, LangSmith, Kore.ai etc)</h3><p>These platforms specifically target AI, and their marketing heavily touts &#8220;agentic tracing&#8221; and &#8220;graph visualization.&#8221; They do a great job of mapping a single agent&#8217;s trajectory.</p><p>But under the hood, they are still fundamentally OpenTelemetry (OTel) log stores. They suffer from <strong>Trace Isolation</strong>. They capture the agent&#8217;s actions perfectly, but that trace exists in a vacuum. </p><p>The tool does not know your business logic.</p><p>If an agent skips a mandatory safety check, LangSmith simply shows you a UI graph where the &#8220;Safety Check&#8221; node isn&#8217;t there. </p><p>Because the tool doesn&#8217;t know the rules of your enterprise, it assumes the agent&#8217;s path was correct. They treat the graph as a <em>UI visualization of an ephemeral log</em>, not as a <em><strong>computable mathematical structure tied to reality</strong></em><strong>.</strong></p><h2><strong>The Solution</strong></h2><p>If an agent&#8217;s execution is a branching decision tree, the observability layer must be a native graph database (like <strong><a href="https://neo4j.com/">Neo4j</a></strong>) that already holds your company&#8217;s business logic.</p><p>I have implemented a separate agent&#8217;s execution state directly into <strong>Neo4j</strong>, where the company&#8217;s manufacturing ontology (their Enterprise Knowledge Graph) already lived. </p><p>We ran the agent in a shadow environment, and a week later, it attempted the exact same hallucination.</p><p>This time, we didn&#8217;t look at a UI visualization of a single trace. We mathematically queried the agent&#8217;s behavior against the laws of the business.</p><p>Because both the <strong>Agent Trace</strong> and the <strong>Enterprise Ontology</strong> lived in the same database, we could write a Cypher query to perform an &#8220;Ontological Join&#8221;</p><pre><code><code>// Find any execution trace where the agent ordered a hazardous material
// WITHOUT executing a corresponding safety check tool.
MATCH (trace:AgentSession)-[:TOOL_CALL]-&gt;(po:PurchaseOrder)-[:TARGETS_ITEM]-&gt;(item:Material)
MATCH (item)-[:HAS_PROPERTY]-&gt;(prop:HazardLevel {value: 'High'})
WHERE NOT (trace)-[:TOOL_CALL]-&gt;(:SafetyMatrixCheck)
RETURN trace.id, item.name</code></code></pre><p><strong>The Graph revealed the semantic missing edge.</strong> The agent had queried the vector database for an alternative chemical. It found &#8220;Solvent Y-200&#8221;. In the company&#8217;s ontology, Y-200 is linked to a <code>[HazardLevel: High]</code> node, which strictly requires a <code>[:SAFETY_CLEARANCE]</code> edge.</p><p>The agent had bypassed the safety check tool entirely.</p><p>LangSmith couldn&#8217;t catch this because LangSmith doesn&#8217;t know what &#8220;Solvent Y-200&#8221; is. It only knows what the LLM typed. </p><p>Neo4j caught it instantly because it cross-referenced the agent&#8217;s ephemeral trace against the physical reality of the business.</p><h2>What else is needed?</h2><p>Once you have Native Graph Evals in place, you stop guessing and start engineering. Seeing the failure is step one. Preventing it requires expanding your architecture beyond trusting the LLM.</p><p>Here is what else you must implement when deploying agents to production</p><h3>Deterministic Tool Gateways</h3><p>An LLM should never speak directly to an ERP or a production database. </p><p>You must build a middleware gateway between the agent&#8217;s output and the actual API execution. Using our Neo4j setup, we built a gateway that intercepts the <code>Create_Purchase_Order</code> tool call, queries the graph to ensure the <code>[Safety_Check]</code> node exists in the current session trace, and blocks the API if the graph topology is invalid.</p><h3>State-Bound Prompts</h3><p>Do not give an agent all 15 of its tools in the initial system prompt. That is begging for hallucinations. </p><p>Use the graph state to dynamically inject only the tools that are valid for that specific moment. </p><p>If the agent has not successfully completed the <code>Inventory_Check</code> node, the <code>Create_Purchase_Order</code> tool should literally not exist in its context window.</p><h3>Macro-Topological Analysis</h3><p>Stop looking at crashes one by one. </p><p>With a native graph database, you can run PageRank or Cycle Detection algorithms across millions of historical traces simultaneously. </p><p>You can mathematically prove that 90% of your token-burning infinite loops only happen when the agent interacts with Tool A immediately after failing Tool B.</p><div><hr></div><h2>Conclusion</h2><p>If you deploy autonomous agents to production using isolated trace stores, you are not deploying software. You are deploying a dangerous, expensive black box.</p><p>Native graph observability shifts AI from &#8220;magic&#8221; back to determinism. By interrogating the topology of the agent&#8217;s reasoning against the ontology of your business, you stop relying on &#8220;Silent Successes.&#8221; </p><p>You patch the system prompt, build a gateway, or constrain the toolset precisely at the node where the graph broke.</p><p>Stop treating agents like magic functions. Treat them like autonomous state machines traversing a graph, and build the infrastructure to observe them accordingly.</p><div><hr></div><p>If you want to see exactly how to build this architecture in production, I am doing a deep dive on this exact topic at <strong><a href="https://neo4j.com/nodes-ai/">Neo4j&#8217;s NODES AI</a></strong>. </p><p>Register for free and come see the graph in action.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The $20/$200 AI Subscription is going to be Dead?]]></title><description><![CDATA[They priced access to massive supercomputers like a Spotify subscription. You paid $20 or $200 a month, and in exchange, you got an all-you-can-eat buffet of compute power.]]></description><link>https://www.binarybox.org/p/the-20200-ai-subscription-is-going</link><guid isPermaLink="false">https://www.binarybox.org/p/the-20200-ai-subscription-is-going</guid><dc:creator><![CDATA[Ashok Vishwakarma]]></dc:creator><pubDate>Thu, 02 Apr 2026 06:02:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Kwhi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>For two years, the industry sold us the idea that frontier AI was just another consumer utility. They priced access to massive supercomputers like a Spotify subscription. You paid $20 or $200 a month, and in exchange, you got an all-you-can-eat buffet of compute power.</p><p>But by early 2026, the physical cost of running these models caught up with the business reality.</p><p>Look at the events of the last quarter. OpenAI shut down Sora and backed out of their Disney partnership. Microsoft is tightening its cloud budget. And a leaked internal dashboard shared by <strong><a href="https://www.linkedin.com/company/the-signal-ai/posts">The Signal</a></strong> from Anthropic showed just how unsustainable the generative AI business model is right now.</p><p>We aren&#8217;t entering an era of unlimited personal AI. We&#8217;re actually going back to the 1970s model, the era of the IBM Mainframe. The hallucination seems officially over &#128578;</p><h2>AI isn&#8217;t a SaaS</h2><p>Software-as-a-Service (SaaS) is a great business model because the marginal cost of serving one more user is effectively zero.</p><p>AI inference isn&#8217;t SaaS. It scales linearly. Every prompt requires physical hardware to do work.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Kwhi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Kwhi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Kwhi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Kwhi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Kwhi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Kwhi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg" width="1280" height="1560" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1560,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:220436,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.binarybox.org/i/192891847?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Kwhi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Kwhi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Kwhi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Kwhi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8dfc557-d52f-4bb7-b801-4fc425dba879_1280x1560.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <strong><a href="https://www.linkedin.com/company/the-signal-ai/posts">The Signal</a></strong> </figcaption></figure></div><p>To understand why the flat-rate AI subscription is failing, look at the leaked Anthropic dashboard. An enterprise power user on a $200/month &#8220;Pro&#8221; tier ran an autonomous coding loop. In 23 days, that single user consumed 1.1 billion tokens and triggered 9,221 sub-agent tasks.</p><p>The actual compute cost of running those inferences on Anthropic&#8217;s GPU clusters was $27,000. Anthropic took a 135x loss on a single customer in less than a month. </p><p>Analyzing a 100-page PDF or running an autonomous agent isn&#8217;t a simple database query. It requires firing up clusters of GPUs and executing billions of operations. You can&#8217;t sell that kind of compute for a flat fee and hope to make it up in volume. Volume is exactly what causes the losses.</p><h3>The Death of Sora</h3><p>If you want proof that the subsidy is over, look at Sora.</p><p>OpenAI killed their flagship video generation model less than six months after its public launch. The tech press talked about &#8220;safety concerns&#8221; and &#8220;copyright,&#8221; but the reality was the Cost of Goods Sold (COGS).</p><p>Generating 60 frames per second of photorealistic video requires massive compute. Keeping the Sora clusters running for 500,000 active users burned an estimated $1 million a day in electricity and GPU depreciation.</p><p>They tried to pivot to the enterprise by signing a $1 billion partnership with Disney. But Disney realized that offloading their rendering pipeline to OpenAI&#8217;s servers was actually more expensive than doing it in-house. The unit economics didn&#8217;t make sense, so the servers were shut down.</p><h3>OpenAI&#8217;s &#8220;Risk Factor&#8221;</h3><p>The cloud providers have woken up. For years, Microsoft subsidized OpenAI&#8217;s compute to gain market share. That era of cheap infrastructure is over.</p><p>In a recent financial disclosure, OpenAI explicitly listed their reliance on Microsoft Azure&#8217;s compute pricing as a &#8220;Risk Factor.&#8221; </p><p>Wall Street is demanding a return on the billions poured into data centers. Investors are forcing AI labs to drop unprofitable consumer tools and focus entirely on enterprise contracts that actually pay the bills.</p><h2>Edge vs. Mainframe</h2><p>To fix the broken math, the AI market is splitting into two distinct tiers. </p><p>The middle ground which is $200/month frontier web app is disappearing.</p><h3>Tier 1: The Consumer Edge</h3><p>Consumers will get smaller, 8-billion parameter models running locally on their phones and laptops (Apple Silicon, Snapdragon NPUs etc).</p><p>These models are good enough for basic tasks like grammar correction and summarizing emails, but they aren&#8217;t capable of deep reasoning. </p><p>Why the shift? </p><p>Because by pushing the model to the edge, companies offload the cost of the compute and electricity directly onto the user&#8217;s battery. It is the only way the consumer unit economics work.</p><h3>Tier 2: The AI Mainframe (Enterprise)</h3><p>True frontier AI, massive models capable of deep, autonomous workflows will become bespoke enterprise tools.</p><p>These won&#8217;t be accessible via a casual web interface. </p><p>They will be sold via multi-million-dollar B2B contracts to pharmaceutical companies running protein simulations, and quant hedge funds executing trading logic. </p><p>They are the only businesses with gross margins high enough to afford the true, unsubsidized cost of compute.</p><div><hr></div><h2>Conclusion</h2><p>The idea that a solo developer in a garage will have the exact same compute power as the CTO of JPMorgan isn&#8217;t realistic. </p><p>The physics of data centers dictate otherwise.</p><p>As a Software Architect, you need to plan defensively. Relying on cloud providers to subsidize your application&#8217;s heavy reasoning is a risk.</p><p>Build your systems around cheap, local, open-source models for the basic plumbing such as routing, classification, and simple tasks. </p><p>Treat frontier API calls as an expensive, highly constrained physical resource. </p><p>Use them only when absolutely necessary and plan for AI like heavy industrial equipment. </p><p>The era of cheap, subsidized compute is over.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.binarybox.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BinaryBox! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>