<?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[ByteByteGo Newsletter]]></title><description><![CDATA[Explain complex systems with simple terms, from the authors of the best-selling system design book series. Join over 1,000,000 friendly readers.]]></description><link>https://blog.bytebytego.com</link><image><url>https://substackcdn.com/image/fetch/$s_!1eXV!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5609ae-1239-4400-9491-6010a15c4d60_504x504.png</url><title>ByteByteGo Newsletter</title><link>https://blog.bytebytego.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 28 Nov 2026 14:53:49 GMT</lastBuildDate><atom:link href="https://blog.bytebytego.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[ByteByteGo]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[alex@bytebytego.com]]></webMaster><itunes:owner><itunes:email><![CDATA[alex@bytebytego.com]]></itunes:email><itunes:name><![CDATA[Alex Xu]]></itunes:name></itunes:owner><itunes:author><![CDATA[Alex Xu]]></itunes:author><googleplay:owner><![CDATA[alex@bytebytego.com]]></googleplay:owner><googleplay:email><![CDATA[alex@bytebytego.com]]></googleplay:email><googleplay:author><![CDATA[Alex Xu]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[⏳ LIMITED TIME OFFER: All in One Interview Prep Black Friday Sale]]></title><description><![CDATA[Yearly Black Friday sale is now live!]]></description><link>https://blog.bytebytego.com/p/limited-time-offer-all-in-one-interview-33c</link><guid isPermaLink="false">https://blog.bytebytego.com/p/limited-time-offer-all-in-one-interview-33c</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Fri, 27 Nov 2026 15:30:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!25Qg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Yearly Black Friday sale is now live! Use code <strong>BF2026</strong> at checkout to get 30% off the all-in-one interview prep online courses.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/interview-prep-bf-substack&quot;,&quot;text&quot;:&quot;Get it Now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://go.bytebytego.com/interview-prep-bf-substack"><span>Get it Now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/interview-prep-bf-substack" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!25Qg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 424w, https://substackcdn.com/image/fetch/$s_!25Qg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 848w, https://substackcdn.com/image/fetch/$s_!25Qg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 1272w, https://substackcdn.com/image/fetch/$s_!25Qg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!25Qg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1851727,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/interview-prep-bf-substack&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/180189311?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!25Qg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 424w, https://substackcdn.com/image/fetch/$s_!25Qg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 848w, https://substackcdn.com/image/fetch/$s_!25Qg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 1272w, https://substackcdn.com/image/fetch/$s_!25Qg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5572d45c-9c45-4f82-8321-6cfe805a20eb_2360x2852.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>To take advantage of this limited time offer, subscribe before 11:59 pm PST on Tuesday, December 1.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/interview-prep-bf-substack&quot;,&quot;text&quot;:&quot;Get it Now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/interview-prep-bf-substack"><span>Get it Now</span></a></p>]]></content:encoded></item><item><title><![CDATA[The Life of a Database Row: What Really Happens Behind the Scenes]]></title><description><![CDATA[In this article, we&#8217;ll look at the life of a row in the database with respect to these operations.]]></description><link>https://blog.bytebytego.com/p/the-life-of-a-database-row-what-really</link><guid isPermaLink="false">https://blog.bytebytego.com/p/the-life-of-a-database-row-what-really</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:30:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!LdF6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63c668e7-ee68-455b-a479-57400b6d17f4_2650x3068.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An INSERT, UPDATE, or DELETE might look like a small operation when looking at it from the outside. You add a row, change some values, or remove something that is no longer needed. But inside the database, such a request can involve memory, transaction logs, indexes, older row versions, and background cleanup. Also, other machines might be involved.</p><p>It&#8217;s the responsibility of the database to make these pieces work together while letting you run concurrent queries and dealing with crashes. This is why a committed row can still be waiting for its data page to reach disk, and a deleted row might continue to take up storage space.</p><p>In this article, we&#8217;ll look at the life of a row in the database with respect to these operations. Here&#8217;s what we&#8217;ll cover:</p><ul><li><p>What is a row</p></li><li><p>How insert operations work</p></li><li><p>The role of WAL</p></li><li><p>How update operations work</p></li><li><p>How delete operations work</p></li><li><p>Vacuum and compaction</p></li><li><p>How replication and backup work</p></li><li><p>How database commits generate work</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_!TuUD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TuUD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!TuUD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!TuUD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!TuUD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TuUD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png" width="1456" height="1686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:555805,&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://blog.bytebytego.com/i/226666106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.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_!TuUD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!TuUD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!TuUD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!TuUD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8feab652-770f-41a7-80d3-ea2ec66b8b0f_2650x3068.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>What is a Row?</h2>
      <p>
          <a href="https://blog.bytebytego.com/p/the-life-of-a-database-row-what-really">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[DoorDash Dispatch: Building a Lightning-Fast Delivery System]]></title><description><![CDATA[In this article, we&#8217;ll look at how DoorDash Dispatch built a lightning-fast delivery system.]]></description><link>https://blog.bytebytego.com/p/doordash-dispatch-building-a-lightning</link><guid isPermaLink="false">https://blog.bytebytego.com/p/doordash-dispatch-building-a-lightning</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Mon, 23 Nov 2026 16:31:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!vodx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/warpbuild_112326">Plan 2027 for more AI code while reducing CI spend (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/warpbuild_112326" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t6Wa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!t6Wa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!t6Wa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!t6Wa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t6Wa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png" width="1456" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116261,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/warpbuild_112326&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.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_!t6Wa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!t6Wa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!t6Wa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!t6Wa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afaf3bb-0e3f-44c0-9bf8-3feeef845f36_1600x840.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Next year your team will write more code with AI than ever. That means more commits, more CI and a bigger bill, unless your runners change.</p><p>WarpBuild is the fix teams at Braintrust, Raycast, OpenRouter, Comcast and Jane Street already use:</p><ul><li><p>Twice as fast at half the cost</p></li><li><p>One line change to runs-on</p></li><li><p>Linux, macOS and Windows on x86-64 and ARM64</p></li><li><p>Unlimited macOS concurrency</p></li><li><p>Pay only for what you use</p></li></ul><p>Use code START50 for $50 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/warpbuild_112326&quot;,&quot;text&quot;:&quot;Get $50 in free credits&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/warpbuild_112326"><span>Get $50 in free credits</span></a></p><div><hr></div><p>DoorDash&#8217;s dispatch platform has to make a lot of good delivery-related decisions while the situations around the system and its environment keep changing.</p><p>To deal with the ever-growing need for innovation, the DoorDash engineering team had to redesign the dispatch system.</p><p>With the redesign, they were able to deal with two main problems. One was about how to divide the calculations into smaller pieces. The second was about how to run those pieces across many machines without losing the information that might be needed to make good assignment decisions.</p><p>In this article, we&#8217;ll look at how DoorDash Dispatch built a lightning-fast delivery system. Here&#8217;s what we&#8217;ll cover:</p><ul><li><p>The role of a dispatch system</p></li><li><p>Why did the old dispatch system at DoorDash struggle</p></li><li><p>Why couldn&#8217;t DoorDash just add more servers</p></li><li><p>Separating coordination from heavy computation</p></li><li><p>Breaking the optimization problem into smaller pieces</p></li><li><p>How did DoorDash replace such a critical system safely</p></li><li><p>The improvements after the new system</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hEuU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hEuU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 424w, https://substackcdn.com/image/fetch/$s_!hEuU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 848w, https://substackcdn.com/image/fetch/$s_!hEuU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 1272w, https://substackcdn.com/image/fetch/$s_!hEuU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hEuU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png" width="1456" height="627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:627,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265161,&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://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.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_!hEuU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 424w, https://substackcdn.com/image/fetch/$s_!hEuU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 848w, https://substackcdn.com/image/fetch/$s_!hEuU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 1272w, https://substackcdn.com/image/fetch/$s_!hEuU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b9e484-8f47-4737-b746-afecee668f44_4164x1794.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>What Does a Dispatch System Actually Do</h2><p>When you place an order for food, several things take place to make the order successful. The restaurant cooks the food, and a delivery driver arrives at the restaurant to collect the food. After collecting the food, that driver brings it to you. DoorDash calls its delivery drivers Dashers.</p><p>The dispatch system is the one that takes care of all these activities by deciding which Dashers should be given which orders to deal with. To make that decision, the system has to know a lot more than just which Dasher is closest to the restaurant. For example, let&#8217;s say you have a Dasher who is two minutes away, but the restaurant needs another 15 minutes to get the food ready. If you send that Dasher immediately to the restaurant, it can create a long wait time. You might have another Dasher who is much farther away, but they might reach the restaurant closer to the food preparation time. Also, you might have two orders going in a similar direction that could be clubbed into a single delivery trip.</p><p>As you can see, the dispatch system has to consider both space and time while making these decisions. Space includes the locations of Dashers, restaurants, and customers. Time includes travel durations, traffic conditions, food preparation, and delivery expectations.</p><p>You can think of this as being quite similar to the vehicle routing problem. Making decisions about how vehicles should handle a collection of destinations while working within a set of constraints. DoorDash&#8217;s version of this problem is especially demanding because the inputs keep changing. You have new orders arriving all the time. Dashers are always on the move. Food preparation estimates change even as the system is calculating.</p><p>This gives dispatch an unusual requirement. A decision about a particular order must be good enough, but it should also be taken fast enough to be useful. If you calculate an assignment most beautifully, it&#8217;s useless if doing so takes a long time.</p><p>This relation between the quality of decisions and speed of making those decisions is the starting point for the entire redesign.</p><h2>Why Did the Old System Struggle as DoorDash Grew?</h2><p>DoorDash&#8217;s previous dispatch engine was built as a monolith. This means that several major responsibilities were brought together into one tightly connected system.</p><p>It maintained the state of the delivery network, applied business rules, and performed expensive routing calculations. You can think of the state as the information about the current situation, such as available Dashers and orders awaiting assignment.</p><p>The old engine performs several stages in sequence. DoorDash used that engine to generate possible assignments, check proposed routes, and then optimize the choices. Candidate generation means coming up with possibilities that the system can evaluate. Optimization is all about selecting a good enough combination of those possibilities according to its goals and constraints.</p><p>The difficulty with the old engine was that the computational work grew much faster than the delivery volume. This is because the important algorithms in the original engine had roughly quadratic complexity. It meant that doubling the size of the input could produce approximately four times the computational work.</p><p>You can understand this pressure by thinking about possible Dasher-to-order combinations. If both the number of Dashers and the number of orders increase, the number of potential pairings grows quickly. If you evaluate routes and batches, it adds further work.</p><p>During peak periods, the demand can go up to nearly four times the system&#8217;s dispatch processing capacity. The engine had to limit what it took into consideration or fall back to simpler decision rules. The delays caused by this also damaged the usefulness of its calculations. A Dasher might move away from a promising pickup. Or food that is ready might sit waiting while the engine was still making the decision.</p><p>As you can see, the problem went beyond just slow software. Slow computation changed the quality of real-world deliveries with a pretty tangible impact on the user experience.</p><h2>Why Couldn&#8217;t DoorDash Just Add More Servers?</h2><p>If you add servers, it&#8217;s called horizontal scaling. It works quite well when you can divide work into independent requests. For example, let&#8217;s say you have many requests that display unrelated product pages, and those can be handled by different servers. One server generally doesn&#8217;t need to coordinate its answer with every other server answering a page request.</p><p>However, dispatch assignments have more dependencies.</p><p>Let&#8217;s say you have two nearby restaurant orders that could share a delivery trip. If you randomly send those orders to separate workers, each worker may find a reasonable individual assignment. But they won&#8217;t get the opportunity to deal with both of them. Similarly, two workers could independently identify the same Dasher as a promising choice.</p><p>There is also a systems problem. Even if you can somehow distribute the calculations, some component must prepare the work, send the necessary data, gather the results, and combine them. If that component becomes overloaded, you have just moved the bottleneck to a different place rather than removing it completely.</p><p>DoorDash therefore had to answer two questions at the same time:</p><ul><li><p>How can the application distribute computation across more machines?</p></li><li><p>How can the optimization problem be divided while keeping useful relationships between orders, routes, and Dashers?</p></li></ul><p>The first question needed a change to the architecture. The second required changing how the work was organized.</p><h2>Separating Coordination from Heavy Computation</h2><p>DoorDash rebuilt the platform around two independently scalable tiers. You can think of a tier as a group of components with a particular responsibility.</p><ul><li><p>The coordinator tier takes care of the dispatch process. You can use it to maintain the broader logistics state, apply business rules, and organize the work that needs to happen.</p></li><li><p>The compute tier is made up of workers that run expensive calculations. These workers generate and evaluate routing possibilities, run optimization routines, and execute ML models.</p></li></ul><p>Separating the two tiers lets you increase compute capacity without the need for every worker to take over all the responsibilities of the original engine. You can get a simple view of this execution flow in the following manner:</p><ul><li><p>The workers operate in parallel. The reconciliation step combines their results into coordinated dispatch decisions.</p></li><li><p>However, if you distribute computation, you introduce a communication cost. If every worker gets a complete copy of the entire logistics state on every run, transmitting and processing that data could become quite costly.</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_!ZWQG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZWQG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 424w, https://substackcdn.com/image/fetch/$s_!ZWQG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 848w, https://substackcdn.com/image/fetch/$s_!ZWQG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 1272w, https://substackcdn.com/image/fetch/$s_!ZWQG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZWQG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png" width="1456" height="656" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:656,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:365976,&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://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.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_!ZWQG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 424w, https://substackcdn.com/image/fetch/$s_!ZWQG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 848w, https://substackcdn.com/image/fetch/$s_!ZWQG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 1272w, https://substackcdn.com/image/fetch/$s_!ZWQG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901e9894-e76a-4af9-91d7-0e2a1badd0f5_4776x2152.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>DoorDash takes care of this through localized payload sharding. You can think of a payload as the data sent with a job, and sharding means dividing that data into smaller portions. Each worker receives the local context needed for its assigned calculation.</p><p>The coordinator sends these payloads over gRPC, which is a framework for communication between services. This happens on each dispatch tick. Or each round of dispatch processing.</p><p>The payloads are totally self-contained. This way, you can keep the workers stateless. A worker can still hold a trained model or temporary calculation data. The key separation is that the responsibility for managing the changing logistics state remains with the coordinator.</p><h2>Breaking the Optimization Problem Into Smaller Pieces</h2><p>Separating the tiers makes it possible to execute things in parallel. But it doesn&#8217;t automatically bring down the size of the optimization problem.</p><p>If every worker still had to evaluate a huge, interconnected set of possibilities, the original computational pressure would be high. Therefore, DoorDash introduced hierarchical decomposition, which means breaking a large problem into smaller problems through multiple stages.</p><p>The coordinator groups the broader dispatch problem into localized geographic clusters and delivery trajectories. This is to create manageable pieces that retain the local relationships important to routing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pFvW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pFvW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 424w, https://substackcdn.com/image/fetch/$s_!pFvW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 848w, https://substackcdn.com/image/fetch/$s_!pFvW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 1272w, https://substackcdn.com/image/fetch/$s_!pFvW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pFvW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png" width="1456" height="606" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:606,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:325603,&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://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.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_!pFvW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 424w, https://substackcdn.com/image/fetch/$s_!pFvW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 848w, https://substackcdn.com/image/fetch/$s_!pFvW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 1272w, https://substackcdn.com/image/fetch/$s_!pFvW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd72c25e-8207-44d5-9953-a0dbd22f0ca1_4482x1864.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 first is rapid pre-clustering, which you can use to create initial groups.</p><p>The second is centroid-based refinement, which is used to refine those groups using their centers. For reference, you can think of a centroid as a representative center of a group of points.</p><p>The main point here is that partitioning takes place through an initial grouping and is followed by refinement. You can think of each partition as a piece of work for a compute node. This node generates and checks possibilities within its local context while other nodes work on other partitions.</p><p>This has two benefits. Smaller problems reduce the number of combinations each worker must take into account, and parallel execution lets you process several problems at the same time.</p><p>But you still want local solutions to fit together. The software introduces a geographic boundary to organize computation. It doesn&#8217;t correspond to a real separation between delivery opportunities. Orders and routes near that boundary may still be related.</p><p>Therefore, DoorDash uses a global reconciliation and scoring layer to combine results across partitions before you can select final assignments. This preserves much of the optimization quality of the original problem while letting expensive candidate generation take place in parallel.</p><p>You can think of the workers as producing useful local options and reconciliation as considering how those options can be combined into the broader dispatch decisions.</p><h2>How Did DoorDash Replace Such a Critical System Safely</h2><p>Dispatch directly affects active deliveries. A defective setup could send Dashers to poor assignments, increase waiting time, or disrupt fulfillment.</p><p>The DoorDash engineering team started with shadow testing.</p><p>In shadow mode, you duplicate the incoming production work. They sent one to the existing engine, and another went to the new platform. The existing engine continued to control actual deliveries. However, the new engine also calculated what it would have done. But its output was recorded for analysis purposes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aE-D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aE-D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 424w, https://substackcdn.com/image/fetch/$s_!aE-D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 848w, https://substackcdn.com/image/fetch/$s_!aE-D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 1272w, https://substackcdn.com/image/fetch/$s_!aE-D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aE-D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png" width="1456" height="2096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2096,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:182090,&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://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.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_!aE-D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 424w, https://substackcdn.com/image/fetch/$s_!aE-D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 848w, https://substackcdn.com/image/fetch/$s_!aE-D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 1272w, https://substackcdn.com/image/fetch/$s_!aE-D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c496657-d7ab-463c-b9c7-f20ea67858b1_1974x2842.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 lets the developers check the new platform under real production conditions. Also, including peak traffic. They could compare proposed matches, delivery-time-related behavior, and resilience against the existing system.</p><p>This approach is known as behavioral regression analysis. You can think of a regression as a change that makes some previously acceptable behavior worse. The team had to establish that the new architecture took care of dispatch quality as well as improve performance.</p><p>However, shadow testing has a practical limit. Since the decisions made by the new system are not actually executed, you cannot use it to fully check the real-world impact of those decisions.</p><p>Therefore, the DoorDash engineering team followed shadow testing with production switchback experiments. In a switchback experiment, your systems take turns controlling real production activity under controlled conditions. This let them compare their outcomes. The DoorDash engineering team used limited exposure and fallback mechanisms while checking system reliability and fulfillment results. Only when they were satisfied did they expand the rollout to a wider user base.</p><p>The progression was that shadow testing gave a lot of confidence in the new engine&#8217;s behavior on live production inputs, whereas controlled production experiments tested what happened when the decisions made an impact on deliveries.</p><h2>The Improvements</h2><p>DoorDash reports a great deal of improvement in the platform&#8217;s capacity and responsiveness after the implementation of the new dispatch system.</p><p>The detailed results are as follows:</p><ul><li><p>Ten times the dispatch processing scale, enabled by distributing computation.</p></li><li><p>More than 99.96% of runs completed in under 20 seconds, compared with execution stretching to minutes under heavy load in the old system.</p></li><li><p>More than 99.99% availability during Super Bowl traffic spikes, despite a 10% week-over-week increase in peak volume.</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_!vodx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vodx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 424w, https://substackcdn.com/image/fetch/$s_!vodx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 848w, https://substackcdn.com/image/fetch/$s_!vodx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 1272w, https://substackcdn.com/image/fetch/$s_!vodx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!vodx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png" width="1456" height="712" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:712,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:249298,&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://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.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_!vodx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 424w, https://substackcdn.com/image/fetch/$s_!vodx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 848w, https://substackcdn.com/image/fetch/$s_!vodx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 1272w, https://substackcdn.com/image/fetch/$s_!vodx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd718a853-2bf8-44f9-95ed-744f8a9bb734_3812x1864.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://careersatdoordash.com/blog/how-doordash-built-a-next-generation-real-time-dispatch-platform/">DoorDash engineering blog</a></figcaption></figure></div><p>You can use these measurements to think about different properties. Processing scale is all about how much work the system can handle. Execution latency deals with how long a run takes. Availability is whether the system remains operational.</p><p>For dispatch, all three results matter. You can have a platform that can eventually process a large volume, but it can still cause problems if individual decisions are taken too slowly.</p><p>The additional capacity also lets the system evaluate a larger set of possibilities instead of restricting its search aggressively during busy periods. DoorDash connects this broader search to improved Dasher acceptance rates, fulfillment efficiency, and Dasher earnings. They also report millions of dollars in annualized fulfillment savings.</p><p>The practical benefit was that decisions arrived faster, and the platform had enough computational room to consider better assignments.</p><h2>Conclusion</h2><p>The redesign also made it possible to have machine learning. With the new platform, they could make it practical to run more computationally demanding ML models inside the dispatch process.</p><p>A trained model performs inference when it processes an input and produces an output, such as a score for a proposed route. If dispatch needs enormous numbers of these evaluations, even a small cost per evaluation can become significant.</p><p>DoorDash introduced two model-serving tiers to handle different needs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YsQ9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YsQ9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 424w, https://substackcdn.com/image/fetch/$s_!YsQ9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 848w, https://substackcdn.com/image/fetch/$s_!YsQ9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 1272w, https://substackcdn.com/image/fetch/$s_!YsQ9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!YsQ9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png" width="1456" height="1191" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1191,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:246878,&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://blog.bytebytego.com/i/225841091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.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_!YsQ9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 424w, https://substackcdn.com/image/fetch/$s_!YsQ9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 848w, https://substackcdn.com/image/fetch/$s_!YsQ9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 1272w, https://substackcdn.com/image/fetch/$s_!YsQ9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fced3f675-c5d1-465f-8334-b41992b1ad38_3134x2564.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>L1 serves models locally inside compute workers. Each worker contains ONNX Runtime, which is software that executes trained ML models. Since these evaluations happen locally, they avoid a network round trip to a separate model server.</p><p>L2 serves models through separate remote infrastructure. This tier handles more complex policy evaluations that occur less frequently. These heavier models run in isolated ML serving clusters, helping separate their computational demands from the coordinator&#8217;s state-management responsibilities.</p><p>The main idea is that frequent evaluations need a very short execution path, while heavier but less frequent evaluations can use dedicated remote capacity.</p><p>The platform also enabled a multi-agent RL system that adjusts the optimizer&#8217;s priorities. You can think of reinforcement learning (RL) as an approach in which a system learns how to make decisions by getting feedback about results. In DoorDash&#8217;s application, the agents adapt objective weights. These weights determine how strongly the optimizer favors different goals, such as delivery speed and batching efficiency.</p><p>Ultimately, the biggest contribution of the new platform wasn&#8217;t one isolated performance gain. It has managed to change the long-term trajectory of DoorDash&#8217;s dispatch system.</p><p><strong>References:</strong></p><ul><li><p><a href="https://careersatdoordash.com/blog/how-doordash-built-a-next-generation-real-time-dispatch-platform/">How DoorDash built a next-generation real-time dispatch platform</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[EP234: Docker vs Kubernetes]]></title><description><![CDATA[Which one should we use?]]></description><link>https://blog.bytebytego.com/p/ep234-docker-vs-kubernetes</link><guid isPermaLink="false">https://blog.bytebytego.com/p/ep234-docker-vs-kubernetes</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Sat, 21 Nov 2026 16:31:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4Jzx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/datadog_112126">Monitoring infrastructure that never sits still (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/datadog_112126" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i0cC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!i0cC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!i0cC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!i0cC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i0cC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://go.bytebytego.com/datadog_112126&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i0cC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!i0cC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!i0cC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!i0cC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81db6bdd-0195-4420-8ecd-ce0efd33b82f_1200x628.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Hosts and containers shift by the hour, so when latency spikes, it&#8217;s hard to tell which of your hundreds of signals actually matters. This free Datadog eBook lays out a practical framework for monitoring dynamic, cloud-native infrastructure, with worked examples for Kubernetes and AWS Lambda.</p><p>You&#8217;ll learn how to:</p><ul><li><p>Separate work metrics (throughput, success, errors, latency) from resource metrics</p></li><li><p>Cut alert noise by paging on symptoms, not causes</p></li><li><p>Apply the framework to Kubernetes clusters and Lambda functions</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/datadog_112126&quot;,&quot;text&quot;:&quot;Download the eBook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/datadog_112126"><span>Download the eBook</span></a></p><div><hr></div><p>This week&#8217;s system design refresher:</p><ul><li><p>Docker vs Kubernetes</p></li><li><p>How Redis Works Under the Hood</p></li><li><p>Open Weights vs Closed Models: 7 Tradeoffs in 1 Diagram</p></li><li><p>How does Claude&#8217;s text watermark work?</p></li><li><p>9 Distributed Systems Patterns You Should Know</p></li></ul><div><hr></div><h2>Docker vs Kubernetes</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4Jzx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4Jzx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!4Jzx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!4Jzx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!4Jzx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!4Jzx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!4Jzx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!4Jzx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!4Jzx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!4Jzx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F535e9159-310b-47bc-b6fa-408c09bf5f30_2484x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Docker: It&#8217;s a tool for packaging an application, including its code, libraries, runtimes, and configurations, into a portable unit called a container image. That image is used to spin up a container, which can be deployed on a laptop, server, or in the cloud.</p><p>Docker usually runs on a single machine. You can manage multiple containers on a single host with the help of Docker Compose. </p><p>Kubernetes: It's an orchestration platform that manages the deployment and maintenance of containerized applications, particularly on multiple machines. It can start and stop containers, spin up more containers, and reduce their numbers as needed. It can distribute network traffic and roll out application updates. </p><p>Kubernetes is useful when you need features for your production application, like automatic scaling, self-healing, high availability, and deployment across multiple machines.</p><div><hr></div><h2>How Redis Works Under the Hood</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VMSJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VMSJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!VMSJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!VMSJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!VMSJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!VMSJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd55179c-107b-4089-a472-6857271a3da8_2484x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!VMSJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!VMSJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!VMSJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!VMSJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd55179c-107b-4089-a472-6857271a3da8_2484x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Redis is fast because it keeps everything in RAM and uses efficient in-memory data structures. Let&#8217;s see how Redis works under the hood:</p><ul><li><p>The application sends a Redis command to the server. If replication is configured, commands that update data are normally sent to the primary server. </p></li><li><p>Redis decodes the request, which is usually encoded using the Redis Serialization Protocol (RESP). It separates the request into the command name, key(s), values, and other arguments. </p></li><li><p>Redis parses and validates the request command. It checks whether the command exists, and the arguments are correctly formatted. It checks whether the client is authenticated and authorized. If the request is invalid, an error is returned. </p></li><li><p>Redis looks up the command in its internal command table and finds the corresponding code to execute it. </p></li><li><p>Redis executes the command. Commands are executed sequentially. </p></li><li><p>Redis updates the RAM by locating the relevant keys in its in-memory dictionaries and then performs the requested operation. </p></li><li><p>If a key has a time-to-live, Redis stores its expiration timestamp separately. Expired keys are removed by lazy or active expiration.</p></li><li><p>Commands that change data in RAM may need to propagate such writes to supporting systems through different mechanisms. For example, AOF is a persistent mechanism based on logging writes. RDB is another persistent mechanism based on snapshots, or the data replication mechanism, which copies writes to other Redis servers. </p></li><li><p>If Redis reaches its configured memory limit, it applies its eviction policy. </p></li><li><p>Finally, Redis creates the response in RESP format and returns to the client.</p></li></ul><div><hr></div><h2><a href="https://fandf.co/4frF1CG">Most RAG Pipelines Answer, Then Forget (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://fandf.co/4frF1CG" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kqpN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!kqpN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!kqpN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!kqpN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kqpN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png" width="1456" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:272061,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://fandf.co/4frF1CG&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/225831071?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.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_!kqpN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!kqpN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!kqpN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!kqpN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F878f1554-74a9-44d5-aefc-a5f532c2d624_1600x840.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Basic RAG is good at looking things up, but not so good at remembering. Nothing a user says gets written back, so every session starts from zero and your agent repeats the same questions. The fix isn&#8217;t a bigger prompt. It&#8217;s a memory system that handles different kinds of information differently, so rules are retrieved exactly instead of by similarity search, and only what&#8217;s worth keeping gets saved.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fandf.co/4frF1CG&quot;,&quot;text&quot;:&quot;See the memory types + runnable code&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fandf.co/4frF1CG"><span>See the memory types + runnable code</span></a></p><div><hr></div><h2>Open Weights vs Closed Models: 7 Tradeoffs in 1 Diagram</h2><p>For every AI project, you have two options: download the weights of an open model and run it yourself, or call a vendor's API. The diagram below puts the 7 tradeoffs side by side.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0L5_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0L5_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 424w, https://substackcdn.com/image/fetch/$s_!0L5_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 848w, https://substackcdn.com/image/fetch/$s_!0L5_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!0L5_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!0L5_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!0L5_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 424w, https://substackcdn.com/image/fetch/$s_!0L5_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 848w, https://substackcdn.com/image/fetch/$s_!0L5_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!0L5_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9f55dc3-8e6b-4b79-b7c0-912217a51d1a_2484x3002.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Fine-tuning: Open weights allow fine-tuning on your own GPUs and data. Closed models do not allow users to access their weights for fine-tuning.</p><p>Versioning: With open weights, you keep the artifact. Pin any version and run it for as long as you want. Closed models serve pinned, dated snapshots but retire them on the vendor's schedule.</p><p>Transparency: Open weights are inspectable, but a closed model is a black box with an API.</p><p>Deployment: Open weights can be deployed on various hardware. With closed models, every device connects inward to one endpoint.</p><p>Licensing: Open-weight licenses are custom, and terms vary by model. Closed models run on a commercial ToS that the vendor sets.</p><p>Self-hosting: Open weights are self-hosted by default. It is your stack. Closed models are API-first, though some vendors sell on-prem or private VPC deployments.</p><p>Cost: Self-hosting wins only at high volume, once you add ops overhead. APIs are cheaper at low volume, with zero upfront cost.</p><div><hr></div><h2>How does Claude&#8217;s text watermark work?</h2><p>Anthropic recently shared their intent to watermark text so they can identify AI-generated text. This post is based on my understanding of how it works.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QmFs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QmFs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QmFs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QmFs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QmFs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QmFs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg" width="1280" height="1546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1546,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;diagram&quot;,&quot;title&quot;:&quot;diagram&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="diagram" title="diagram" srcset="https://substackcdn.com/image/fetch/$s_!QmFs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QmFs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QmFs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QmFs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d8301f9-1ad3-44c7-9134-69e30888049c_1280x1546.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>LLMs produce text word by word. At each step, they generate probabilities for the next likely word. Instead of sampling randomly from those words, the watermarking trick changes which words are allowed to be picked.</p><p>How to watermark a response?</p><p>Step 1: The model produces probabilities for the next word.</p><p>Step 2: Normally a random number generator picks one of the good candidates. With watermarking, a keyed function takes a secret key plus the previous few words and decides which candidates are valid to pick from.</p><p>Step 3: This repeats for the whole response. Places where there are multiple plausible choices carry the watermark signal.</p><p>How to detect a watermarked text?</p><p>Step 1: For any candidate word in the text, we check whether it is a valid choice based on the secret key and the few preceding words. If the word is valid, that is counted as a match.</p><p>Step 2: Run this across the entire text. Watermarked text matches far more often. The overall match rate can be treated as an AI-generated score.</p><p>I&#8217;m personally getting quite annoyed by the false negatives from all these AI text detection techniques, especially for technical writing.</p><p>What&#8217;s your thoughts on AI text detection? Do you think AI text detection is useful, or will it create more problems?</p><div><hr></div><h2>9 Distributed Systems Patterns You Should Know</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aJjm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aJjm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!aJjm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!aJjm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!aJjm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aJjm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:&quot;Image&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!aJjm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!aJjm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!aJjm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!aJjm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><ul><li><p>In replication, you make exact copies of your data and store them on different servers.</p></li><li><p>In sharding, you break a large database horizontally, so different rows live on separate machines.</p></li><li><p>In consistent hashing, you distribute data across different machines or servers using a virtual circular ring.</p></li><li><p>PubSub is an asynchronous messaging pattern that decouples service creators from service consumers.</p></li><li><p>In circuit breaker distributed pattern, it stops an application from repeatedly executing an operation that is likely to fail.</p></li><li><p>In Retry with a backoff pattern, you handle temporary network glitches or brief service timeouts. It is a resiliency pattern.</p></li><li><p>In the leader election pattern, you designate a single master node to manage actions and maintain cluster state. It&#8217;s what stops two nodes from thinking they&#8217;re in charge.</p></li><li><p>In quorum read/write pattern, you ensure enough replicas agree on each read and write so that the set overlaps. It is a data consistency pattern that is used in distributed databases to guarantee up-to-date information.</p></li><li><p>Saga is a design pattern that manages distributed transactions through a sequence of local transactions across multiple microservices. If one step fails, each earlier step is undone by its own compensating action.</p></li></ul>]]></content:encoded></item><item><title><![CDATA[The Invisible Systems: What Happens Between Services]]></title><description><![CDATA[When you draw a system architecture diagram, services are often shown as boxes, and arrows between them show the communication pathways.]]></description><link>https://blog.bytebytego.com/p/the-invisible-systems-what-happens</link><guid isPermaLink="false">https://blog.bytebytego.com/p/the-invisible-systems-what-happens</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Thu, 19 Nov 2026 16:30:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Yg5R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you draw a system architecture diagram, services are often shown as boxes, and arrows between them show the communication pathways. Most of the time, we pay the greatest attention to the boxes that contain the code, databases, CPU usage, and deployments. But every arrow also hides critical work, resources, and a bunch of assumptions.</p><p>You can have a failing request even when both services are running correctly. One service might be waiting for a connection. Or it might go to an outdated address. Or the request might reach the service after the calling service has already given up. All of this is part of the invisible system, and this is what we&#8217;re going to explore in this article.</p><p>Here&#8217;s what we&#8217;ll cover:</p><ul><li><p>The nature of a service call</p></li><li><p>Why moving data is costly</p></li><li><p>Why healthy services can have problems</p></li><li><p>How downstream calls spend time</p></li><li><p>How retries can cause issues</p></li><li><p>How slow dependencies impact the requests</p></li><li><p>How DNS changes impact requests</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_!Yg5R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yg5R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!Yg5R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!Yg5R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!Yg5R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yg5R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png" width="1456" height="1686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:474512,&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://blog.bytebytego.com/i/225656914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.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_!Yg5R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!Yg5R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!Yg5R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!Yg5R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390602ab-4c07-45ac-b901-5089fd08f0b6_2650x3068.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>The Nature of a Service-to-Service Call</h2>
      <p>
          <a href="https://blog.bytebytego.com/p/the-invisible-systems-what-happens">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Evals for AI Engineers]]></title><description><![CDATA[In today&#8217;s issue, we&#8217;re featuring an excerpt that introduces the Three Gulfs of LLM Application Development.]]></description><link>https://blog.bytebytego.com/p/evals-for-ai-engineers</link><guid isPermaLink="false">https://blog.bytebytego.com/p/evals-for-ai-engineers</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Wed, 18 Nov 2026 16:31:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!F5_R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/redpanda_111826">GlobalFoundries on Taking AI Agents to Production (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/redpanda_111826" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O8ts!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!O8ts!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!O8ts!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!O8ts!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O8ts!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://go.bytebytego.com/redpanda_111826&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!O8ts!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!O8ts!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!O8ts!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!O8ts!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41351bcc-dd12-4454-9d3a-76122b00d909_1200x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><br>Getting AI agents into production at enterprise scale raises hard questions: what data they can reach, how fresh it needs to be, and how to keep them in bounds. At the Agentic Data Summit on December 9, Vishal Mehra, SVP &amp; CIO at GlobalFoundries, shares how one of the world&#8217;s leading semiconductor manufacturers is putting agentic AI to work. Hear why GlobalFoundries chose Redpanda, what the team built, the results so far, and lessons for peers. Catch GlobalFoundries live at 10:00 AM PT. The summit is free and virtual and runs 8:30 AM&#8211;2:00 PM PT.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/redpanda_111826&quot;,&quot;text&quot;:&quot;Save Your Seat&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/redpanda_111826"><span>Save Your Seat</span></a></p><div><hr></div><p>AI evals are one of the most important and hardest parts of building AI products. Getting started can feel like navigating a maze of conflicting advice.</p><p>I reached out to <a href="https://www.linkedin.com/in/hamelhusain/">Hamel Husain</a>, an ML engineer at OpenAI with 20 years of experience, to share a practical introduction to AI evaluation. Previously at Airbnb and GitHub, Hamel has helped more than 35 companies build and evaluate real-world AI products. He coauthored <strong><a href="https://www.amazon.com/dp/B0GTYQTYDP?lv=shuf&amp;th=1&amp;channelId=500&amp;plpRedirect=mhFallback">Evals for AI Engineers: Systematically Measuring and Improving AI Applications</a></strong> with <a href="https://www.linkedin.com/in/shrshnk/">Shreya Shankar</a>, an ML systems researcher and PhD candidate at UC Berkeley focused on LLM evaluation and data quality. Together, they&#8217;ve trained more than 4,500 engineers and product managers through their AI evals course.</p><p>In today&#8217;s issue, we&#8217;re featuring an excerpt that introduces the <strong>Three Gulfs of LLM Application Development</strong>: understanding your data, making your requirements explicit, and getting the model to follow them consistently.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UprJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UprJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 424w, https://substackcdn.com/image/fetch/$s_!UprJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 848w, https://substackcdn.com/image/fetch/$s_!UprJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!UprJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UprJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png" width="1334" height="1762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1762,&quot;width&quot;:1334,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UprJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 424w, https://substackcdn.com/image/fetch/$s_!UprJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 848w, https://substackcdn.com/image/fetch/$s_!UprJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!UprJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc85b23e1-434e-452d-af1c-30615653d93f_1334x1762.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.amazon.com/dp/B0GTYQTYDP?th=1&quot;,&quot;text&quot;:&quot;Check out the book&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.amazon.com/dp/B0GTYQTYDP?th=1"><span>Check out the book</span></a></p><div><hr></div><p><em>Excerpted from Evals for AI Engineers by Shreya Shankar and Hamel Husain. Copyright &#169; 2027 Hamel Husain and Shreya Shankar. Published by O&#8217;Reilly Media, Inc. Used with permission.</em></p><h2>Evaluation in Applications</h2><p>At the application stage, the model has already been trained. The work is in building around it. You have to decide what the product should achieve, translate that goal into prompts and agent logic, and then verify that the model&#8217;s outputs are acceptable. Each of these steps introduces its own difficulties:</p><ul><li><p><strong>Objectives are vague at first.</strong> A goal like &#8220;summarize emails&#8221; sounds simple, but only when you inspect outputs do the ambiguities appear: how detailed, in what format, and with what exclusions?</p></li><li><p><strong>Instructions might have gaps.</strong> Prompts and agent logic expressed in natural language rarely capture the full intent, which leads to inconsistent or incomplete behavior.</p></li><li><p><strong>Behavior changes on new data.</strong> A setup that works on a handful of test cases may fail once it encounters the variability of real inputs.</p></li></ul><p>In practice, these issues show up again and again when building LLM applications. To reason about these challenges more systematically, we use the Three Gulfs framework, which names three places where development tends to break down&#8212;comprehension, specification, and generalization. Each gulf highlights a different point where development typically goes wrong, and each requires a different strategy to address, a theme we will return to throughout this book.</p><h2>The Three Gulfs of LLM Application Development</h2><p>As mentioned, a useful way to understand the challenges of building with LLMs is the Three Gulfs model (Figure 1-1), adapted from Shankar et al. (2025) and inspired by Norman (1988). The model highlights three common gaps that developers face when building and evaluating applications. We call these gaps <em>comprehension</em>, <em>specification</em>, and <em>generalization</em>.</p><p>Throughout this book, we will use this framework to diagnose why an application is failing, and select the most appropriate strategy to fix it.</p><p>Consider an agent that processes incoming emails sent to an organization. The goal is to extract the sender&#8217;s name, summarize the key requests, and categorize the email. At first glance, this seems straightforward. But each stage of development exposes different challenges across the Three Gulfs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F5_R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F5_R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 424w, https://substackcdn.com/image/fetch/$s_!F5_R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 848w, https://substackcdn.com/image/fetch/$s_!F5_R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 1272w, https://substackcdn.com/image/fetch/$s_!F5_R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!F5_R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png" width="1261" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1261,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!F5_R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 424w, https://substackcdn.com/image/fetch/$s_!F5_R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 848w, https://substackcdn.com/image/fetch/$s_!F5_R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 1272w, https://substackcdn.com/image/fetch/$s_!F5_R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dda9c75-4756-4b79-a648-3339b9174c4f_1261x800.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><em>Figure 1-1. Three Gulfs model of challenges in LLM agent development, adapted from Shankar et al. (2025)</em></figcaption></figure></div><div><hr></div><h2>The Gulf of Comprehension (Between the Developer and Data)</h2><p>The first gulf is between the developer and the data. To build effective prompts and agents, you need a solid grasp of what your inputs actually look like. Without that, you will design against an imagined version of the task, not the real one.</p><p>Consider the email processing example. If you only look at a handful of clean, well-written emails when drafting your prompt, you might write instructions that work fine on those cases. But the production data will also include forwards, replies with long quoted threads, messages with signatures in multiple languages, and poorly formatted text copied from PDFs. A prompt that ignores these realities might lead the LLM to, for example, summarize an entire quoted thread instead of the new message, or mistake a signature block for the main request.</p><p>The Gulf of Comprehension applies to outputs too, not just inputs. We also need a clear sense of how the LLM behaves on those inputs. You cannot read every output it generates, but you still need to recognize the common ways it succeeds and the common ways it fails. Otherwise, it&#8217;s easy to be misled by a few good examples and miss the patterns that only show up at scale. In the email agent, for example, the LLM might usually extract the sender and write a decent summary. But when you look closer, you may notice recurring mistakes. The LLM might pull the wrong name when several are mentioned, drop key details in longer messages, or copy boilerplate like confidentiality notices into the summary. These failures may only happen occasionally, but if they occur, the system will feel unreliable to users.</p><p>Bridging the Gulf of Comprehension means developing strategies to characterize both your inputs and your outputs at scale, so you know what the data really looks like, and how the system actually behaves, without having to inspect everything by hand.</p><h2>The Gulf of Specification (Between the Developer and the LLM Agent)</h2><p>The second gulf is between what we want and what we actually tell the LLM to do. Our intent (the task we have in mind) is often only loosely captured by the prompts or agent logic we write. Natural language is imprecise, and small gaps in how we phrase things can lead to large differences in behavior.</p><p>Take the instruction:</p><p>Extract the sender&#8217;s name and summarize the key requests in this email.</p><p>At first glance it looks specific, but important details are left unstated. Should the summary be a paragraph or a bulleted list? Should the sender be the display name, the full email address, or both? Should implicit requests be included, or only explicit ones? How concise should the summary be?</p><p>The LLM cannot fill in these choices for you. If you don&#8217;t make them explicit, the system will guess, and those guesses will not always line up with what you expect. That&#8217;s why two runs of the same agent might produce outputs in different formats, with varying levels of detail, or with inconsistent handling of edge cases.</p><p>The Gulf of Specification is this gap between our intent and our instructions. Closing it requires making expectations explicit and aligning them closely with the data the agent will actually see.</p><div><hr></div><h2><a href="https://fandf.co/4ApvPa6">Limit agent reach. Record everything. Terminate agent access (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://fandf.co/4ApvPa6" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wpbR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!wpbR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!wpbR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!wpbR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wpbR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318351,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://fandf.co/4ApvPa6&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/224653591?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!wpbR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!wpbR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!wpbR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!wpbR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe271a7-e06a-42b1-aa62-6e71e5de03a3_1200x1200.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 enterprises hesitate to connect AI agents to production infrastructure. It feels risky, so they keep agents out of production or approve every step by hand.</p><p>Teleport Beams is different:</p><ul><li><p>Trusted runtimes for AI agents in production</p></li><li><p>Agents propose execution plans for human or LLM judgement</p></li><li><p>Separate runtime executes with only approved access</p></li><li><p>No secrets in the agent&#8217;s environment</p></li></ul><p>Trace actions and LLM conversations, flag behavior that drifts from intent, and terminate agents and their connections with a kill switch.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fandf.co/4ApvPa6&quot;,&quot;text&quot;:&quot;Explore Beams&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://fandf.co/4ApvPa6"><span>Explore Beams</span></a></p><div><hr></div><h2>The Gulf of Generalization (Between the Data and the LLM Agent)</h2><p>The third gulf is between the data your system sees and how the LLM generalizes to it. Even if you have a solid grasp of your inputs and have written a clear, well-scoped prompt, the LLM is still prone to errors. LLMs are not perfect, and they will make mistakes.</p><p>For example, imagine you&#8217;ve clearly specified that the system should extract the sender&#8217;s name from the email header. Most of the time the LLM follows this instruction. But occasionally, when the body of the email mentions another person (say, a public figure), the LLM will incorrectly return that name instead. Nothing about your understanding of the data or your prompt was wrong. The LLM simply failed to apply the instructions consistently. Maybe the LLM is too biased in favor of names it has seen in its training data.</p><p>This is the Gulf of Generalization: the fact that LLMs can behave unpredictably even when comprehension and specification are handled well. These errors usually become visible only when the system is exposed to the full variety of real-world data. And they are unavoidable: no matter how advanced the models become, there will always be cases where they produce the wrong output.</p><h2>Applying the Three Gulfs to Other Domains</h2><p>The Three Gulfs apply beyond email processing. For example, in a customer support chatbot, the Gulf of Comprehension is about the full variety of customer queries, including multilingual messages, typos, and multi-part questions. The Gulf of Specification is about defining what a &#8220;good&#8221; response looks like; a bot that apologizes when it should escalate to a human is following the wrong instructions, and without explicit rules the bot will guess. The Gulf of Generalization shows up when the bot handles billing questions well but fails on product-specific questions it has seen fewer examples of.</p><p>In a code generation assistant, the Gulf of Comprehension is about how developers actually describe what they want, which often includes vague requests, incomplete context, and references to undocumented internal APIs. The Gulf of Specification is about defining output format, error handling, and style conventions. The Gulf of Generalization shows up when the model produces correct Python but fails on less common languages or complex multi-file changes.</p><p>The evaluation strategy for each application depends on which gulf is the primary source of failure.</p><h2>Why LLM Agent Evaluation Is Challenging</h2><p>Evaluating LLM applications is challenging because every application requires bridging all Three Gulfs (Comprehension, Specification, and Generalization) again in its own context. Evaluation is not a one-time check. It is an iterative process where requirements become clear only after you interact with real outputs.</p><p><strong>Tip:</strong> The Three Gulfs framework provides a shared vocabulary for discussing LLM application failures. When debugging with your team, you can quickly identify whether a problem is a &#8220;specification failure&#8221; (the prompt didn&#8217;t make requirements clear enough) or a &#8220;generalization failure&#8221; (the LLM isn&#8217;t applying instructions consistently). This common language helps teams diagnose issues faster and choose the right fixes, rather than debating vague notions of the model &#8220;not working.&#8221;</p><p>When you start examining outputs (closing the Gulf of Comprehension), you will inevitably find mistakes. The next question is whether these mistakes are due to incomplete specification or to failures of generalization. If the prompt does not make the requirement explicit, you may fix it with better instructions or agent design. If the prompt is already well specified and the LLM still fails, then the issue lies in generalization, and automated evaluations can help measure how often that failure occurs.</p><p>Applications also differ in how much they can rely on users to bridge the gulfs on their own. In a coding assistant, maybe we can assume programmers have high agency. They know how to specify requirements precisely, they can read and debug generated code (comprehension), and they can run tests that expose when the LLM has failed to generalize (e.g., generating a working React app in some cases but not others).</p><p>In contrast, consider an LLM-powered personal stylist. A user asking for an outfit may not know how to specify requirements clearly. The application itself may need to ask clarifying questions, such as about weather or formality, to reduce specification gaps. Users also cannot easily detect generalization failures: if the LLM produces good suggestions for casual winter wear, they may assume it will also perform well for winter weddings, an assumption that may not hold.</p><p>Effective evaluation requires thinking about the stakes in each gulf for your application. Where the stakes are higher, because users cannot easily catch mistakes themselves or because the cost of errors is significant, you will need to design more rigorous processes to close the gaps.</p><h2>The LLM Evaluation Lifecycle: Bridging the Gulfs with Evaluation</h2><p>The Three Gulfs (Comprehension, Specification, and Generalization) capture the main ways LLM applications go wrong. In this book, we approach evaluation through the Analyze-Measure-Improve lifecycle (Figure 1-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_!UnxO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UnxO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 424w, https://substackcdn.com/image/fetch/$s_!UnxO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 848w, https://substackcdn.com/image/fetch/$s_!UnxO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 1272w, https://substackcdn.com/image/fetch/$s_!UnxO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!UnxO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png" width="798" height="398" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:398,&quot;width&quot;:798,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UnxO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 424w, https://substackcdn.com/image/fetch/$s_!UnxO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 848w, https://substackcdn.com/image/fetch/$s_!UnxO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 1272w, https://substackcdn.com/image/fetch/$s_!UnxO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59f182e-45fa-42eb-89a2-d6c2d3560857_798x398.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><em>Figure 1-2. The Analyze-Measure-Improve evaluation lifecycle</em></figcaption></figure></div><p>This iterative framework bridges the Three Gulfs by using evaluation to systematically understand failures (Analyze), quantify them (Measure), and fix them (Improve). This lifecycle is the framework we will use to show how evaluation can make these gulfs visible and help you decide how to address them.</p><h3>Analyze</h3><p>The cycle begins with Analyze. At this stage you look at real inputs and outputs to understand how the system actually behaves. The goal is to identify failure modes, not to quantify them yet. While Analyze connects most directly to the Gulf of Comprehension (understanding your data and your system&#8217;s behavior), it also surfaces specification gaps and generalization issues; you often discover all three types of problems during the same trace-reading sessions.</p><p>In practice, this means reading <em>traces</em> (the full record of what the agent did for each request), talking to users or domain experts about what &#8220;correct&#8221; looks like, and building up a list of the ways the system fails. Chapter 3 covers this in detail.</p><p>Imagine you review a batch of email summaries and notice two recurring problems: the LLM sometimes includes irrelevant text from signatures, and sometimes omits the most important request. These observations tell you where things break down and offer clues about whether the issue is poor specification or a generalization failure.</p><h3>Measure</h3><p>After Analyze, you will know the kinds of mistakes the system makes. Some will clearly be specification problems: the prompt did not say enough, so the fix is obvious. Others will look like generalization errors: the prompt was clear, but the LLM still misbehaves.</p><p>The Measure step is about quantifying those generalization issues. The key question during Measure is: how often does each failure mode actually occur, and is the rate low enough that the system is usable? Without measurement, you&#8217;re relying on impressions from a handful of traces, which can be misleading in either direction (a few bad examples can make a good system look broken, and a few good examples can make a broken system look fine). To measure at scale, you design <em>evaluators</em> (automated checks) that can score traces without human review. These can be code-based rules, or they can use another LLM as a judge (a pattern we cover in Chapter 5).</p><p>Imagine you are working with an LLM that sometimes pulls signature blocks into summaries even after you clarified the prompt. You build a rule-based check that flags boilerplate phrases across thousands of outputs and find it happens in 8% of cases. Measurement tells you whether a failure is an occasional annoyance or a systematic problem.</p><h3>Improve</h3><p>The final step is Improve: decide how to adjust the system based on what Analyze and Measure have uncovered. The path you follow depends on the source of the errors:</p><ul><li><p>If they stem from specification gaps, the fix is usually to tighten the prompt or adjust agent logic.</p></li><li><p>If they stem from generalization failures, you may need stronger interventions such as adding more examples, refining retrieval, or fine-tuning on labeled data.</p></li></ul><p>Chapter 12 covers these improvement strategies in detail, organized by effort level from quick prompt edits to model-level changes.</p><p>Imagine your measurements show that missing key requests happens because the prompt never specified the level of detail. This is a specification fix: you revise the instruction to say, &#8220;Summarize the sender&#8217;s requests in three concise bullet points.&#8221; But the name confusion issue persists even after a clear prompt. That is a generalization problem, and fixing it may require adding labeled training data, or redesigning the application to extract the sender from email metadata instead of relying on the LLM to parse the body.</p><p>Each pass through this cycle helps you understand the gulfs you are facing and choose the right level of evaluation rigor for your application.</p><h2><strong>Putting It Together</strong></h2><p>When you encounter a failing LLM application, ask which gulf the failure falls into:</p><ul><li><p><strong>Comprehension:</strong> You don&#8217;t yet understand what your inputs look like or how the system actually behaves on them; look at more traces before changing anything.</p></li><li><p><strong>Specification:</strong> Your requirements aren&#8217;t explicit enough for the LLM to follow; revise the prompt or agent logic to close the gap.</p></li><li><p><strong>Generalization:</strong> The requirements are clear, but the LLM still fails on some inputs. Measure how often the failure occurs, and consider stronger interventions like more examples, better retrieval, or fine-tuning.</p></li></ul><p>The Analyze-Measure-Improve lifecycle structures this diagnosis into a repeatable process. You analyze traces to surface the failure modes, measure how common they are, and then apply a fix and feed the results back into the next round of analysis.</p><p><em>Excerpted from </em>Evals for AI Engineers<em> by Shreya Shankar and Hamel Husain. Copyright &#169; 2027 Hamel Husain and Shreya Shankar. Published by O&#8217;Reilly Media, Inc. Used with permission.</em></p>]]></content:encoded></item><item><title><![CDATA[Why Thinking More Can Make an LLM Dumb]]></title><description><![CDATA[In this article, we&#8217;ll try to understand why thinking longer can make an LLM dumber.]]></description><link>https://blog.bytebytego.com/p/why-thinking-more-can-make-an-llm</link><guid isPermaLink="false">https://blog.bytebytego.com/p/why-thinking-more-can-make-an-llm</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Tue, 17 Nov 2026 16:31:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_LMN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff39276da-349a-4337-8d56-57682f8a9fff_2048x1152.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/unblocked_111726">How much of your week is spent answering questions? (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/unblocked_111726" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oxw8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!oxw8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!oxw8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!oxw8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oxw8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.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;:721434,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/unblocked_111726&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.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_!oxw8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!oxw8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!oxw8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!oxw8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1faa3eb8-0093-4214-bdb8-ad2b98c69f1b_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>New hires, support, PMs, and your coding agents all need to know how the product works and why it works that way. Today, you&#8217;re the one pointing them in the right direction.</p><p>Unblocked works out what&#8217;s current and relevant across your code, PRs, tickets, Slack, and production data, so:</p><ul><li><p>Everyone gets cited answers in Slack without pulling in an engineer</p></li><li><p>When the answer turns into a fix, a cloud agent drafts the PR</p></li><li><p>Your agents generate code that follows past decisions, no steering needed</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/unblocked_111726&quot;,&quot;text&quot;:&quot;See how it works&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/unblocked_111726"><span>See how it works</span></a></p><div><hr></div><p>When you ask someone to double-check an answer, you usually expect that you&#8217;ll get a better answer.</p><p>For example, when we look at an invoice the second time, we might find out that an item was counted twice. However, the opposite experience is also quite common. You might revisit a straightforward question on an exam and convince yourself that there&#8217;s a catch. In this case, you might end up changing an answer that was correct the very first time.</p><p>A reasoning language model can do both. It might use extra time to catch a mistake, or it can also use that time to develop a wrong interpretation. Both scenarios come from a basic feature of language models. Once a model writes down an idea, you can build on that idea a few steps later. But whether it improves the answer or gets things wrong depends on the original question.</p><p>In this article, we&#8217;ll try to understand why thinking longer can make an LLM dumber. Here&#8217;s what we&#8217;ll cover:</p><ul><li><p>How a language model builds on its answers</p></li><li><p>What happens before a reasoning model sends a reply</p></li><li><p>The advantage of extra time on a question</p></li><li><p>How to teach a model to use extra steps</p></li><li><p>When the model has already done enough</p></li><li><p>How an extra step turns a right answer into a wrong one</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fgsB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fgsB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 424w, https://substackcdn.com/image/fetch/$s_!fgsB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 848w, https://substackcdn.com/image/fetch/$s_!fgsB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 1272w, https://substackcdn.com/image/fetch/$s_!fgsB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fgsB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png" width="1456" height="878" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:878,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:218959,&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://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.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_!fgsB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 424w, https://substackcdn.com/image/fetch/$s_!fgsB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 848w, https://substackcdn.com/image/fetch/$s_!fgsB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 1272w, https://substackcdn.com/image/fetch/$s_!fgsB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5e2af76-0237-44c6-b654-0e88f6e5009d_3474x2096.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>How a Language Model Builds on its Own Words</h2><p>An LLM generates text in small pieces called tokens. You can think of a token as a word, part of a word, or a symbol. When the model selects its next token, it takes the original question into consideration along with the text it has already generated. This means that whatever the model writes near the start of an answer can have a big impact on the calculations it does multiple sentences later.</p><p>Let&#8217;s say you have a shop that raises the price of a $100 item by 20% and then reduces the new price by 20%. What&#8217;s the final price? Without too much thinking, you might be tempted to say $100. This is because the percentage values look the same, and the words &#8220;raises&#8221; and &#8220;reduces&#8221; seem to cancel each other out.</p><p>But as you might&#8217;ve guessed, such an answer would be incorrect. The final price is $96. And the best way to get to this answer in a systematic manner is to write down the intermediate answer. Or the answer to the first calculation, which should be $120. This makes it easy to calculate the price after a 20% reduction.</p><p>An LLM can also benefit from the same sequence of checking the intermediate results. Once it has found out that the new price is $120, it can easily calculate the price after the discount. You can see that the question has been broken into smaller ones and carried the result of the first answer into the second. Such a sequence of steps is also known as a chain of thought. In this example, the most useful part of the chain is a single number that makes it easy to handle the next calculation.</p><h2>What Happens Before a Reasoning Model Replies?</h2><p>An ordinary LLM can provide a fully worked solution when you ask it to explain a calculation step by step. However, reasoning models such as OpenAI&#8217;s o1 were specifically trained to generate intermediate work before generating a final answer. Even if you ask for just the final price, a reasoning model can work through the price change before returning the final answer.</p><p>Most LLMs use a type of neural network called a Transformer. One of the abilities of the Transformer-based model is to connect the text that it is currently generating with relevant parts of the text that was generated earlier. This basic design approach can handle both a quick reply and a longer calculation. With their model, DeepSeek also showed how further training could teach an existing Transformer-based model to use this ability of intermediate results much more effectively.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MW4L!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MW4L!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 424w, https://substackcdn.com/image/fetch/$s_!MW4L!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 848w, https://substackcdn.com/image/fetch/$s_!MW4L!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 1272w, https://substackcdn.com/image/fetch/$s_!MW4L!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!MW4L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png" width="1456" height="1794" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:293808,&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://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.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_!MW4L!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 424w, https://substackcdn.com/image/fetch/$s_!MW4L!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 848w, https://substackcdn.com/image/fetch/$s_!MW4L!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 1272w, https://substackcdn.com/image/fetch/$s_!MW4L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a26528-798b-4028-8be6-ff26ea22966a_3244x3998.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 can think of the intermediate results working as a sort of scratchpad. Let&#8217;s say you give a model 3 different calendars of people and ask for the earliest half-hour when everyone is free. The final answer might be &#8220;Tuesday at 11.&#8221; But before generating that answer, the model is going to compare the calendars, find out that an earlier slot works for only two people, and then move on to the next available slot. The answer might take just a few words. But the work that happens behind the scenes is much more than that.</p><p>The tokens that are used for this work are often called reasoning tokens or thinking tokens. Many model providers keep the raw reasoning of their models private and might just display a summary so that the user might think of the work that was done in the background as mainly a pause of some sort. Sometimes a reasoning trace of a model might look like a conversation between two people because one sentence proposes an idea and a later one objects to it. A single model might be generating both sentences.</p><h2>The Advantage of Extra Time on a Difficult Question</h2><p>There are two main times when you can spend computing power on a model.</p><p>First is at the time of training, when the model adjusts its internal settings based on examples or feedback. These changes can have a big impact on how the model answers future questions.</p><p>Second is at the time of inference. At that time, the trained model uses the settings made at the time of training to answer the question in front of it. If you spend more computing power on that individual request, it is called inference-time scaling. Also known as test-time scaling.</p><p>Let&#8217;s say you have a piece of code that&#8217;s supposed to process every item in a list. It numbers the items starting from one and keeps running while the current position is less than the total number of items in the list. Now, imagine that a user complains that the last item always goes missing. A model might immediately think that the stopping condition of the loop might have a problem. That&#8217;s a pretty reasonable guess, and there is a simple way to test it.</p><p>With three items, the loop goes to positions one and two. When it goes to position three, the condition checks whether 3 is less than 3. The answer is false, and so the loop stops before processing the third item. Simply the act of following the code through a small example can turn a possible suspicion into a final explanation. It also shows that making the loop run when the two numbers are equal would fix this bug.</p><p>This is one way to spend extra time. Within a single attempt, you can have each step build on what the previous step found out. Another approach is to come up with several separate solutions and compare their final answers. However, separate attempts can help more each attempt can make different mistakes. In contrast, a longer individual attempt is much more beneficial when you let the model follow a promising idea long enough to verify it.</p><h2>How To Teach A Model to Use Extra Steps</h2><p>How can a model learn that checking its work can pay off?</p><p>For reference, DeepSeek explored this with their R1-Zero model. The team started with a pretrained model that had already learned patterns of language, code, and mathematics. This was followed by the use of reinforcement learning. The model attempted problems, received scores for its responses, and gradually adjusted what kind of responses it was likely to generate.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mUkh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mUkh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 424w, https://substackcdn.com/image/fetch/$s_!mUkh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 848w, https://substackcdn.com/image/fetch/$s_!mUkh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!mUkh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!mUkh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png" width="1456" height="663" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:663,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137012,&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://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.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_!mUkh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 424w, https://substackcdn.com/image/fetch/$s_!mUkh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 848w, https://substackcdn.com/image/fetch/$s_!mUkh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!mUkh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bf9f8d1-3994-47a3-9653-9168809740bb_3232x1472.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Some problems benefit from this approach because you can check their answers automatically. For example, in the case of a math question with a known result, a program can easily compare the model&#8217;s answers with an answer key. For a coding problem, you can have tests that show what works and what doesn&#8217;t. A different solution might pass both cases. But the tests can differentiate between the two even if both come with convincing explanations.</p><p>DeepSeek used a training method called Group Relative Policy Optimization (GRPO).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3zT_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3zT_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 424w, https://substackcdn.com/image/fetch/$s_!3zT_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 848w, https://substackcdn.com/image/fetch/$s_!3zT_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 1272w, https://substackcdn.com/image/fetch/$s_!3zT_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3zT_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png" width="1456" height="723" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:723,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:236777,&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://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.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_!3zT_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 424w, https://substackcdn.com/image/fetch/$s_!3zT_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 848w, https://substackcdn.com/image/fetch/$s_!3zT_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 1272w, https://substackcdn.com/image/fetch/$s_!3zT_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fee19b4-f5c9-42cb-9bfb-486eabb9058b_3724x1850.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 idea behind this method is that for a question, the model generates a group of attempts. Some might solve the problem directly. Some might fix an earlier mistake. Others might give the wrong answer. The training procedure can score each attempt and compare its score with those of the other attempts. Once that&#8217;s done, you can adjust the model to favor attempts that work better than their peers.</p><p>There are two jobs over here.</p><p>One is where you grade an actual attempt. The other is when you estimate what score an attempt might ordinarily get so that the training procedure has something to compare things to.</p><p>Some reinforcement learning methods also train a separate model, known as the critic model, to provide that estimate. GRPO gets its comparison from the group&#8217;s own scores. The R1-Zero model made use of these rules to grade correctness and to check whether the response followed the proper format. This allowed the system to recognize a successful attempt even when nobody had written out the particular route the model took to solve it.</p><p>During training, DeepSeek looked at an intermediate version of the R1-Zero model working on an equation that had square roots. The model squared both sides and began developing a more complicated expression. However, in the middle, it stopped that approach and came back to the original equation to reconsider what it had done. Partway through, it interrupted that approach, returned to the original equation, and reconsidered its steps. The team thought of this as an &#8220;aha moment.&#8221;</p><p>The interesting bit for them was where the decision to go back had come from. The team had given a problem, a place where the model could write the working solution, and a way to score the result. This had left the choice of strategy to the model. Yet at a particular point in the calculation, the model came up with a response that considered one of its own steps worth looking at again.</p><p>You can probably see why this behavior can be so useful over many practice problems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5P_m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5P_m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 424w, https://substackcdn.com/image/fetch/$s_!5P_m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 848w, https://substackcdn.com/image/fetch/$s_!5P_m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 1272w, https://substackcdn.com/image/fetch/$s_!5P_m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!5P_m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png" width="1456" height="863" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:863,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:196844,&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://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.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_!5P_m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 424w, https://substackcdn.com/image/fetch/$s_!5P_m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 848w, https://substackcdn.com/image/fetch/$s_!5P_m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 1272w, https://substackcdn.com/image/fetch/$s_!5P_m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c965d8-ae8d-4ab1-8229-314811913e23_2858x1694.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>An attempt that continues after making an early mistake might carry that mistake all the way to the answer. An attempt that reconsiders the questionable step has a good chance to recover and get a better score. The feedback applies to the attempt as a whole. Therefore, you can also have a lucky guess that also earns credits. However, across many different problems, such a strategy has more advantages.</p><p>This was DeepSeek&#8217;s experiment in going directly from a pretrained model to reinforcement learning. For the released DeepSeek-R1, the team also used examples. R1-Zero sometimes switched languages or produced solutions that were hard to follow. Therefore, the team began R1 with supervised fine-tuning, which meant training on examples of desired responses.</p><h2>When the Model Has Already Done Enough</h2><p>The first form of overthinking is easy to overlook because the user still receives a correct answer.</p><p>However, in a study of reasoning models, researchers showed what can happen when one model was asked to calculate &#8220;2 + 3&#8221;. It arrived at five in its first solution, then continued until its response contained thirteen solutions to the same question. Nearly all of that text appeared after the calculation had already been done correctly.</p><p>Why would a model keep going even when it had the correct answer?</p><p>Think about how an attempt is scored. If you have two responses that use the required format and both end in 5, a checker dealing with correctness can give them the same score. You might have one response that stops after a short calculation. The other response might count objects, reverse the order of addition. Both arrive at the right answer. The score offers little guidance about which response made better use of the user&#8217;s time.</p><p>If you have a check that confirms an answer, it can still be valuable. Let&#8217;s say you calculate the total for an order and then compare the items that were counted with the original order form. Even if you confirm the total, that comparison could have shown that an item was missing. If you simply add the numbers from our own incomplete list a second time, you are much less likely to catch that particular error. What matters is whether the second pass tests something the first one could have missed.</p><p>This shows why knowing when to stop is a separate skill. A user with an answer key can look back and point to the first correct result. However, a model that answers a new question usually has to decide if another check is worth it before it knows how the answer will be judged. On a difficult problem, if the model stops at the first plausible result, it can be quite costly. But on an easy one, the habit of checking again can produce a long wait for an answer, which is unnecessary.</p><h2>How an Extra Step Turns a Right Answer Into a Wrong One</h2><p>The &#8220;2 +3&#8221; example shows the impact of wasted effort. However, you can also run into a different problem when the extra reasoning brings in an incorrect assumption. For example, let&#8217;s say you have a question about the train departure time printed on the timetable. A train is scheduled to leave at 9:00, but it usually leaves 10 minutes late.</p><p>The timetable gives the time as 9:00. Let&#8217;s say that the model identifies that answer immediately, but continues because the point about the delay sounds too deliberate to ignore. It might come to the conclusion that the train will probably leave at 9:10. It may even produce a sensible explanation about the difference between scheduled and actual departures. If it finally answers 9:10, the calculation is correct. But the model has gone from its core task of reporting what the timetable says to trying to predict when the train will leave.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8zKH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8zKH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 424w, https://substackcdn.com/image/fetch/$s_!8zKH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 848w, https://substackcdn.com/image/fetch/$s_!8zKH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 1272w, https://substackcdn.com/image/fetch/$s_!8zKH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8zKH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png" width="1456" height="890" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:890,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139817,&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://blog.bytebytego.com/i/224795946?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.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_!8zKH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 424w, https://substackcdn.com/image/fetch/$s_!8zKH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 848w, https://substackcdn.com/image/fetch/$s_!8zKH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 1272w, https://substackcdn.com/image/fetch/$s_!8zKH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3fa8c3-645e-4922-ade3-72700bc610fe_2306x1410.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>As you can see, the original question is still available to the model. What has changed is the text it can use to form the final answer. Early in the response, simply telling the scheduled time from the timetable is the obvious candidate. Later, the model has also produced a second answer and multiple sentences that try to explain why that time might be important. While each sentence makes sense, the response drifts away from what was intended from the model. To a casual user, the answer might even appear dumb.</p><p>This is also important when looking at the relation between thinking time and accuracy. If longer answers contain more errors, one possibility is that the model wrote longer because those questions were harder to begin with. A better comparison is to give the same model the same questions with different amounts of reasoning capability. On difficult questions, the extra steps may catch mistakes. But on straightforward questions, they may repeat a simple conclusion or end up providing an irrelevant detail that&#8217;s enough to change the answer.</p><p><strong>References:</strong></p><ul><li><p><a href="https://openai.com/index/learning-to-reason-with-llms">Learning to reason with LLMs</a></p></li><li><p><a href="https://arxiv.org/html/2501.12948v1">DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[How Instacart Uses LLMs to Make People Buy More]]></title><description><![CDATA[In this article, we&#8217;ll look at how Instacart used LLMs to build a product search that could accurately understand a user&#8217;s shopping intention.]]></description><link>https://blog.bytebytego.com/p/how-instacart-uses-llms-to-make-people</link><guid isPermaLink="false">https://blog.bytebytego.com/p/how-instacart-uses-llms-to-make-people</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Mon, 16 Nov 2026 16:30:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!LJGZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/workos_111626headline">Your AI agents shouldn&#8217;t have all your permissions (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/workos_111626airlock" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!da2W!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 424w, https://substackcdn.com/image/fetch/$s_!da2W!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 848w, https://substackcdn.com/image/fetch/$s_!da2W!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 1272w, https://substackcdn.com/image/fetch/$s_!da2W!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!da2W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png" width="1292" height="646" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:646,&quot;width&quot;:1292,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:558101,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/workos_111626airlock&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/224794150?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.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_!da2W!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 424w, https://substackcdn.com/image/fetch/$s_!da2W!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 848w, https://substackcdn.com/image/fetch/$s_!da2W!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 1272w, https://substackcdn.com/image/fetch/$s_!da2W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d753d95-4d9a-4de3-aad9-6b87a2235721_1292x646.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 agents run with the full access of whoever triggered them. <a href="https://go.bytebytego.com/workos_111626airlock">WorkOS Airlock</a> is the authorization layer for agentic software. You write policies, and Airlock checks every agent call at runtime, then allows it, denies it or sends it to a person for approval.</p><p>Agents never see credentials. A risky action, like a refund over your limit, goes to a teammate to approve in Slack. Airlock works with coding agents, custom harnesses and any API or MCP server.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/workos_111626cta&quot;,&quot;text&quot;:&quot;Learn more &#8594;&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/workos_111626cta"><span>Learn more &#8594;</span></a></p><div><hr></div><p>When people search for a product on an e-commerce platform, they rarely ask for it using the exact words that are present in the product catalog. For example, users might ask for something like &#8220;bread no gluten&#8221; or &#8220;x-large zip lock&#8221;.</p><p>A good search system is one that is able to look at these phrases and link them to the actual products the user might be interested in. This first step to do so is called query understanding (QU). The job of QU is to take the words the user has typed in a search box and find out useful information about the user&#8217;s shopping intentions.</p><p>In this article, we&#8217;ll look at how Instacart used LLMs to build a product search that could accurately understand a user&#8217;s shopping intention. Here&#8217;s what we&#8217;ll cover:</p><ul><li><p>The problem with Instacart&#8217;s initial approach</p></li><li><p>How a general LLM becomes useful for Instacart</p></li><li><p>How Instacart made sense of the query category</p></li><li><p>How Instacart made sure that something is always suggested to the user</p></li><li><p>Extracting details from the query</p></li><li><p>How to make the query understanding process much faster</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LJGZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LJGZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 424w, https://substackcdn.com/image/fetch/$s_!LJGZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 848w, https://substackcdn.com/image/fetch/$s_!LJGZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 1272w, https://substackcdn.com/image/fetch/$s_!LJGZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!LJGZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png" width="1456" height="747" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:747,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144155,&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://blog.bytebytego.com/i/224794150?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.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_!LJGZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 424w, https://substackcdn.com/image/fetch/$s_!LJGZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 848w, https://substackcdn.com/image/fetch/$s_!LJGZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 1272w, https://substackcdn.com/image/fetch/$s_!LJGZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d1e37b-04ce-4990-8be8-ca949798aab7_4018x2062.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>The Problem With Instacart&#8217;s Initial Approach</h2><p>You can separate product search into 3 broad activities:</p><ul><li><p>First, you have QU, which is meant to understand the user&#8217;s request.</p></li><li><p>Second is retrieval, where you find a set of relevant products.</p></li><li><p>Third, you have the ranking phase in which you decide the order in which each product is shown to the user.</p></li></ul><p>As you can see, information created during the QU phase is the one that guides both retrieval and ranking. For example, let&#8217;s say you have a search query that says &#8220;bread no gluten&#8221;. It refers to bread with a gluten-free attribute. This search phrase gives a very important piece of information to the search setup if you don&#8217;t treat the phrase as three unrelated words.</p><p>At Instacart, the QU phase can produce three types of information. First is the product categories, in which you decide which sections of the catalog are important for answering the query. Second is alternative queries, which deal with other search phrases that might help find suitable products. Third is structured tags. This deals with the parts of the query that might help learn more about the product, its brand, or specific attributes.</p><p>Instacart already had machine learning systems that helped it understand queries. The problem was how to get it to work consistently for the enormous variety of things that people search for.</p><p>One way to solve this problem is to analyze search behaviour. But this behaviour provides imperfect training data. A supervised machine learning model learns from examples that are paired with desired answers. For classifying queries, you might connect a search phrase to the correct product category.</p><p>However, as you might have already noticed, it&#8217;s quite difficult to collect all these labels. Instacart can look at searches, clicks, and final purchases. But those actions don&#8217;t directly reveal whether the system understood the query in a correct manner. For example, you might have a user who searches for bread but ends up buying bananas. Now, this purchase doesn&#8217;t mean that &#8220;bread&#8221; should be classified as a query about fruits. Of course, behaviour can give some nice evidence, but a relation between a query and a purchase decision can be quite noisy.</p><p>You can use human reviewers to provide cleaner labels. But this also needs time and money. Also, rare queries have very little history. For example, the user might make a very specific query such as &#8220;2% reduced-fat ultra-pasteurized chocolate milk&#8221;. If you have a system that learns mostly from historical clicks and purchases, it might not have enough examples to deal with such phrases.</p><p>These uncommon searches are part of the long tail. While each such query may account for little traffic, together they might represent a large collection of customer requirements.</p><p>Broad queries also create a different type of problem. For example, let&#8217;s say you have a search phrase such as &#8220;healthy food&#8221;. It can point to so many categories, and the system has to handle ambiguity rather than force the query into a single narrow interpretation.</p><p>With separate models, you also end up with a lot of maintenance work. Instacart had to maintain different systems for different tasks. For example, they had a category classifier that used a FastText model. The query rewrite system mined patterns from user sessions. Each system needed its own data processing, training, and deployment requirements. This increased maintenance work. And even then, they made inconsistent interpretations of the same query.</p><p>Therefore, the Instacart engineering team wanted something that could improve their QU and also provide a more consistent foundation for taking care of the other responsibilities.</p><h2>How a General LLM Becomes Useful for Instacart</h2><p>A large language model (LLM) starts off with a broad knowledge of language and the general world. This makes it pretty good at making sense of queries it might have never seen before in the historical data.</p><p>For example, an LLM might already know that something like &#8220;Italian parsley&#8221; and &#8220;flat parsley&#8221; refer to the same thing, and &#8220;curly parsley&#8221; can act as a substitute. This is all part of the model&#8217;s general awareness that it got during training, and it doesn&#8217;t need to learn these things from a bunch of examples.</p><p>Of course, general knowledge doesn&#8217;t automatically make the LLM knowledgeable about Instacart&#8217;s product catalog and the behaviour of their customers. To bridge this gap, the Instacart engineering team used the following techniques:</p><p>First, you provide all the relevant information in the prompt to the LLM. This approach is known as context engineering. RAG is the primary method that is used over here. The system pulls in information such as the catalog records and historical patterns and puts that information along with the query.</p><p>To be clear, RAG here means that you try to give the model all the useful business information before asking the model to make a prediction.</p><p>Second, the system validates the model&#8217;s output. Instacart has implemented post-processing guardrails to check how suitable the output is and how compatible it is with their product catalog. You can have a model generate a plausible answer, but it still doesn&#8217;t fit the actual data of the business. Therefore, validation is a separate part of the system.</p><p>In the third technique, they fine-tune smaller models on their own examples. Fine-tuning means additional training that can change the parameters of the model. Instead of giving all the domain guidance using the prompt every single time, the team teaches the model to work on a particular task with high-quality examples.</p><h2>How Instacart Knows What the Query Is About</h2><p>Instacart has organized its catalog using a hierarchy of categories. For example, you have the following path:</p><p>Meat &#8594; Beef &#8594; Beef Ribs &#8594; Short Ribs</p><p>Each step in this category path makes things more specific. If the search system knows the entire path, it can easily identify the relevant part of the catalog.</p><p>The earlier version of the classifier treated these categories more like a flat collection of labels. For example, in the case of &#8220;buttermilk&#8221;, it might predict &#8220;Dairy&#8221; and &#8220;Milk&#8221; separately, where each label came up with a confidence score. While those predictions were also useful, they didn&#8217;t express the full relationship.</p><p>With the new approach, you combine historical evidence with LLM interpretation and also check the relevance of the product.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8qPX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8qPX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 424w, https://substackcdn.com/image/fetch/$s_!8qPX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 848w, https://substackcdn.com/image/fetch/$s_!8qPX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 1272w, https://substackcdn.com/image/fetch/$s_!8qPX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8qPX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png" width="1456" height="873" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:873,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:253135,&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://blog.bytebytego.com/i/224794150?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.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_!8qPX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 424w, https://substackcdn.com/image/fetch/$s_!8qPX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 848w, https://substackcdn.com/image/fetch/$s_!8qPX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 1272w, https://substackcdn.com/image/fetch/$s_!8qPX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3e8b2a-eaec-4b0e-a623-3c1c1858963f_3648x2188.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 this approach, the system first finds the leading categories that are associated with purchases following the query. These categories form the initial set of candidates. The advantage is that this gives the model a starting point linked with Instacart&#8217;s own data. Since typical purchase behaviour can be quite erratic, you need to assess the candidates even more.</p><p>In the next step, you ask the LLM to assess the candidates. The LLM re-ranks the candidate categories using the query and the Instacart context that was given to it. For example, &#8220;buttermilk&#8221; might map to Dairy followed by Milk and then Buttermilk. On the other hand, something like &#8220;vegan roast&#8221; might map to Meat followed by Meat Alternatives.</p><p>As you can see, this is how language understanding and knowledge of the world help understand a query whose wording doesn&#8217;t directly match a category name.</p><p>Next, they check whether the prediction is relevant. After the LLM makes a prediction, a guardrail compares the meaning of the original query with the predicted category path. This part is done using embeddings, which are numerical representations of text. If the query and the category path get a similarity score that falls below a specific threshold, the system throws away that pairing.</p><p>To summarize, the three stages have different responsibilities. Historical data is meant to propose candidates. The LLM&#8217;s job is to interpret them. And at the end, the guardrail filters irrelevant results.</p><h2>How Instacart Makes The Queries Stronger</h2><p>Even if you have a system that understands a query well enough, the original words that make up the query may retrieve very few useful results. This is where query rewriting helps.</p><p>Query rewriting generates alternative phrases that can help the search process find more candidates.</p><p>The older search system at Instacart did this using patterns found in user sessions. But it covered only about 50% of the search traffic. The Instacart engineering team initially tried asking an LLM to generate rewrites using a general prompt. But this didn&#8217;t work as expected because just asking the LLM to rewrite the query doesn&#8217;t tell the LLM what kind of alternative would be useful.</p><p>For example, let&#8217;s say you have the query &#8220;1% milk&#8221;. Rewriting might change the query to &#8220;one percent milk&#8221;. While the meaning stays the same, it does very little to help the user find an alternative product.</p><p>To make things more effective, Instacart separated rewriting into three tasks:</p><ul><li><p>First, they use synonym rewrites that try to express the same request using different wording. &#8220;One percent milk&#8221; illustrates this relationship.</p></li><li><p>Next, you have broader rewrites that attempt to get rid of some specificity. For example, &#8220;milk&#8221; can be a broader rewrite of &#8220;1% milk&#8221;</p></li><li><p>Last, you have substitute rewrites that suggest a different product that might be a good alternative. For example, something like &#8220;2% milk&#8221; can act as a potential substitute.</p></li></ul><p>You might think that these differences are pretty minute, but they change the search approach in different ways. When you broaden a query, you make the constraints less rigid. Making the suggestion of a substitute product changes the requested product. A synonym keeps the intended meaning intact.</p><p>Each type of rewrite gets a dedicated prompt with specific instructions and examples. They also give it reasoning guidance. Instacart then applies a bunch of post-processing checks and semantic filters.</p><p>This approach increased rewrite coverage to over 95%, with more than 90% precision across all three types.</p><h2>Extracting Search Tags from the Query</h2><p>The third task is semantic role labeling (SRL). SRL deals with taking out structured concepts such as the product, brand, and other features from a user&#8217;s shopping query.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!61NI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!61NI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 424w, https://substackcdn.com/image/fetch/$s_!61NI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 848w, https://substackcdn.com/image/fetch/$s_!61NI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 1272w, https://substackcdn.com/image/fetch/$s_!61NI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!61NI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png" width="1456" height="950" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:950,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:160859,&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://blog.bytebytego.com/i/224794150?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.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_!61NI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 424w, https://substackcdn.com/image/fetch/$s_!61NI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 848w, https://substackcdn.com/image/fetch/$s_!61NI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 1272w, https://substackcdn.com/image/fetch/$s_!61NI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9de85e3-e787-4ccd-91ea-21c55cf6c9be_3100x2022.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 example, let&#8217;s say you have a query that says &#8220;2% chocolate milk&#8221;. It contains a product &#8220;milk&#8221;. It also talks about the fat content and flavor. If you represent these concepts explicitly, they become easier to use in the search process.</p><p>Instacart uses these tags for retrieval, ranking, advertising, and filters. The main challenge is to find the accurate tags without making every search slow and costly.</p><p>One way to do so is by processing frequent queries in advance. Search traffic has an uneven distribution. You might have a relatively small collection of frequent queries that take up a big share of the traffic. These are known as head queries. Beyond them, you can have a much larger collection of uncommon or previously unseen queries.</p><p>For these types of common queries, Instacart can generate tags ahead of time and save the results in a cache. Subsequent searches can use those tags immediately.</p><p>However, you cannot have the system precompute tags for every possible phrase. New combinations keep coming up, so caching needs a companion process that can deal with queries with no pre-existing result.</p><p>To handle this, Instacart used an offline teacher pipeline and a smaller model that runs at the time of live searches. The job of this offline teacher is to create high-quality examples. Here, &#8220;offline&#8221; means that this work takes place outside the live request flow that the user is waiting for. Due to this, the pipeline has more freedom to use a powerful model and richer context information.</p><p>For a common query, it can find relevant information from internal systems, provide that information to the LLM, generate tags, and validate the tags against the catalog. For example, consider the search phrase &#8220;verdant machine&#8221;. Without business context, an LLM might think of this phrase as talking about machinery. However, Instacart&#8217;s internal evidence connects this query with a smoothie brand called MuchPure and with other smoothie juice categories.</p><p>The output validation serves two purposes. It helps populate the cache for common queries. Also, it becomes part of a training dataset for the smaller model.</p><p>This is why the large-model pipeline is called a teacher. The outputs generated by this model become examples from which another model learns.</p><p>When a live query comes in, the system checks whether tags are already cached. If they are, it returns them. If they are missing, the query goes to the smaller, fine-tuned model.</p><p>The student has already been trained on examples generated by the teacher pipeline. It learns how queries should map to structured tags, including patterns present in Instacart&#8217;s domain context.</p><h2>Teaching the Smaller Model</h2><p>For its real-time SRL system, Instacart fine-tuned Llama-3 8B. This is a model with approximately 8 billion parameters.</p><p>For reference, parameters are the numerical values a model learns during training. Although 8 billion is still a pretty big number, this model is a lot smaller than the larger frontier model used by the teacher pipeline.</p><p>Instacart trained it using LoRA (Low-Rank Adaptation). In LoRA, you make a model learn a relatively small set of additional parameters while keeping the original model weights fixed during fine-tuning. This brings down the amount of training work you need to adapt the model.</p><p>The training examples all depend on the offline pipeline.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3Y_4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3Y_4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 424w, https://substackcdn.com/image/fetch/$s_!3Y_4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 848w, https://substackcdn.com/image/fetch/$s_!3Y_4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 1272w, https://substackcdn.com/image/fetch/$s_!3Y_4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3Y_4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png" width="1456" height="856" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:856,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:299742,&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://blog.bytebytego.com/i/224794150?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.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_!3Y_4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 424w, https://substackcdn.com/image/fetch/$s_!3Y_4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 848w, https://substackcdn.com/image/fetch/$s_!3Y_4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 1272w, https://substackcdn.com/image/fetch/$s_!3Y_4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5133354b-b5d4-4b37-bf64-ae374e6353a2_3648x2144.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 process is a form of knowledge distillation. In this, you have a smaller model learning from outputs generated by a more capable teacher model. Based on their analysis, they found that the student generated fewer incorrect tags. But it also missed slightly more correct tags.</p><h2>How Instacart Made the Model Fast For Live Search</h2><p>For a high-traffic website like Instacart, you want the search system to respond quickly enough so that users don&#8217;t face long delays.</p><p>The Instacart engineering team targeted model-serving latency in the low 100s of milliseconds. Its initial setup took nearly 700 milliseconds on an A100 GPU.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z5Jf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z5Jf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 424w, https://substackcdn.com/image/fetch/$s_!z5Jf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 848w, https://substackcdn.com/image/fetch/$s_!z5Jf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!z5Jf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!z5Jf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png" width="1456" height="817" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:817,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71515,&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://blog.bytebytego.com/i/224794150?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.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_!z5Jf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 424w, https://substackcdn.com/image/fetch/$s_!z5Jf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 848w, https://substackcdn.com/image/fetch/$s_!z5Jf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!z5Jf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd35391-e9c3-4913-9983-7a3b0d79cc4a_3140x1762.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://tech.instacart.com/building-the-intent-engine-how-instacart-is-revamping-query-understanding-with-llms-3ac8051ae7ac">Instacart Tech Blog</a></figcaption></figure></div><p>Several changes made this possible.</p><p>One of them was merging the LoRA adapter into the base model. After training, the LoRA adjustments can be combined with the base model&#8217;s weights. This prevents the need to keep the adapter as a separate computation during inference. According to the Instacart engineering team, this adapter merge brought down latency by about 30%. After they combined this with an upgrade to H100 GPUs, they were able to achieve the 300-millisecond target.</p><p>Therefore, the total improvement came from both a change in how the model was served and faster hardware.</p><p>The team also tested FP8 quantization, which uses lower-precision numerical representations for model computation. This brought down the latency by another 10%, but recall declined slightly. Instacart chose to deploy the unquantized model because they wanted to give more priority to higher-quality results.</p><p>You can think of this as an engineering trade-off. Though a faster model was available, the team made this choice.</p><p>They also reduced how often live inference is needed. Caching had a large effect on the overall cost. According to their estimate, only 2% of queries required real-time model inference.</p><p>Therefore, the smaller model handled a limited amount of traffic, while cached tags served the common cases. Instacart also used GPU autoscaling to run fewer GPUs during quieter periods.</p><h2>Conclusion</h2><p>Instacart made an evaluation of the real-time SRL system through A/B testing. For the tail queries discussed we talked about earlier, it reported a 6% reduction in average scroll depth. You can interpret this as users finding the right items more quickly.</p><p>The system was also dealing with millions of cold-start queries each week. These were the queries for which the system didn&#8217;t have query-specific history or a precomputed answer. There was also a 50% reduction in user complaints related to poor search results for tail queries, with only a marginal latency increase.</p><p>As you can see, these stats connect the problems to the solutions. Better classification, rewrites, and tags help shoppers find relevant products more easily. As part of further developments, Instacart aims to understand a shopper&#8217;s broader journey. The current design lays a strong foundation for that direction.</p><p><strong>References:</strong></p><ul><li><p><a href="https://tech.instacart.com/building-the-intent-engine-how-instacart-is-revamping-query-understanding-with-llms-3ac8051ae7ac">Building the Intent Engine</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[LAST CALL FOR ENROLLMENT: AI Engineering Fundamentals]]></title><description><![CDATA[decision time]]></description><link>https://blog.bytebytego.com/p/last-call-for-enrollment-ai-engineering</link><guid isPermaLink="false">https://blog.bytebytego.com/p/last-call-for-enrollment-ai-engineering</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Sun, 15 Nov 2026 22:15:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tUuE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>One final reminder: the <strong>AI Engineering Fundamentals</strong> cohort starts tomorrow, <strong>Monday, November 16, 5 PM PT</strong>.</p><p>Enrollment closes <strong>in less than 24 hours</strong>. <strong>Today is your last day to enroll!</strong> </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://live.bytebytego.com/courses/ai-engineering?promotionCode=INSIDER20&amp;utm_source=substack&amp;utm_medium=email&amp;utm_campaign=ai-eng-nov&quot;,&quot;text&quot;:&quot;Reserve your spot now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://live.bytebytego.com/courses/ai-engineering?promotionCode=INSIDER20&amp;utm_source=substack&amp;utm_medium=email&amp;utm_campaign=ai-eng-nov"><span>Reserve your spot now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://live.bytebytego.com/courses/ai-engineering?promotionCode=INSIDER20&amp;utm_source=substack&amp;utm_medium=email&amp;utm_campaign=ai-eng-nov" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tUuE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 424w, https://substackcdn.com/image/fetch/$s_!tUuE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 848w, https://substackcdn.com/image/fetch/$s_!tUuE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 1272w, https://substackcdn.com/image/fetch/$s_!tUuE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tUuE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png" width="1456" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:352845,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://live.bytebytego.com/courses/ai-engineering?promotionCode=INSIDER20&amp;utm_source=substack&amp;utm_medium=email&amp;utm_campaign=ai-eng-nov&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/225097923?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.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_!tUuE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 424w, https://substackcdn.com/image/fetch/$s_!tUuE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 848w, https://substackcdn.com/image/fetch/$s_!tUuE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 1272w, https://substackcdn.com/image/fetch/$s_!tUuE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3e11979-d4dd-48cb-b569-87c8a491a80f_2216x730.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Join <strong>Ali Aminian, Google engineer, bestselling AI author, and Stanford course contributor</strong>, for live, hands-on sessions where you&#8217;ll learn how to:</p><ul><li><p>Understand how LLMs work and choose the right models.</p></li></ul><ul><li><p>Build RAG pipelines that retrieve information from your own data and use it to generate answers.</p></li></ul><ul><li><p>Create AI agents that use tools, search the web, and complete multi-step tasks.</p></li></ul><ul><li><p>Build AI apps using reasoning models and advanced prompting techniques.</p></li></ul><ul><li><p>Put your skills into practice by building <strong>four real-world AI projects in four weeks</strong>.</p></li></ul><p>If you&#8217;ve been thinking about building your AI engineering skills to future-proof your career, now&#8217;s the time.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://live.bytebytego.com/courses/ai-engineering?promotionCode=INSIDER20&amp;utm_source=substack&amp;utm_medium=email&amp;utm_campaign=ai-eng-nov&quot;,&quot;text&quot;:&quot;Reserve your spot now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://live.bytebytego.com/courses/ai-engineering?promotionCode=INSIDER20&amp;utm_source=substack&amp;utm_medium=email&amp;utm_campaign=ai-eng-nov"><span>Reserve your spot now</span></a></p><p>Hope to see you inside!</p><p>The ByteByteGo Team</p>]]></content:encoded></item><item><title><![CDATA[EP233: Kubernetes Explained for Busy Engineers]]></title><description><![CDATA[Kubernetes is an orchestration platform that manages the deployment and maintenance of containerized applications, particularly on multiple machines.]]></description><link>https://blog.bytebytego.com/p/ep233-kubernetes-explained-for-busy</link><guid isPermaLink="false">https://blog.bytebytego.com/p/ep233-kubernetes-explained-for-busy</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Sat, 14 Nov 2026 16:30:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!sEO7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/sentry_111426">Workshop: How Anthropic Traces Agents with OpenTelemetry and Sentry (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/sentry_111426" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GOuZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!GOuZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!GOuZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!GOuZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GOuZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126436,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/sentry_111426&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/224653050?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.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_!GOuZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!GOuZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!GOuZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!GOuZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39632276-e0b0-4271-aeee-aec850058a10_1200x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Where did your agent&#8217;s tokens go?</p><p>CJ Avilla from Anthropic sent his Claude Platform OpenTelemetry data to Sentry. It turned up an old project that was still burning tokens.</p><p>Every retry costs tokens, and the cause can be a slow API or database, not the model. In this live workshop, you&#8217;ll see:</p><ul><li><p>How to send Claude Platform OpenTelemetry (OTel) data to Sentry</p></li><li><p>A Claude agent&#8217;s failed tool calls, retries, and final success in one trace</p></li><li><p>Whether the fix belongs in the prompt, the tool, or the service behind it</p></li></ul><p>Save your spot for November 17 at 10am PT.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/sentry_111426&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/sentry_111426"><span>Register now</span></a></p><div><hr></div><p>This week&#8217;s system design refresher:</p><ul><li><p>Kubernetes Explained for Busy Engineers</p></li><li><p>Single Agent vs. Multi-Agent Architecture</p></li><li><p>The Testing Pyramid</p></li><li><p>How LLMs Use AI Agents with Deep Research</p></li><li><p>Common types of AI Agents guardrails on production</p></li></ul><div><hr></div><h2>Kubernetes Explained for Busy Engineers</h2><p>Kubernetes is an orchestration platform that manages the deployment and maintenance of containerized applications, particularly on multiple machines. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sEO7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sEO7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 424w, https://substackcdn.com/image/fetch/$s_!sEO7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 848w, https://substackcdn.com/image/fetch/$s_!sEO7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!sEO7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!sEO7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png" width="1456" height="1758" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1758,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!sEO7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 424w, https://substackcdn.com/image/fetch/$s_!sEO7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 848w, https://substackcdn.com/image/fetch/$s_!sEO7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!sEO7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fe509fa-78eb-4156-abe0-ff73eaf356a1_2486x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Let&#8217;s see how kubernetes creates and keeps an application running. </p><ul><li><p>You describe the desired state of your application in a deployment.yaml file. </p></li><li><p>The API server validates the deployment and stores this desired state in etcd. The etcd is a persistent database that stores the Kubernetes resources, like the number of replicas, existing pods and nodes, and their assignments.  </p></li><li><p>The controller manager job is to run controllers and ensure that the desired state matches the actual state of the Kubernetes cluster. For example, when a Deployment requests four replicas, the controllers ensure that four Pods are created and maintained. </p></li><li><p>The scheduler decides where each pod is supposed to run. It assigns the pods to the worker nodes based on the available CPU and memory resources, placement rules, or any other constraints. </p></li><li><p>The worker nodes are the ones that run the assigned pods. Each worker node contains a container runtime that downloads the image and actually runs the container. The kubelet keeps track of the node-to-pod assignment and ensures they run properly.</p></li><li><p>Once the pods are running, the Kubernetes Service provides a stable endpoint to the pods. </p></li></ul><p>The Ingress or Gateway then exposes that Service to the external users.</p><div><hr></div><h2>Single Agent vs. Multi-Agent Architecture</h2><p>Some tasks need a single agent. Others need a whole team. Knowing the difference is the skill.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z5zI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z5zI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!Z5zI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!Z5zI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!Z5zI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z5zI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:&quot;Image&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!Z5zI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!Z5zI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!Z5zI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!Z5zI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Single-agent system: One reasoning LLM that plans, picks a tool, and loops on its own until the task is done. Use a single agent when:</p><ul><li><p>the task is a clear, linear sequence</p></li><li><p>one agent can hold the whole problem in its head</p></li><li><p>you want something simple to build and easy to debug</p></li></ul><p>Multi-agent system: An orchestrator that splits a task into subtasks and routes each one to a specialized agent. Use multi-agent when:</p><ul><li><p>subtasks can run in parallel</p></li><li><p>one agent writes and another independently verifies the work</p></li><li><p>the problem is too big for one agent to coordinate alone</p></li></ul><p>Single agents are cheaper and easier to build, but they hit a ceiling on complex work.</p><p>Multi-agent systems are more capable and more reliable, but they add coordination cost.</p><p>Start with a single agent. Move to multi-agent only when context or reliability become the bottleneck.</p><p>Over to you: Are you running single-agent or multi-agent systems in production?</p><div><hr></div><h2>The Testing Pyramid</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_6cl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_6cl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_6cl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_6cl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_6cl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!_6cl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg" width="1456" height="1644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1644,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:&quot;Image&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!_6cl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_6cl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_6cl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_6cl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea738d9d-1ae5-4a26-9a50-79ec7720fd80_2360x2664.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Testing is the backbone of reliable software. The Testing Pyramid is a widely accepted strategy for structuring tests into three key layers:</p><ul><li><p>Unit Tests: These are the foundation of the pyramid. Unit tests are fast, isolated, and low-cost to write and maintain. They test individual functions, methods, or components.</p></li><li><p>Integration Tests: These tests validate interactions between components, such as APIs, databases, and external services. They are slower than unit tests and require more setup.</p></li><li><p>E2E Tests: These simulate real user flows from start to finish across the full system. They are expensive to write and maintain and tend to be slow to execute.</p></li></ul><p>As you go up the pyramid, the cost of test development, execution, and maintenance increases.</p><p>Over to you: Which layer do you find most valuable in your testing strategy, and why?</p><div><hr></div><h2>How LLMs Use AI Agents with Deep Research</h2><p>When you ask an LLM such as Claude, ChatGPT, or Gemini to do deep research on a complex topic, it&#8217;s not just one model doing all the work. It&#8217;s a coordinated system of specialized AI agents.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gm3t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gm3t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 424w, https://substackcdn.com/image/fetch/$s_!gm3t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 848w, https://substackcdn.com/image/fetch/$s_!gm3t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 1272w, https://substackcdn.com/image/fetch/$s_!gm3t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gm3t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png" width="1456" height="1742" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1742,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:442062,&quot;alt&quot;:&quot;&quot;,&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://blog.bytebytego.com/i/206406404?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!gm3t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 424w, https://substackcdn.com/image/fetch/$s_!gm3t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 848w, https://substackcdn.com/image/fetch/$s_!gm3t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 1272w, https://substackcdn.com/image/fetch/$s_!gm3t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb755ecbd-6bc9-4a06-8d35-7d59a24d9170_2508x3000.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 style="text-align: justify;">Here&#8217;s how it works:</p><p style="text-align: justify;">Step 1: Understanding The Question and Making a Plan</p><p style="text-align: justify;">It all starts with the query, something like &#8220;Analyze the competitive landscape of AI agents in 2026. The system doesn&#8217;t just dive in blindly. First, it may ask clarifying questions to understand exactly what is needed. Then, it generates a plan and breaks the big question down into smaller and manageable tasks.</p><p style="text-align: justify;">Step 2: Sub-Agents Get to Work</p><p style="text-align: justify;">Each small task gets assigned to a sub-agent, which is basically a mini AI worker with a specific job. For example, one sub-agent might be tasked with finding the latest Nvidia earnings. It figures out which tools to use, such as searching the web, browsing a specific page, or even run code to analyze data. All of this happens through a secure layer of APIs and services that connect the AI to the outside world.</p><p style="text-align: justify;">Step 3: Putting it All Together</p><p style="text-align: justify;">Once all the sub-agents finish their tasks, a Synthesizer Agent takes over. It aggregates everything, identifies key themes, plans an outline, and removes any redundant or duplicate information. At the same time, a Citation Agent makes sure every claim is linked back to its source and properly formatted. The end result is a polished, well-cited final output ready for use.</p><p style="text-align: justify;">Over to you: Have you tried deep research in any LLM?</p><div><hr></div><h2>Common types of AI Agents guardrails on production</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mxFP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mxFP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mxFP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mxFP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mxFP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!mxFP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:&quot;Image&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!mxFP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mxFP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mxFP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mxFP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9af7cba-69d4-4d18-8705-7ce91e73c983_2484x3002.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><ul><li><p>Input Screening: Every user request is scanned for prompt injection, sensitive data, and off-scope topics before the model sees it. Unsafe inputs return a fallback message.</p></li><li><p>Context Verification: Every user request is scanned for prompt injection, sensitive data, and off-scope topics before the model sees it. Unsafe inputs return a fallback message.</p></li><li><p>Response Generation: The LLM reasons only over verified context.</p></li><li><p>Output Validation: Every response is checked for groundedness, format, and safety before it leaves the system. Failures trigger up to two retries, then a safe fallback.</p></li><li><p>Operational Controls: A final layer enforces limits, logs every call, and routes low-confidence or high-risk actions to humans.</p></li></ul><p>Reliable agents aren&#8217;t built on better prompts. They&#8217;re built on the guardrails wrapped around them.</p><p>Over to you: Which guardrail layer catches the most issues in your setup?</p>]]></content:encoded></item><item><title><![CDATA[Free Live Masterclass: Building AI Agents That Work in the Real World]]></title><description><![CDATA[An agent needs context to make decisions, tools to take action, guardrails to stay within bounds, and checks to verify the results.]]></description><link>https://blog.bytebytego.com/p/free-live-masterclass-building-ai</link><guid isPermaLink="false">https://blog.bytebytego.com/p/free-live-masterclass-building-ai</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Fri, 13 Nov 2026 17:04:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ysNu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An agent needs context to make decisions, tools to take action, guardrails to stay within bounds, and checks to verify the results.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://live.bytebytego.com/masterclasses/build-ai-agents" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ysNu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 424w, https://substackcdn.com/image/fetch/$s_!ysNu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 848w, https://substackcdn.com/image/fetch/$s_!ysNu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 1272w, https://substackcdn.com/image/fetch/$s_!ysNu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ysNu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png" width="1456" height="1984" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1984,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:356731,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://live.bytebytego.com/masterclasses/build-ai-agents&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/224779339?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.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_!ysNu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 424w, https://substackcdn.com/image/fetch/$s_!ysNu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 848w, https://substackcdn.com/image/fetch/$s_!ysNu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 1272w, https://substackcdn.com/image/fetch/$s_!ysNu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e2a6fd-938f-49d4-bc12-52b8f9127dcb_2484x3384.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>How do these pieces fit together?</p><p>Join ByteByteGo&#8217;s FREE live masterclass: &#8220;Don&#8217;t Build AI Agents Without Learning These Techniques.&#8221;</p><p>&#128197; Sunday, Nov 15</p><p>&#128347; 12 PM PT &#183; 1 hour</p><p>&#128187; Live on Zoom</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://live.bytebytego.com/masterclasses/build-ai-agents&quot;,&quot;text&quot;:&quot;Register for free&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://live.bytebytego.com/masterclasses/build-ai-agents"><span>Register for free</span></a></p>]]></content:encoded></item><item><title><![CDATA[Top Types of Hidden Coupling and How to Deal With Them]]></title><description><![CDATA[When you create an architecture diagram, you usually try to show the services, databases, queues, and the connections between these different components.]]></description><link>https://blog.bytebytego.com/p/top-types-of-hidden-coupling-and</link><guid isPermaLink="false">https://blog.bytebytego.com/p/top-types-of-hidden-coupling-and</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Thu, 12 Nov 2026 16:30:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eI1N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you create an architecture diagram, you usually try to show the services, databases, queues, and the connections between these different components. With the help of these diagrams, developers can understand how a request goes through the system and how the data flows. We also get to know which components depend on other components.</p><p>However, these diagrams cannot show all the things that a component might depend on. For example, let&#8217;s say you have two services with separate code and API endpoints. At first glance, you might think that these services are independent. But imagine that whenever you change one service, you need to make a change to the other service as well. Or maybe both of these services talk to the same database whose capacity can be consumed by either service. Perhaps both of them rely on a common logging system.</p><p>You can think of these dependencies as hidden forms of coupling. If not handled properly, hidden coupling can have a big impact on the health of your system. Also, it can affect how you change things in your system, or how deployments are done. Or how recovery happens. In this article, we&#8217;ll look at the various forms of hidden coupling and how you can deal with them. Here&#8217;s what we will cover:</p><ul><li><p>The various dimensions of coupling</p></li><li><p>Temporal coupling</p></li><li><p>Semantic coupling</p></li><li><p>Deployment coupling</p></li><li><p>Shared schemas and libraries</p></li><li><p>Observability coupling</p></li><li><p>Shared incidents</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_!eI1N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eI1N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!eI1N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!eI1N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!eI1N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eI1N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png" width="1456" height="1686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:629282,&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://blog.bytebytego.com/i/224574025?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.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_!eI1N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!eI1N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!eI1N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!eI1N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5222d10d-a1c0-40fc-90a3-be059b555fa4_2650x3068.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>The Dimensions of Hidden Coupling</h2>
      <p>
          <a href="https://blog.bytebytego.com/p/top-types-of-hidden-coupling-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[LAST CALL FOR ENROLLMENT: Build Production Grade AI Systems]]></title><description><![CDATA[Enrollment closes in 24 hours for Build Production Grade AI Systems. We kick off tomorrow, November 12, at 5pm PT.]]></description><link>https://blog.bytebytego.com/p/last-call-for-enrollment-build-production</link><guid isPermaLink="false">https://blog.bytebytego.com/p/last-call-for-enrollment-build-production</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Wed, 11 Nov 2026 19:58:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!DeRD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Enrollment closes in 24 hours for <strong><a href="https://go.bytebytego.com/prodgrade-c1-substack">Build Production Grade AI Systems</a></strong>. We kick off tomorrow, <strong>November 12, at 5pm PT</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/prodgrade-c1-substack" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DeRD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 424w, https://substackcdn.com/image/fetch/$s_!DeRD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 848w, https://substackcdn.com/image/fetch/$s_!DeRD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 1272w, https://substackcdn.com/image/fetch/$s_!DeRD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DeRD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png" width="1456" height="585" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/be267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:585,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://go.bytebytego.com/prodgrade-c1-substack&quot;,&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="" srcset="https://substackcdn.com/image/fetch/$s_!DeRD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 424w, https://substackcdn.com/image/fetch/$s_!DeRD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 848w, https://substackcdn.com/image/fetch/$s_!DeRD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 1272w, https://substackcdn.com/image/fetch/$s_!DeRD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe267a57-9f73-4b33-be3d-e7d8066374d8_1966x790.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/prodgrade-c1-substack&quot;,&quot;text&quot;:&quot;Reserve Your Spot Now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/prodgrade-c1-substack"><span>Reserve Your Spot Now</span></a></p><p>Join <strong>Tanya Roosta, Director of AI at AMD and UC Berkeley PhD</strong>, for live, hands-on sessions covering how to:</p><ul><li><p>Turn prototypes into deployable AI services.</p></li><li><p>Build RAG pipelines using company documents.</p></li><li><p>Reduce inference latency and costs.</p></li><li><p>Evaluate outputs and monitor quality in production.</p></li><li><p>Add security controls and scale with confidence.</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/prodgrade-c1-substack&quot;,&quot;text&quot;:&quot;Reserve Your Spot Now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://go.bytebytego.com/prodgrade-c1-substack"><span>Reserve Your Spot Now</span></a></p>]]></content:encoded></item><item><title><![CDATA[The Roundup by ByteByteGo]]></title><description><![CDATA[The Roundup covers insights and trends from the world of software development.]]></description><link>https://blog.bytebytego.com/p/the-roundup-by-bytebytego</link><guid isPermaLink="false">https://blog.bytebytego.com/p/the-roundup-by-bytebytego</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Wed, 11 Nov 2026 16:30:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0IvT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e2655b0-5e24-415a-a8c7-5b99df35f053_2048x1166.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/railway_111126">The all-in-one intelligent cloud (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/railway_111126" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!72ag!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 424w, https://substackcdn.com/image/fetch/$s_!72ag!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 848w, https://substackcdn.com/image/fetch/$s_!72ag!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 1272w, https://substackcdn.com/image/fetch/$s_!72ag!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!72ag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png" width="1100" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://go.bytebytego.com/railway_111126&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!72ag!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 424w, https://substackcdn.com/image/fetch/$s_!72ag!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 848w, https://substackcdn.com/image/fetch/$s_!72ag!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 1272w, https://substackcdn.com/image/fetch/$s_!72ag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68923fd4-5934-4294-81bf-785a72e4a427_1100x578.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Writing code is fast, shipping it is still hard. Railway&#8217;s push-button compute, storage, and networking is built for both small and hyperscale software.</p><p>Humans and agents alike operate on one vertically integrated system on our own hardware. Get superior speed, better economics, and a lot more calm.</p><p>Sign up with the link below for free cloud credits and let your agents cook.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/railway_111126&quot;,&quot;text&quot;:&quot;Deploy now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/railway_111126"><span>Deploy now</span></a></p><div><hr></div><p>The Roundup covers insights and trends from the world of software development.</p><p>Today, we&#8217;ll cover the following topics:</p><ul><li><p>More and more Agents are writing the 1st draft of most new code. According to GitHub, more than 40% of PRs in September have originated with an agent doing the work.</p></li><li><p>Anthropic has gone as far as replacing Git to keep up with a constant stream of changes.</p></li><li><p>Anthropic&#8217;s S1 filing gives an inside look at the real worth of AI coding.</p></li><li><p>Beyond AI, the very foundation of the World Wide Web has had a pretty rough time when it comes to security. PHP had to ship emergency fixes for two critical remote-code-execution bugs that attackers were already exploiting.</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. Please comment if you notice any inaccuracies.</em></p><h2>1 - Agents now open 40% of PRs. The bottleneck in software development is shifting</h2><p>Git was designed in 2005 for the Linux kernel. At that time, you had 1000s of human developers. Each of them committed code a few times a day. Patches were swapped over email. For a couple of decades, these things were the normal way of doing stuff because writing code was a slow exercise.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XXSi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XXSi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 424w, https://substackcdn.com/image/fetch/$s_!XXSi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 848w, https://substackcdn.com/image/fetch/$s_!XXSi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 1272w, https://substackcdn.com/image/fetch/$s_!XXSi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!XXSi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png" width="1456" height="746" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:746,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92573,&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://blog.bytebytego.com/i/223804969?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.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_!XXSi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 424w, https://substackcdn.com/image/fetch/$s_!XXSi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 848w, https://substackcdn.com/image/fetch/$s_!XXSi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 1272w, https://substackcdn.com/image/fetch/$s_!XXSi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda59e4a2-8124-439f-8785-ebe9e0bcff80_2720x1394.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 month, two data points have turned up that show that these norms are changing. GitHub&#8217;s<a href="https://github.blog/news-insights/octoverse/octoverse-commits-pushes-reach-new-highs-in-2026-as-developers-build-with-agents/"> Octoverse 2026</a> reports that more than 40% of pull requests in September started as a first draft using agents. This is up from 17% in March. For perspective, this comes to around 110 million PRs in a single month that have been started by agents.</p><p>Also, Anthropic<a href="https://www.anthropic.com/engineering/redesigning-source-control"> recently released an </a><a href="https://www.anthropic.com/research/redesigning-source-control">article</a><a href="https://www.anthropic.com/engineering/redesigning-source-control"> talking about how they replaced Git in its monorepo with an in-house system known as Scion. </a>Daily merges in Scion grew from about 2500 in May to more than 30000 in September. A team of 7 developers moved the whole monorepo off Git in five months. The team says that the new setup uses 200X less CPU and memory than the Git mirror fleet it replaced.</p><p>Of course, there are still some questions that numbers might not answer adequately.</p><p>First, who is reviewing 110 million PRs a month? Octoverse says 90% of agent-involved PRs were merged within 2 weeks. You can think of faster merging as a sign of better code. But it could also mean that reviews are not good enough.</p><p>Second, how is GitHub even able to find out if something has been started by an agent? You can also have agents that commit stuff using a human&#8217;s account without any trace of their real identity. So it&#8217;s possible that the true share of agent work is even higher.</p><p>The third question is about Anthropic&#8217;s move to Scion. Of those 30000 daily merges, how many were later reverted? Throughput without a defect rate can&#8217;t give a complete picture.</p><p>My take is that building your own version control tool used to be a sign of a huge company because doing so required a ton of resources and bandwidth. For example, Google built Piper, and Meta built Sapling, for tens of thousands of engineers.</p><p>Anthropic solved that scale problem with a fraction of the people. They were able to do so because agents did all the coding. This is where the change has happened. Generating code is now the relatively cheaper part of software engineering. The scarce resources are time for human code review, CI capacity, and merge rate. I expect the next wave of developer tooling to be about verifying code and not writing it because that&#8217;s where the bottleneck is shifting.</p><div><hr></div><h2><a href="https://go.bytebytego.com/redis_111126">Build AI agents that work in production on day one (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/redis_111126" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QQeV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!QQeV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!QQeV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!QQeV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QQeV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png" width="1080" height="1080" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:112847,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/redis_111126&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/224204383?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!QQeV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!QQeV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!QQeV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!QQeV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2201827-1355-4cec-99dc-b1599b14c8f3_1080x1080.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Getting an agent to work in a perfect demo environment is easy. Keeping it working in the messy real world is where things get&#8230; <em>interesting</em>.</p><p> Get a live technical demo of Redis Iris, the unified, real-time context engine. This free session explores six capabilities that keep your agents resilient at scale.What you&#8217;ll learn:</p><ul><li><p>Give agents relevant context and memory</p></li><li><p>Route requests by intent with reusable playbooks</p></li><li><p>Set up a single context entry point</p></li><li><p>Govern what agents remember and forget</p></li><li><p>Trace failures to their source with less custom glue</p></li></ul><p>Come build agents with the context, memory, and messaging they need to stay accurate, accountable, and efficient in prod at scale.</p><p>Join live November 12 at 9 AM PT.<a href="https://go.bytebytego.com/redis_111126"> </a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/redis_111126&quot;,&quot;text&quot;:&quot;Register now &#8594;&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://go.bytebytego.com/redis_111126"><span>Register now &#8594;</span></a></p><div><hr></div><h2>2 - GitHub Universe: Copilot now picks the model, and Enterprise moves to pay-per-use</h2><p>Until now, using an AI coding tool meant you had to choose a model. For example, you might select Claude for one task, GPT for another, and Gemini for something else. With the greater adoption of a model router, you can get rid of this choice. The router looks at a task and decides which model (or which mix of models) should handle each step.</p><p>At<a href="https://github.blog/news-insights/company-news/github-universe-2026-evolving-every-layer-of-the-stack/"> GitHub Universe</a>, GitHub made its router,<a href="https://docs.github.com/copilot/concepts/models/copilot-fusion"> Copilot Fusion</a>, generally available. GitHub says that Fusion Max scored within two points of Claude Opus 5.5 Max on the Artificial Analysis Coding Agent Index, at about half the cost and 40% less time per task. GitHub also shipped Copilot projects, which run agents across multiple repos in parallel.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J4Vp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J4Vp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 424w, https://substackcdn.com/image/fetch/$s_!J4Vp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 848w, https://substackcdn.com/image/fetch/$s_!J4Vp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 1272w, https://substackcdn.com/image/fetch/$s_!J4Vp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!J4Vp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png" width="1456" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101454,&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://blog.bytebytego.com/i/223804969?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.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_!J4Vp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 424w, https://substackcdn.com/image/fetch/$s_!J4Vp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 848w, https://substackcdn.com/image/fetch/$s_!J4Vp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 1272w, https://substackcdn.com/image/fetch/$s_!J4Vp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e182822-e028-4bb1-bfe1-9609b3fa488c_2782x1470.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Cloud agent sessions can now go between your phone, VS Code, the CLI, and the web. So developers can basically handle their work on any device. Also, GitHub Enterprise customers can use every Copilot feature without any separate subscription. They only need to pay for the AI credits that they consume.</p><p>Now, this development opens some interesting thoughts. Earlier, the choice of the model was with the developer. But now it&#8217;s decided by another process.</p><p>Can you now see which model handled which part of your code? Many teams have rules about where code is allowed to go. But that might be decided by a router silently.</p><p>In my view, this is pretty similar to the cloud adoption story repeating itself from years ago. For example, AWS moved organizations from owning servers to simply paying for usage. With seat-based licensing, AI spend became predictable and difficult to optimize. With usage-based billing, you make it variable. But agents that might run for hours can make things quite spiky. And hence, teams need to be a lot more thoughtful in building AI workflows.</p><p>Strategically, Fusion aims to make GitHub a model-neutral layer above the labs. This turns your models into interchangeable parts that sit behind a router. In a way, this might be good for buyers, but it might also be a little uncomfortable for any AI lab that counted on their model being the default choice. It also raises the pressure on GitHub&#8217;s reliability because a platform that runs your agents has to always stay up.</p><h2>3 - Anthropic&#8217;s S-1: The first audited look at the worth of AI coding</h2><p>An S-1 is the document a US company has to file before it can get listed on the stock market. Unlike a funding announcement, it contains audited financials and a long list of things that might go wrong. This is quite interesting because till now, the economics of AI coding tools were mostly guesswork based on leaks. This filing helps replace some of the guesswork with real numbers.</p><p>Anthropic <a href="https://www.anthropic.com/news/s1-sec">filed</a> its S-1 on October 26 under the planned ticker &#8220;ANT&#8221;. Revenue for H1 2026 was $16.3B, up from $1.2B a year earlier. It has 14K+ enterprise customers, and about 250 of them are spending $10M+ a year. Also, trading could begin as soon as November. There are reports of an operating profit in Q2 and 900% net revenue retention: existing customers spent nine times more in Q3 2026 than in Q3 2025.</p><p>Recently, Anthropic also shipped<a href="https://techcrunch.com/2026/10/28/anthropic-just-launched-tools-to-show-companies-what-their-ai-spending-is-buying"> reporting tools</a> that show customers what their token spend is giving them. They also provided pooled team budgets.</p><p>There were also some important disclosures. Four models were able to reach external systems during 3rd-party security testing because a misconfiguration left access to the internet open. Anthropic also seemingly delayed pre-training a new model by more than a month to strengthen protection of its model weights.</p><p>A key question is about how much of that 9X growth per customer comes from agents running for hours, versus more people actually using the model. Also, how much of the experimental budget could be cut next year? And it&#8217;s also quite possible that the decision to launch ROI dashboards the same week as the IPO filing suggests that customers are already seeking details about what they are getting in return for their spending.</p><p>In my view, for engineering leaders, the message is that AI spend will be scrutinised pretty much the same way cloud spend was scrutinised in 2022. It&#8217;s good to start measuring outcomes now, such as cycle time, escaped defects, and review load.</p><p>Also, the disclosure about the model reaching external systems requires developers to be careful. If a well-resourced, safety-focused lab could face something like that, other companies should be more wary of their AI agent&#8217;s internet access settings.</p><h2>4 - PHP2Shell Vulnerabilities</h2><p>Most security advice targets your dependencies. For example, the npm packages or the WordPress plugins. But the language runtime is a dependency too. And it&#8217;s something that&#8217;s often forgotten. If you have a bug inside the PHP engine, you can&#8217;t escape its impact with framework updates or CMS updates. Every app on that server inherits the hole.</p><p>Recently, PHP<a href="https://www.php.net/archive/2026.php#2026-10-21-5"> shipped emergency releases</a> for two critical bugs. They are now nicknamed &#8220;PHP2Shell&#8221;. One of these bugs corrupts request state when memory runs out. The other one lets a later request reuse state that should have been freed. Both are rated 9.2 (CVSS v4) and allow unauthenticated remote code execution.</p><p>Apache mod_php is the worst case. The demonstrated attack runs before any application code is executed. Various researchers reported the presence of these bugs. In fact, details leaked on Hacker News two days before the planned disclosure. So PHP brought its release forward a day.</p><p>The problem is that the attack traffic came before the fix. Anyone who waited for the KEV listing had already been exposed for nine days.</p><p>As per estimates, around 2.6M internet-facing services were showing a PHP version in October. About 1.9M of them (73.5%) ran PHP 8.1 or older, which PHP doesn&#8217;t patch. PHP did publish minimal source backports for 7.4, 8.0, and 8.1, but it might be unrealistic to build PHP from source on a forgotten shared host? In fact, attempts to exploit also showed up on Amazon honeypots 3 days before the leak. Did someone have the details about this weakness even earlier?</p><p>The researchers may have used AI to help find the bugs. If AI can make old and deep bugs cheaper to find, the patch window is going to go down for everyone in the industry. The cost of running an end-of-life runtime goes up in a big way. In my view, the key lesson from this incident is that developers should also list their runtimes just like the dependency packages. Most dependency scanners don&#8217;t worry about the interpreter.</p>]]></content:encoded></item><item><title><![CDATA[How GitHub Used AI to Port Copilot From TypeScript to Rust in Record Time]]></title><description><![CDATA[In this article, we&#8217;ll look at how this porting was done and the learnings along the way.]]></description><link>https://blog.bytebytego.com/p/how-github-used-ai-to-port-copilot</link><guid isPermaLink="false">https://blog.bytebytego.com/p/how-github-used-ai-to-port-copilot</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Tue, 10 Nov 2026 16:30:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!t5iH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/redpanda_111026">NYSE President Lynn Martin discusses AI (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/redpanda_111026" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lwOL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lwOL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lwOL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lwOL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lwOL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:606021,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/redpanda_111026&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.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_!lwOL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lwOL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lwOL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lwOL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d5d673d-38f3-47e7-8a75-b00db4d680ad_1200x1200.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>AI is moving fast, from experiments to agents that act on their own. Few people have a better view of what that shift means for business than Lynn Martin, President of NYSE Group. At the Agentic Data Summit on December 9, Lynn joins Redpanda Founder &amp; CEO Alex Gallego for a conversation on what it takes to adopt AI where reliability is everything, how AI is showing up in the companies coming to market, and why timely, trustworthy data matters more than ever as agents start acting in real time. Tune in at 9:19 AM PT. The summit is free and virtual and runs 8:30 AM&#8211;2:00 PM PT.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/redpanda_111026&quot;,&quot;text&quot;:&quot;Save Your Seat&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/redpanda_111026"><span>Save Your Seat</span></a></p><div><hr></div><p>GitHub recently rewrote the software engine behind multiple Copilot products. They ported the codebase from TypeScript to Rust. Almost 800K lines of code. And the great part was that all of this was done using the GitHub Copilot app itself.</p><p>This porting exercise was triggered because the existing design was eating up a lot of resources. It was also becoming difficult to embed Copilot in other applications.</p><p>However, a project of this size would have required a big team of developers and a couple of years to get done. But by using the GitHub Copilot app, Copilot CLI, and AI agents, a single developer was able to finish the whole thing in a few months. In this article, we&#8217;ll look at how this porting was done and the learnings along the way. Here&#8217;s what we will cover:</p><ul><li><p>The need for porting the Copilot runtime</p></li><li><p>The porting strategy</p></li><li><p>How the porting work started</p></li><li><p>The role of agent fleets</p></li><li><p>How the new code was reviewed</p></li><li><p>What were the issues</p></li><li><p>The performance impact</p></li><li><p>Cost of porting and learnings</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies.</em></p><h2>The Need for Porting the Copilot Runtime</h2><p>You can think of GitHub&#8217;s Copilot runtime as the shared software engine that takes care of AI agent behavior across multiple products. Due to this runtime, all these products can reuse the same capabilities instead of needing to maintain their own implementation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t5iH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t5iH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 424w, https://substackcdn.com/image/fetch/$s_!t5iH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 848w, https://substackcdn.com/image/fetch/$s_!t5iH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 1272w, https://substackcdn.com/image/fetch/$s_!t5iH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!t5iH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png" width="1456" height="580" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:580,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:199115,&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://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.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_!t5iH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 424w, https://substackcdn.com/image/fetch/$s_!t5iH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 848w, https://substackcdn.com/image/fetch/$s_!t5iH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 1272w, https://substackcdn.com/image/fetch/$s_!t5iH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e64b9e1-d8ca-427a-b096-38cffbb4851e_4024x1604.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Originally, the GitHub engineering team had built the runtime using TypeScript that ran on Node and the V8 JavaScript engine. While this supported rapid development, the runtime was tightly coupled to the command-line application&#8217;s user interface. When GitHub needed an SDK to let other applications talk to Copilot, it built that SDK on top of the existing command-line application. When you started the SDK client, you had to launch a separate background process that was made up of the command-line application and its runtime. Requests and responses moved between the consumer app and that process.</p><p>This setup became harder to justify when the runtime spread to applications that had stricter requirements for speed, memory usage, and scale. Even if you had an application written in Python, Java, or C#, it had to hold the additional Node and V8 machinery. When you started a client, you had to launch another process and prepare JavaScript for execution. Each client had to bear roughly 100 MB of memory overhead at a bare minimum. Also, processes talking to each other added a lot of overhead. Lastly, applications had to monitor two processes, and a crash in the Node process could take the session with it. These costs were a huge problem for services that hosted many clients.</p><p>Therefore, GitHub wanted a standalone runtime library that was clearly separate from the UI. Applications should be able to load that library directly into their own process.</p><p>Rust was an ideal choice for this type of requirement. It had low overhead and predictable resource usage. An early estimate showed that roughly 130K lines of production TypeScript had to be ported. But additional logic moved out of the interface layer into the runtime. Also, you had other developers adding new features. Ultimately, 430K lines of production TypeScript code moved through the migration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NG8Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NG8Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 424w, https://substackcdn.com/image/fetch/$s_!NG8Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 848w, https://substackcdn.com/image/fetch/$s_!NG8Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 1272w, https://substackcdn.com/image/fetch/$s_!NG8Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!NG8Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png" width="1200" height="660" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:660,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NG8Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 424w, https://substackcdn.com/image/fetch/$s_!NG8Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 848w, https://substackcdn.com/image/fetch/$s_!NG8Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 1272w, https://substackcdn.com/image/fetch/$s_!NG8Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde2a2a2c-e3de-4a1b-8f24-b6f22af03b1b_1200x660.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot/">GitHub Engineering Blog</a></figcaption></figure></div><div><hr></div><h2><a href="https://go.bytebytego.com/unblocked_111026">How much of your week is spent answering questions? (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/unblocked_111026" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w0ew!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!w0ew!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!w0ew!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!w0ew!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!w0ew!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.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;:721434,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/unblocked_111026&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.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_!w0ew!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!w0ew!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!w0ew!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!w0ew!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca4a3bd9-29ce-405e-a38a-2677e0f7df28_1600x900.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>New hires, support, PMs, and your coding agents all need to know how the product works and why it works that way. Today, you&#8217;re the one pointing them in the right direction.</p><p>Unblocked works out what&#8217;s current and relevant across your code, PRs, tickets, Slack, and production data, so:</p><ul><li><p>Everyone gets cited answers in Slack without pulling in an engineer</p></li><li><p>When the answer turns into a fix, a cloud agent drafts the PR</p></li><li><p>Your agents generate code that follows past decisions, no steering needed</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/unblocked_111026&quot;,&quot;text&quot;:&quot;See how it works&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/unblocked_111026"><span>See how it works</span></a></p><div><hr></div><h2>The Porting Strategy</h2><p>GitHub used an incremental, in-place porting strategy.</p><p>In this strategy, you replace the runtime one piece at a time, even when the product is under active development. The development team could continue to add new features and release updates throughout the migration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rc9H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rc9H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 424w, https://substackcdn.com/image/fetch/$s_!rc9H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 848w, https://substackcdn.com/image/fetch/$s_!rc9H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 1272w, https://substackcdn.com/image/fetch/$s_!rc9H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!rc9H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png" width="1456" height="1063" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b758cd12-3a72-448c-b721-e9848564425b_3472x2534.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1063,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:303283,&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://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.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_!rc9H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 424w, https://substackcdn.com/image/fetch/$s_!rc9H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 848w, https://substackcdn.com/image/fetch/$s_!rc9H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 1272w, https://substackcdn.com/image/fetch/$s_!rc9H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb758cd12-3a72-448c-b721-e9848564425b_3472x2534.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 GitHub engineering team didn&#8217;t go for a complete rewrite followed by one large switchover. This approach would have concentrated all the risk into a single release. The replacement would need to keep catching up with oncoming changes. With the smaller replacements, they were able to make each change easier to review, test, and investigate.</p><p>The process worked in a step-by-step manner. A component&#8217;s TypeScript implementation was replaced with Rust in a single pull request, which grouped the changes for review. Any TypeScript code that depended on that component called the new Rust implementation through a thin wrapper. You can think of this wrapper as a temporary bridge between two languages. The old implementation was deleted as part of the same change, so that the team had to maintain only one active version of the component. As more and more stuff moved to Rust, these temporary bridges were also removed.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VDUl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VDUl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 424w, https://substackcdn.com/image/fetch/$s_!VDUl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 848w, https://substackcdn.com/image/fetch/$s_!VDUl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 1272w, https://substackcdn.com/image/fetch/$s_!VDUl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!VDUl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png" width="1456" height="634" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:634,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:214538,&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://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.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_!VDUl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 424w, https://substackcdn.com/image/fetch/$s_!VDUl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 848w, https://substackcdn.com/image/fetch/$s_!VDUl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 1272w, https://substackcdn.com/image/fetch/$s_!VDUl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acdc28c-e1a7-4bbd-966a-f7ea4e1e569e_3388x1476.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>As far as the tasks were concerned, the work began with small, independent helpers that already had strong test suites and didn&#8217;t manage shared state. These early changes also helped test the build setup, packaging, and communication between languages. Once they had made the approach concrete, the migration went to more interconnected parts of the system.</p><p>Throughout this process, the key aim was to maintain existing behavior and algorithms. Broader redesigns were pushed after migration. At each step, validation was performed. They had existing end-to-end tests that checked if complete workflows behaved properly as their implementation changed. If there was a test failure, the changes weren&#8217;t merged. Also, when it came to the users, the ported components reached users through incremental releases. They often appeared in a pre-release before going to a stable release.</p><h2>How the Porting Work Started</h2><p>GitHub started with a few small, working examples to test the waters before dealing with larger components.</p><p>The first couple of pull requests took care of the basic Rust setup. Things like build tools, automated checks, and coding instructions. They also introduced the runtime library and mechanisms for TypeScript and Rust to talk to each other.</p><p>The first main porting change moved three independent helper functions through the complete process. You can think of these early efforts as checking whether the translated code worked well. The team also tested how Rust code would be organized, built, packaged, and integrated with existing code. This gave the team practical experience with the entire process.</p><p>The rest of the work was ordered according to dependencies. For example, you had small helpers and supporting utilities come first. It was followed by components that managed state, then tools, model clients, and other integrations.</p><p>Session orchestration, which is supposed to manage much of the runtime, was left for the end. This is because larger subsystems often needed several rounds of work.</p><h2>The Role of Agent Fleets</h2><p>Agent fleets played a key role in dividing the migration work among multiple AI agents working at the same time. You could have a coordinating agent investigate a large component, break the work into smaller tasks, and create other agents to handle them. The Copilot app made it possible to check these sessions and switch between them. It also let them exchange messages as the work progressed.</p><p>The team got two different types of assistance from these agents. First, you had the subagents that worked within the parent session&#8217;s workspace and returned their findings to it. These subagents were good for investigating code and answering specific questions. Then, you had the child sessions that had their own Git branches and separate working copies of the repository. This lets them make changes independently. This separation helped multiple agents work on different areas of the implementation without any risk.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x-1i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x-1i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 424w, https://substackcdn.com/image/fetch/$s_!x-1i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 848w, https://substackcdn.com/image/fetch/$s_!x-1i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 1272w, https://substackcdn.com/image/fetch/$s_!x-1i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!x-1i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png" width="1456" height="830" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:830,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:214929,&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://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.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_!x-1i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 424w, https://substackcdn.com/image/fetch/$s_!x-1i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 848w, https://substackcdn.com/image/fetch/$s_!x-1i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 1272w, https://substackcdn.com/image/fetch/$s_!x-1i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54d2acdc-7172-41d9-b155-b0d2aa72b680_3386x1930.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 example was around the session[dot].ts file that was roughly 30K lines and connected to many parts of the runtime. The coordinating agent spent an hour reading and checking before creating anything. After analyzing, it divided the work among 15 child sessions. It made the choice of models for each task. The parent talked with these sessions and tracked their progress from beginning to end. Finally, it brought the completed changes into its own branch.</p><p>Despite the advantages, running so many agents also created some limitations. When all 15 sessions tried to build and test their code at the same time, they overwhelmed the developer&#8217;s laptop. The workflow was adjusted so that child agents avoided expensive builds and tests. All that work was left for the parent. A separate chat session took care of build access for each of the porting sessions. It only allowed one build at a time.</p><p>Much of the agent fleet&#8217;s activities involved reading code, checking for dependencies, testing, and reviewing results. Their role wasn&#8217;t limited to writing Rust code. They also helped understand the existing system and check whether the replacement kept the same behavior. During all of this, human oversight remained critical.</p><h2>How the New Code was Reviewed</h2><p>Developers were constantly changing the repository, and hence, code review had to check both the translation and whether the port had the latest changes. The team used a reusable instruction called &#8220;rust-rebase-review&#8221; to handle this process.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rT_-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rT_-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 424w, https://substackcdn.com/image/fetch/$s_!rT_-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 848w, https://substackcdn.com/image/fetch/$s_!rT_-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 1272w, https://substackcdn.com/image/fetch/$s_!rT_-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!rT_-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png" width="1456" height="1025" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1025,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:219960,&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://blog.bytebytego.com/i/223839962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.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_!rT_-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 424w, https://substackcdn.com/image/fetch/$s_!rT_-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 848w, https://substackcdn.com/image/fetch/$s_!rT_-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 1272w, https://substackcdn.com/image/fetch/$s_!rT_-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd8220a-010c-46c4-b0cc-92af87fd3752_2888x2034.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>First, the main agent pushed its work to the latest main branch and resolved any conflicts. After this, it checked that any newly incoming TypeScript changes had also been ported into Rust. Deleting the old TypeScript helped bring such changes to attention. If another developer modified a deleted file, Hit would flag a conflict that had to be handled.</p><p>Next, you had multiple review agents using different AI models compare the old TypeScript with the new Rust code line by line. Their main job was to identify changes in behavior or compatibility. They also checked whether the Rust implementation was efficient enough. Also, whether obsolete TypeScript and temporary wrappers had been removed. They also had to ensure that existing end-to-end tests remained unchanged because they were the only reference for expected behavior.</p><p>The code review was done in a repeated cycle. When agents found any issues, the coordinating agent checked the findings and fixed any valid problems. This continued until the reviews became clean. Every round of fixes could be committed and pushed so automated checks could be done along with further reviews. Copilot Code Review and additional review bots also checked every commit and left feedback on the pull request.</p><p>Human reviewers focused on architecture, interface contracts, and risk factors that might have been highlighted by agents or tests.</p><h2>What Were the Issues</h2><p>The porting exercise caused some regressions as well. You can think of these regressions as behavior that had worked earlier but stopped working as expected after the rewrite. The team found and fixed a bunch of regressions.</p><p>A common problem was that translated code changed the existing behaviour in a subtle manner. For example, some whole-number values were changed to decimal numbers, causing issues with certain SDKs. Other differences were around empty strings, time zones, or replacement libraries that had a different way of handling errors. The code could compile successfully. But the results could not be handled by other parts of the system.</p><p>Another major group of issues was around state management and coordination of operations. For example, when an operation was cancelled, it didn&#8217;t always stop all the related work. Also, when resources were released too early, the session got stuck. There was also a loss of some features. And some of them were only partially migrated.</p><p>There were also general integration and performance problems. For example, the Rust code sometimes performed lengthy work on Node&#8217;s main thread. This froze the interface. On Windows, missing process-launch settings made unwanted console windows appear.</p><h2>The Performance Impact of Porting</h2><p>The rewrite brought down the overhead of running Copilot&#8217;s agent runtime. Especially in terms of time and memory. With the use of Rust, there was no need to initialize Node and V8. Also, no need to load and prepare the JavaScript application. Applications could load the Rust runtime directly into their own process. This avoided the cost of talking with a separate runtime process.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sNPx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sNPx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 424w, https://substackcdn.com/image/fetch/$s_!sNPx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 848w, https://substackcdn.com/image/fetch/$s_!sNPx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 1272w, https://substackcdn.com/image/fetch/$s_!sNPx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!sNPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png" width="1200" height="530" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:530,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sNPx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 424w, https://substackcdn.com/image/fetch/$s_!sNPx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 848w, https://substackcdn.com/image/fetch/$s_!sNPx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 1272w, https://substackcdn.com/image/fetch/$s_!sNPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e78740-b2f3-4129-b2bc-ab849ef8c8cb_1200x530.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot/">GitHub Engineering Blog</a></figcaption></figure></div><p>GitHub saw performance gains during their detailed testing. For example, in a particular trial, creating a client, completing a single turn, and cleaning up took 5.25 seconds before the porting and 292 milliseconds after porting. This was an improvement of almost 18 times.</p><p>They also had capacity gains. In a test where many sessions shared one client, throughput went up from 7.55 completed session lifecycles per second to 120. Memory consumption also went down. In a 10-client test, the peak increase in private memory went down from 1383 MB to 126 MB.</p><p>The rewrite largely preserved the original algorithms. More improvements could happen if parts of the runtime are redesigned around Rust&#8217;s approach to memory ownership and concurrency.</p><h2>Cost of Porting and Learnings</h2><p>The entire porting work cost around $120K in AI token costs. They covered roughly 136 billion tokens. Most of this volume was made up of cached input, which brought down the cost of repeatedly processing existing context.</p><p>More than that, you also had developer time that was spent on this work. Apart from the main developer, other developers also made contributions to integrations, packaging, build improvements, and reviews.</p><p>There were a lot of learnings along the way.</p><p>For one, it was critical to give clear instructions to the AI tools. Some of the initial requests to port a component sometimes led agents to translate only the central logic. The surrounding work stayed in TypeScript. The instructions had to be made more effective to handle this.</p><p>Another learning was that to perform such a migration successfully, you need strong end-to-end tests. These tests should check if complete workflows retained their original behavior. The team improved its test coverage beforehand. But additional coverage could have prevented some more regressions.</p><p>The tests also needed protection. For example, you don&#8217;t want an agent changing an implementation to make the test weaker or alter an expected result. So, you need to have some sort of oversight.</p><p>One more learning was that for such migrations, you should try to translate things first without worrying about redesigning. It&#8217;s more important to keep existing behavior and algorithms intact. If you attempt to combine the porting with other improvements, it only increases issues, time, and token costs.</p><p><strong>References:</strong></p><ul><li><p><a href="https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot">Migrating the GitHub Copilot runtime to Rust, using Copilot</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[How LinkedIn Uses AI to Review 40,000 Pull Requests a Week]]></title><description><![CDATA[Most of its reviews are posted before the first human reviewer even opens the PR]]></description><link>https://blog.bytebytego.com/p/how-linkedin-uses-ai-to-review-40000</link><guid isPermaLink="false">https://blog.bytebytego.com/p/how-linkedin-uses-ai-to-review-40000</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Mon, 09 Nov 2026 16:30:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!JDQw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/datadog_110926">4 Key Insights for Scaling LLM Applications (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/datadog_110926" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-g6Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!-g6Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!-g6Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!-g6Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-g6Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.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;:333373,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/datadog_110926&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.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_!-g6Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 424w, https://substackcdn.com/image/fetch/$s_!-g6Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 848w, https://substackcdn.com/image/fetch/$s_!-g6Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!-g6Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f66d37b-9c93-4b16-81bd-15a36324a8c4_1920x1080.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 challenge of running LLM applications in production is that failures are silent, costs are unpredictable, and security vulnerabilities are hard to detect until it&#8217;s too late.</p><p>Download this Datadog eBook for practical strategies to monitor, debug, and secure your LLM application workflows end-to-end. You&#8217;ll get 4 key insights into how to overcome the challenges of deploying LLMs at scale &#8212; from tracing multi-step chain executions and detecting prompt injection attacks to tracking token costs and evaluating output quality in real time.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/datadog_110926&quot;,&quot;text&quot;:&quot;Download the eBook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/datadog_110926"><span>Download the eBook</span></a></p><div><hr></div><p>LinkedIn has more than <strong>10,000 active code repositories</strong>, with tens of thousands of pull requests (PRs) being opened each week [1]. As coding agents write more of that code, the slow part of shipping software has moved from writing code to reviewing it.</p><p>To overcome the code review bottleneck, LinkedIn built its own AI reviewer. In a typical week, this in-house reviewer covers more than <strong>40,000 PRs</strong>, and most of its reviews are posted before the first human reviewer even opens the PR [1].</p><p>To better understand the landscape of AI reviewers and how LinkedIn built theirs, we interviewed <a href="https://www.linkedin.com/in/minchen07/">Min Chen</a>, a Principal Staff Engineer at LinkedIn, and <a href="https://www.linkedin.com/in/thebalaji/">Balaji Srinivasan</a>, Senior Director of Engineering at LinkedIn. Thanks to both of them for their time and for being open about what did not 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_!JDQw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JDQw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 424w, https://substackcdn.com/image/fetch/$s_!JDQw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 848w, https://substackcdn.com/image/fetch/$s_!JDQw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 1272w, https://substackcdn.com/image/fetch/$s_!JDQw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!JDQw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png" width="1456" height="1521" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1521,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:414139,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.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_!JDQw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 424w, https://substackcdn.com/image/fetch/$s_!JDQw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 848w, https://substackcdn.com/image/fetch/$s_!JDQw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 1272w, https://substackcdn.com/image/fetch/$s_!JDQw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35a42d09-7b73-4378-83ed-a907f990eaef_2882x3010.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">LinkedIn&#8217;s AI reviewer system (High-Level)</figcaption></figure></div><p>In this article, you&#8217;ll learn:</p><ul><li><p>What an AI code reviewer is, and why review is the bottleneck these days</p></li><li><p>Three main directions for teams and companies to handle the code review bottleneck</p></li><li><p>How to build a multi-agent AI reviewing system that works in production</p></li><li><p>What evaluation looks like for AI reviewers</p></li><li><p>What&#8217;s ahead and where the new bottlenecks move</p></li></ul><h2>What Is an AI Code Reviewer?</h2><p>Software development has two main steps. An engineer writes a change, and other engineers review it before it merges into the main codebase.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mHmN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mHmN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 424w, https://substackcdn.com/image/fetch/$s_!mHmN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 848w, https://substackcdn.com/image/fetch/$s_!mHmN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 1272w, https://substackcdn.com/image/fetch/$s_!mHmN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!mHmN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png" width="1456" height="388" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:388,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56224,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.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_!mHmN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 424w, https://substackcdn.com/image/fetch/$s_!mHmN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 848w, https://substackcdn.com/image/fetch/$s_!mHmN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 1272w, https://substackcdn.com/image/fetch/$s_!mHmN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7e46450-0dc0-4fd2-afb3-aa40d0ba575a_2652x706.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Software development&#8217;s two main steps</figcaption></figure></div><p>When an engineer writes the code, the change becomes a PR. Then reviewers read its diff, that is, the lines it adds, removes, or changes. Here are the typical steps from when a writer opens a PR to when the PR is merged back into the codebase:</p><ol><li><p>The author opens a PR from a branch that has the change.</p></li><li><p>The code host, such as GitHub, notifies the reviewers and starts continuous integration (CI), which runs tests and linters (to flag style problems and simple errors).</p></li><li><p>A reviewer reads the PR and comments on specific lines.</p></li><li><p>The author pushes fixes. Then the reviewer looks again.</p></li><li><p>The reviewer approves, and the PR merges.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4ygB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4ygB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 424w, https://substackcdn.com/image/fetch/$s_!4ygB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 848w, https://substackcdn.com/image/fetch/$s_!4ygB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!4ygB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!4ygB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png" width="1456" height="612" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:612,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125788,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.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_!4ygB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 424w, https://substackcdn.com/image/fetch/$s_!4ygB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 848w, https://substackcdn.com/image/fetch/$s_!4ygB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!4ygB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c5301d2-9020-4476-8dd8-4f11eeb1e6b8_3168x1332.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">The typical path of a PR, from opening to merging.</figcaption></figure></div><p>AI is changing this development process, because it can now help with some of these steps. Engineers hand those steps to AI agents and spend more of their time focusing on intent and judgement. That is AI-native development.</p><p>Specifically for the writing step, frontier coding agents have shown promise lately. Given a task, an agent implements the feature, writes the tests, then runs those tests, and iterates until they pass. Finally, it opens a PR for review.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fexj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fexj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 424w, https://substackcdn.com/image/fetch/$s_!fexj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 848w, https://substackcdn.com/image/fetch/$s_!fexj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!fexj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fexj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png" width="1456" height="489" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:489,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:150381,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.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_!fexj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 424w, https://substackcdn.com/image/fetch/$s_!fexj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 848w, https://substackcdn.com/image/fetch/$s_!fexj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!fexj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10557b0c-b291-4842-82d3-b8daeb2664f6_3968x1334.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Coding agents automate writing, but PRs still waits for review.</figcaption></figure></div><p>With coding agents, writing (the first step) can now be largely automated and done much faster. Instead of an engineer spending hours or days writing a change, the agent spends minutes writing it. But if real humans still have to review the proposed changes, the process will still be slow, because engineers&#8217; hours are still fixed and limited.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QHv6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QHv6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 424w, https://substackcdn.com/image/fetch/$s_!QHv6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 848w, https://substackcdn.com/image/fetch/$s_!QHv6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 1272w, https://substackcdn.com/image/fetch/$s_!QHv6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QHv6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png" width="1456" height="435" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:435,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54418,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.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_!QHv6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 424w, https://substackcdn.com/image/fetch/$s_!QHv6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 848w, https://substackcdn.com/image/fetch/$s_!QHv6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 1272w, https://substackcdn.com/image/fetch/$s_!QHv6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ab657d5-ba75-4b13-b127-08b813b79003_3366x1006.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Writing got faster, so review became the bottleneck.</figcaption></figure></div><p>The fix is a system that can reliably review code, ideally before humans do. That system is called an AI reviewer. It reads a PR the way a human reviewer would and comments on the lines that need attention. Once the automated code review is complete, the author, in this case the coding agent, addresses them so human reviewers spend their limited time on judging the fixes.</p><p>Since models are also getting better at reading code, more teams are automating reviews this way [2]. They mostly differ in the extent to which they aim to automate the reviewing process. Full automation would let AI approve changes on its own. This is difficult, and most labs are not there yet.</p><p>Partial automation keeps human approval on changes and gives AI the first pass. This makes the process faster but keeps real humans in the loop to reduce the risk of merging buggy or insecure code. Partial automation is more feasible these days, and companies that have an AI reviewer in place, like LinkedIn, usually use partial automation. In the rest of this article, we focus on partial automation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!I-_H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!I-_H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 424w, https://substackcdn.com/image/fetch/$s_!I-_H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 848w, https://substackcdn.com/image/fetch/$s_!I-_H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 1272w, https://substackcdn.com/image/fetch/$s_!I-_H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!I-_H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png" width="1456" height="776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:776,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130494,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.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_!I-_H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 424w, https://substackcdn.com/image/fetch/$s_!I-_H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 848w, https://substackcdn.com/image/fetch/$s_!I-_H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 1272w, https://substackcdn.com/image/fetch/$s_!I-_H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46143547-41f7-4c96-8c0c-30f17fb6d757_2804x1494.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Full vs partial automation</figcaption></figure></div><p>But why is building an AI reviewer challenging? For an AI reviewer to be reliable, it has to have four properties:</p><ul><li><p>Grounded: it flags real problems in the changed lines.</p></li><li><p>High-signal: the issues it produces are real bugs and high-risk lines (not just minor style nits a linter would catch).</p></li><li><p>Codebase-aware: it follows the codebase&#8217;s own conventions.</p></li><li><p>Timely: it comments while the author can still act on it.</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_!GcsX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GcsX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 424w, https://substackcdn.com/image/fetch/$s_!GcsX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 848w, https://substackcdn.com/image/fetch/$s_!GcsX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 1272w, https://substackcdn.com/image/fetch/$s_!GcsX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!GcsX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png" width="1456" height="902" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:902,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:140679,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.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_!GcsX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 424w, https://substackcdn.com/image/fetch/$s_!GcsX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 848w, https://substackcdn.com/image/fetch/$s_!GcsX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 1272w, https://substackcdn.com/image/fetch/$s_!GcsX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe859b357-f37a-418b-93a1-8b792ea8a060_3136x1942.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">The four properties an AI review comment needs</figcaption></figure></div><p>Getting all four at once is the hard part. LinkedIn built its own system over several iterations to get there. Let&#8217;s see how they built it.</p><div><hr></div><h2><a href="https://go.bytebytego.com/warpbuild_110926">Stop reinstalling your toolchain on every CI run (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/warpbuild_110926" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cxFV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!cxFV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!cxFV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!cxFV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!cxFV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png" width="1456" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c050743f-6377-4e5e-b752-43b299c8b439_1600x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:127621,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/warpbuild_110926&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.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_!cxFV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!cxFV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!cxFV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!cxFV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc050743f-6377-4e5e-b752-43b299c8b439_1600x840.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>AI agents open more pull requests, and each one reinstalls the same dependencies from scratch. That is wasted CI time and money.</p><p>WarpBuild keeps that work:</p><ul><li><p>Snapshot runners boot from a saved machine image, with your toolchain already on disk</p></li><li><p>Each job still gets a fresh, ephemeral runner</p></li><li><p>The WarpBuild cache restores dependencies between jobs</p></li><li><p>Twice as fast at half the cost of default runners</p></li></ul><p>Trusted by teams at Braintrust, Raycast, OpenRouter, Comcast and Jane Street.</p><p>Use code START50 for $50 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/warpbuild_110926&quot;,&quot;text&quot;:&quot;Try snapshot runners&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/warpbuild_110926"><span>Try snapshot runners</span></a></p><div><hr></div><h2>How to Build an AI Code Reviewer</h2><p>Remember from earlier that the goal is partial automation. PRs still get a human review, but the AI review comes first. As a company, you have different options to have an AI reviewer in place. Some options are easier to set up but less flexible, while others take more work to build but give you more control over the quality of the comments.</p><p>Three common directions are:</p><ul><li><p>Use a vendor&#8217;s reviewer</p></li><li><p>Use an off-the-shelf model with your rules</p></li><li><p>Build a custom multi-agent review system</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_!TQnI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TQnI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 424w, https://substackcdn.com/image/fetch/$s_!TQnI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 848w, https://substackcdn.com/image/fetch/$s_!TQnI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 1272w, https://substackcdn.com/image/fetch/$s_!TQnI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!TQnI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png" width="1456" height="951" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:951,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:234251,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.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_!TQnI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 424w, https://substackcdn.com/image/fetch/$s_!TQnI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 848w, https://substackcdn.com/image/fetch/$s_!TQnI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 1272w, https://substackcdn.com/image/fetch/$s_!TQnI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05fa3d3b-c715-4796-ac24-5ab8d088c48e_3188x2082.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Three ways to get an AI reviewer</figcaption></figure></div><h3>Direction 1: Use a vendor&#8217;s reviewer</h3><p>A fast way to have an AI reviewer in place is to simply buy a hosted system from a vendor. The reviewer connects to the code host and comments on each new PR moving forward. So you don&#8217;t have to build the system internally.</p><p>This direction is simple to set up, does not need any particular expertise, and is probably the fastest option. But it has two major limits. First, it is generic. You can add a rule file, but the vendor controls the prompts and the harness, so many comments are generic and could apply to any project.</p><p>The second limit is control. The vendor owns the system, so it decides when the model or the instructions change. You cannot test an update before engineers see it or gradually roll out a change.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!whTq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!whTq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 424w, https://substackcdn.com/image/fetch/$s_!whTq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 848w, https://substackcdn.com/image/fetch/$s_!whTq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 1272w, https://substackcdn.com/image/fetch/$s_!whTq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!whTq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png" width="1456" height="867" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:867,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:182626,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.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_!whTq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 424w, https://substackcdn.com/image/fetch/$s_!whTq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 848w, https://substackcdn.com/image/fetch/$s_!whTq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 1272w, https://substackcdn.com/image/fetch/$s_!whTq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F901db15f-6fdc-4e3a-af5a-ff695aef0de9_2804x1670.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">A vendor&#8217;s reviewer meets your codebase only through a rules file.</figcaption></figure></div><p>LinkedIn tried this option first. During an AI-native pilot, teams were asked to opt in to a vendor&#8217;s hosted reviewer. But the team observed that the comments were noisy and generic. They did not fit LinkedIn&#8217;s codebase and each repository&#8217;s rules. When the comments are noisy, engineers lose trust.</p><p>Soon, engineers asked to opt out, which meant the full manual review was back again. The team also had no control over the vendor&#8217;s changes. Min put it this way: &#8220;You don&#8217;t own anything. They do something, they change something, you just react to it.&#8221;</p><h3>Direction 2: Use an off-the-shelf model with your rules</h3><p>Since a hosted reviewer is too generic, a natural next step is to use an off-the-shelf model, but build your own harness around it. That way, you can choose your own prompts and write the codebase&#8217;s own rules into its instructions. With those instructions and more control over the harness, the comments will be more specific to your conventions.</p><p>This direction sounds promising: the comments would be specific to the codebase and would likely arrive quickly, before human review. But it has two main problems.</p><p>The first problem is hallucination. Because the system relies on a single model and there is no verification in place, if the model hallucinates, nothing will catch it. The author will end up with a comment about a problem that does not exist, or a real problem attached to the wrong line.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iZX3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iZX3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 424w, https://substackcdn.com/image/fetch/$s_!iZX3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 848w, https://substackcdn.com/image/fetch/$s_!iZX3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 1272w, https://substackcdn.com/image/fetch/$s_!iZX3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!iZX3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png" width="1456" height="986" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:986,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116524,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.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_!iZX3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 424w, https://substackcdn.com/image/fetch/$s_!iZX3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 848w, https://substackcdn.com/image/fetch/$s_!iZX3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 1272w, https://substackcdn.com/image/fetch/$s_!iZX3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e89b7c8-8912-4116-862b-1e48b0e53a69_2992x2026.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Grounded vs. hallucinated comment</figcaption></figure></div><p>The second problem is knowledge gaps. A model learns what good and bad code look like from its training data. With a single model, it will work well on areas that overlap with its training data, but will fail on out-of-distribution inputs or inputs that were less frequent in the training data. That means a single reviewer model misses the same classes of issues repeatedly and may over-flag the same low-value issues.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NgcF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NgcF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 424w, https://substackcdn.com/image/fetch/$s_!NgcF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 848w, https://substackcdn.com/image/fetch/$s_!NgcF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 1272w, https://substackcdn.com/image/fetch/$s_!NgcF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!NgcF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png" width="1456" height="905" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:905,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:172167,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.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_!NgcF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 424w, https://substackcdn.com/image/fetch/$s_!NgcF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 848w, https://substackcdn.com/image/fetch/$s_!NgcF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 1272w, https://substackcdn.com/image/fetch/$s_!NgcF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F426010b4-8260-435f-abd9-705ae4be5581_3366x2092.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">A single model works well on what looks like its training data.</figcaption></figure></div><p>LinkedIn also observed the same issues when the team built the review system with their repository-specific rules. The model gave good results but produced many hallucinations, and some of its comments did not even match the line numbers in the diff. Using a different model for review than for writing code did not fix the hallucination issue. But that idea led the team to ask whether a second model could check and verify the first model, the idea behind the multi-agent design.</p><h3>Direction 3: Build a custom multi-agent review system</h3><p>This direction relies on multiple agents to produce grounded reviews. There are different design patterns for multi-agent systems, but a popular one is the orchestrator-subagent pattern [3], where one agent hands work to several subagents and combines their results. For code review, the subagents independently review the same PR, often each with a different model, and return their findings with line numbers. The orchestrator then merges overlapping findings, ranks them by confidence, and posts only reliable reviews.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Unbj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Unbj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 424w, https://substackcdn.com/image/fetch/$s_!Unbj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 848w, https://substackcdn.com/image/fetch/$s_!Unbj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!Unbj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Unbj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png" width="1456" height="577" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:577,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:111862,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.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_!Unbj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 424w, https://substackcdn.com/image/fetch/$s_!Unbj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 848w, https://substackcdn.com/image/fetch/$s_!Unbj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!Unbj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff24c9eb1-d57b-447e-b7b9-70028c3c15b8_3366x1334.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">The orchestrator-subagent pattern</figcaption></figure></div><p>This design can mitigate most of the limitations of the previous directions because you own the whole system, different models cover each other&#8217;s knowledge gaps, and findings by different agents must be verified by others to survive and be posted.</p><p>To add your rules and codebase conventions, there are two ways. One is context injection, which means adding a rule file to the repository that the AI reviewer reads on every PR. This can work in simple codebases, but is not a flexible approach because some rules apply to every repository, some to one repository, and some to one kind of change. A single file being injected as context cannot contain all three or combine the right ones for each PR.</p><p>The other approach, which LinkedIn used, is a layered design. You design several tiers, and each has its own scope, owner, and rules. Then a dedicated subagent uses those rules to perform an independent review. LinkedIn used the following three tiers:</p><ul><li><p><strong>Company-wide rules</strong> apply to every repository. These can be YAML files clarifying what the model should check.</p></li><li><p><strong>Repository rules</strong> cover one codebase. This can be a markdown file containing the team&#8217;s conventions like coding standards and review criteria.</p></li><li><p><strong>Pull request rules</strong> apply only to one kind of change.</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_!Koqu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Koqu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 424w, https://substackcdn.com/image/fetch/$s_!Koqu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 848w, https://substackcdn.com/image/fetch/$s_!Koqu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 1272w, https://substackcdn.com/image/fetch/$s_!Koqu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Koqu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png" width="1456" height="624" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157716,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.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_!Koqu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 424w, https://substackcdn.com/image/fetch/$s_!Koqu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 848w, https://substackcdn.com/image/fetch/$s_!Koqu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 1272w, https://substackcdn.com/image/fetch/$s_!Koqu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ba30a54-30d3-48bd-9591-1b3816def004_3474x1490.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Layered rules to get a right mix of company, team, and change-specific checks.</figcaption></figure></div><p>To better understand how this system reviews a PR, let&#8217;s go over a concrete example and see how each step handles it. Imagine an author opens a PR that has a new python file named cache.py, implementing an in-memory cache for a Python service. But the code has two problems. It has a race condition and a bare except.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pa4m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pa4m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 424w, https://substackcdn.com/image/fetch/$s_!Pa4m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 848w, https://substackcdn.com/image/fetch/$s_!Pa4m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 1272w, https://substackcdn.com/image/fetch/$s_!Pa4m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pa4m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png" width="1456" height="703" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:703,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125405,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.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_!Pa4m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 424w, https://substackcdn.com/image/fetch/$s_!Pa4m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 848w, https://substackcdn.com/image/fetch/$s_!Pa4m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 1272w, https://substackcdn.com/image/fetch/$s_!Pa4m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6958e80-026b-4468-8944-f9e7d810a36d_3254x1572.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">The AI reviewer handles the example PR in three steps: review, merge, and verify.</figcaption></figure></div><p>The author, who may be a coding agent, writes the change and opens a PR. The PR is then handed to the AI reviewer, which reviews it in the following three steps.</p><p><strong>Step 1: Running parallel independent reviews</strong></p><p>The orchestrator fetches the diff and codebase context, then dispatches them to several subagents at once. A subagent builds its own prompt, reviews the full diff in the context of the codebase and its recent changes, and then returns its structured findings.</p><p>Notice that the subagents never see each other&#8217;s findings while they review. If Subagent A could read Subagent B&#8217;s findings first, it would tend to agree, but because the subagents work independently, their agreement counts as evidence.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gAR-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gAR-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 424w, https://substackcdn.com/image/fetch/$s_!gAR-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 848w, https://substackcdn.com/image/fetch/$s_!gAR-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 1272w, https://substackcdn.com/image/fetch/$s_!gAR-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gAR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png" width="1456" height="895" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:895,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:174134,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.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_!gAR-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 424w, https://substackcdn.com/image/fetch/$s_!gAR-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 848w, https://substackcdn.com/image/fetch/$s_!gAR-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 1272w, https://substackcdn.com/image/fetch/$s_!gAR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f51393a-e92d-4790-b94e-6a3821231cdb_3896x2396.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Independent subagent reviews</figcaption></figure></div><p><strong>Step 2: Merging reviews</strong></p><p>The independent subagents from the previous step produce findings. Many of those findings may overlap, pointing to the same issue(s). For example, if three subagents find the same five issues, the author gets fifteen comments for five problems. So the orchestrator has to merge duplicates.</p><p>This can be done in two phases. First, a deterministic check marks findings with overlapping line ranges as candidates, a cheap step that limits the search to the same code. Second, an LLM decides whether each candidate pair describes the same problem. This second phase is necessary to find overlaps semantically because two models usually do not phrase an issue the same way.</p><p>The overlaps also indicate review confidence. If multiple findings merge into a single comment, the engineer is more likely to accept it, so the code reviewer can rank it higher.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J_dU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J_dU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 424w, https://substackcdn.com/image/fetch/$s_!J_dU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 848w, https://substackcdn.com/image/fetch/$s_!J_dU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 1272w, https://substackcdn.com/image/fetch/$s_!J_dU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!J_dU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png" width="1456" height="962" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:962,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:153837,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.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_!J_dU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 424w, https://substackcdn.com/image/fetch/$s_!J_dU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 848w, https://substackcdn.com/image/fetch/$s_!J_dU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 1272w, https://substackcdn.com/image/fetch/$s_!J_dU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bc54187-ce25-4d40-836f-9267f9d2f32a_3214x2124.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Findings merge in two passes</figcaption></figure></div><p>The outcome of this step is a shorter list of findings, with overlapping ones merged into single high-confidence comments. However, we still need to check the findings that only one subagent raised, which is the focus of the last step.</p><p><strong>Step 3: Verifying reviews</strong></p><p>A finding from only one subagent is harder to judge. It might be a real issue the other model missed, but it might also be a hallucination. To find out, the orchestrator sends those to another model to verify against the code. According to LinkedIn&#8217;s post, this often saves real issues [1]. A model that missed an issue, when asked to verify another model&#8217;s finding, confirms the issue is real. Verified findings are then rated for importance.</p><p>When the verifying model contradicts the finding, its confidence score drops. Then, low-scoring findings become candidates for filtering. In addition, findings that are cosmetic, already fixed in a later commit, or against the repository&#8217;s established patterns are suppressed before posting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aPpZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aPpZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 424w, https://substackcdn.com/image/fetch/$s_!aPpZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 848w, https://substackcdn.com/image/fetch/$s_!aPpZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!aPpZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aPpZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png" width="1456" height="503" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:503,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157726,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.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_!aPpZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 424w, https://substackcdn.com/image/fetch/$s_!aPpZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 848w, https://substackcdn.com/image/fetch/$s_!aPpZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!aPpZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96237ea4-23f4-4fd3-92a0-be2e0145c5bf_3858x1332.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Confirmed findings pass a final filter</figcaption></figure></div><p>With multiple agents, layered rules, and a three-step workflow, the system has all the properties we described earlier. It merges several independent reviews into one, verifies the findings, and posts the review.</p><h2>How to Evaluate an AI Code Reviewer</h2><p>Labs and teams owning an AI reviewer system constantly change it. They may swap models, edit prompts, or add something in the harness. To tell whether a change will make the AI reviewer better, you must run evaluations, or evals, which are repeatable tests of an AI reviewer&#8217;s quality.</p><p>In this section, we cover the two phases of running evals for an AI reviewer: before a change is released, and in production after the code merges.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hyeK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hyeK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 424w, https://substackcdn.com/image/fetch/$s_!hyeK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 848w, https://substackcdn.com/image/fetch/$s_!hyeK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 1272w, https://substackcdn.com/image/fetch/$s_!hyeK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hyeK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png" width="1456" height="645" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:645,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:163159,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.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_!hyeK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 424w, https://substackcdn.com/image/fetch/$s_!hyeK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 848w, https://substackcdn.com/image/fetch/$s_!hyeK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 1272w, https://substackcdn.com/image/fetch/$s_!hyeK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96506a0b-af97-4d61-8979-af807b48b470_3328x1474.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Evals run in two phases: before a release and in production.</figcaption></figure></div><h3>Eval before a release</h3><p>Before a change ships, you need to know whether the change will improve things or not. A typical process is to run the production version and the candidate on the same PRs and compare their reviews, either with an LLM judge or against a golden dataset built from human labels.</p><p>With an LLM judge, a separate model takes both reviews of the same PR as inputs, and scores them. This is cheap to run and does not need human labels. You mostly need to have a fixed rubric so the LLM follows a more predictable and reliable path to score the reviews. LinkedIn has a rubric with six weighted yes-or-no criteria, and runs every prompt, model, and harness change through this before they ship.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nJxM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nJxM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 424w, https://substackcdn.com/image/fetch/$s_!nJxM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 848w, https://substackcdn.com/image/fetch/$s_!nJxM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!nJxM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!nJxM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png" width="1456" height="558" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:558,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:218798,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.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_!nJxM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 424w, https://substackcdn.com/image/fetch/$s_!nJxM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 848w, https://substackcdn.com/image/fetch/$s_!nJxM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!nJxM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9818de4-c396-4a5e-a64c-d7d685bc435b_2964x1136.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">An LLM judge scores the production and candidate reviews against the same rubric.</figcaption></figure></div><p>LLM-as-a-judge works well for comparisons [4], but it cannot reliably decide which comments are actually right. A golden dataset fills that gap with known right answers.</p><p>A typical process is to collect real PRs at the point a bug was found, and humans mark which review comments are correct. This becomes our golden dataset. We can score candidates against these labels and measure traditional metrics like precision and recall. LinkedIn has built such a dataset and is now building the eval on top of it, as a complement to its LLM-as-a-judge.</p><h3>Eval in production</h3><p>Pre-release evals run on a sample of PRs or a fixed dataset, so they cannot show how the reviewer performs on thousands of real PRs, or whether engineers find its comments useful. Those kinds of measurements can be obtained only from production. Evaluating an AI reviewer in production relies on two things: the right metrics and a feedback loop.</p><p>The right metrics determine how well your system is doing in production. There are often so many different metrics to track, such as time to first review, cost per review, and how engineers react to comments. But some are more insightful than others. Emoji reactions, for example, are noisy because they say little about whether a comment helped. On the other hand, acceptance rate is a good metric because it checks whether the code changed because of a comment. Balaji explained what counts as acceptance at LinkedIn: &#8220;Not someone giving thumbs up or thumbs down, but the code actually changed.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!518K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!518K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 424w, https://substackcdn.com/image/fetch/$s_!518K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 848w, https://substackcdn.com/image/fetch/$s_!518K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!518K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!518K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:143665,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.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_!518K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 424w, https://substackcdn.com/image/fetch/$s_!518K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 848w, https://substackcdn.com/image/fetch/$s_!518K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!518K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ab50597-7aa0-4495-8329-bc053bcf03c1_2924x1136.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Acceptance counts code that changed.</figcaption></figure></div><p>LinkedIn evaluated their system in production and measured acceptance on thousands of AI comments. As the next figure shows, engineers accepted 63.9% of them [1]. These numbers show that engineers act on most of the AI reviewer&#8217;s comments, with the highest rates on concurrency bugs and dead code (100%) and logic errors (80%).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-7nB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-7nB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 424w, https://substackcdn.com/image/fetch/$s_!-7nB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 848w, https://substackcdn.com/image/fetch/$s_!-7nB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 1272w, https://substackcdn.com/image/fetch/$s_!-7nB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!-7nB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png" width="1456" height="826" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:826,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137115,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.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_!-7nB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 424w, https://substackcdn.com/image/fetch/$s_!-7nB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 848w, https://substackcdn.com/image/fetch/$s_!-7nB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 1272w, https://substackcdn.com/image/fetch/$s_!-7nB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff84b8f8c-973b-43b7-8d1d-ff64ead3bedd_3188x1808.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Acceptance by category</figcaption></figure></div><p>We talked about metrics, but the more important part of evaluation in production is to have a feedback loop: a mechanism that turns those measurements into actual fixes.</p><p>As you measure your system with different metrics, you learn where the gaps are. If you run and measure your system every day, you can close those gaps. For example, LinkedIn now runs its acceptance check daily and produces a trend report of which rules and prompts are gaining or losing acceptance. The team uses it to decide which rules to disable and which prompts to change.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vd8H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vd8H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 424w, https://substackcdn.com/image/fetch/$s_!Vd8H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 848w, https://substackcdn.com/image/fetch/$s_!Vd8H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 1272w, https://substackcdn.com/image/fetch/$s_!Vd8H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vd8H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png" width="1456" height="1145" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1145,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:163076,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.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_!Vd8H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 424w, https://substackcdn.com/image/fetch/$s_!Vd8H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 848w, https://substackcdn.com/image/fetch/$s_!Vd8H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 1272w, https://substackcdn.com/image/fetch/$s_!Vd8H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F923795e6-22eb-43e7-b429-3e682dc4c432_2644x2080.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">A daily loop turns acceptance trends into rule and prompt changes.</figcaption></figure></div><p>That is evaluation. Pre-release evals check whether a change is safe to ship, and the daily loop measures the system in production and improves it over time.</p><h2>What&#8217;s Next</h2><p>In Balaji&#8217;s view, the next bottleneck after review is confidence in the quality of the software as a whole, which takes more than reviewing each PR. He does not expect review to stop being a bottleneck until automated validation is in place. Deploying, monitoring, and handling incidents also take more effort than development, so LinkedIn is aiming AI tools there too. As he put it, &#8220;the faster we are pushing out code, the faster we are potentially breaking production.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WsAT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WsAT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 424w, https://substackcdn.com/image/fetch/$s_!WsAT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 848w, https://substackcdn.com/image/fetch/$s_!WsAT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 1272w, https://substackcdn.com/image/fetch/$s_!WsAT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!WsAT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png" width="1456" height="635" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:635,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:181977,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.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_!WsAT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 424w, https://substackcdn.com/image/fetch/$s_!WsAT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 848w, https://substackcdn.com/image/fetch/$s_!WsAT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 1272w, https://substackcdn.com/image/fetch/$s_!WsAT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14872cec-f635-4402-9380-87225b3edb0a_3214x1402.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Next bottleneck</figcaption></figure></div><p>LinkedIn&#8217;s next step for its AI reviewer is a risk heat map: an optional feature that will score each region of a PR&#8217;s diff by predicted risk so that engineers review the riskiest parts first.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PT00!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PT00!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 424w, https://substackcdn.com/image/fetch/$s_!PT00!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 848w, https://substackcdn.com/image/fetch/$s_!PT00!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 1272w, https://substackcdn.com/image/fetch/$s_!PT00!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!PT00!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png" width="1456" height="710" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:710,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:142547,&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://blog.bytebytego.com/i/223813863?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.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_!PT00!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 424w, https://substackcdn.com/image/fetch/$s_!PT00!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 848w, https://substackcdn.com/image/fetch/$s_!PT00!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 1272w, https://substackcdn.com/image/fetch/$s_!PT00!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3f9e86-dd0f-42de-b752-64bc4860312e_3214x1568.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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">Risk heat map</figcaption></figure></div><h3>References</h3><p>[1] High-Signal AI Code Review That Adapts to Your Codebase at Scale:<a href="https://www.linkedin.com/blog/engineering/ai/high-signal-ai-code-review-that-adapts-to-your-codebase-at-scale"> https://www.linkedin.com/blog/engineering/ai/high-signal-ai-code-review-that-adapts-to-your-codebase-at-scale</a></p><p>[2] 60 million Copilot code reviews and counting:<a href="https://github.blog/ai-and-ml/github-copilot/60-million-copilot-code-reviews-and-counting/"> https://github.blog/ai-and-ml/github-copilot/60-million-copilot-code-reviews-and-counting/</a></p><p>[3] How we built our multi-agent research system:<a href="https://www.anthropic.com/engineering/multi-agent-research-system"> https://www.anthropic.com/engineering/multi-agent-research-system</a></p><p>[4] Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena:<a href="https://arxiv.org/abs/2306.05685"> https://arxiv.org/abs/2306.05685</a></p>]]></content:encoded></item><item><title><![CDATA[EP232: 6 Frequently Used Orchestration Frameworks in an AI system]]></title><description><![CDATA[Orchestration in an AI system manages tasks across agents, handles failures, shared memory and context.]]></description><link>https://blog.bytebytego.com/p/ep232-6-frequently-used-orchestration</link><guid isPermaLink="false">https://blog.bytebytego.com/p/ep232-6-frequently-used-orchestration</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Sat, 07 Nov 2026 16:30:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!3b7A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/aws-bsa_110726">A state-of-the-art, fully assembled agent harness (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/aws-bsa_110726" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OpQ_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 424w, https://substackcdn.com/image/fetch/$s_!OpQ_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 848w, https://substackcdn.com/image/fetch/$s_!OpQ_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 1272w, https://substackcdn.com/image/fetch/$s_!OpQ_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OpQ_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1325806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/aws-bsa_110726&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/222756662?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.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_!OpQ_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 424w, https://substackcdn.com/image/fetch/$s_!OpQ_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 848w, https://substackcdn.com/image/fetch/$s_!OpQ_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 1272w, https://substackcdn.com/image/fetch/$s_!OpQ_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb7aa2b-6862-4499-b2ca-7021d90700cc_2400x1256.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Match or beat harnesses on accuracy with 28% fewer tokens. Strands harness is open source and ships with benchmarked defaults for the system prompt, tools, memory, sessions, and context management, so you can skip wiring up a harness piece by piece.</p><p>Spin it up from the CLI or in a few lines of Python or TypeScript. Nothing is a black box: swap model providers, override any default, or drop down to the SDK primitives with no rewrite. Then validate before you ship with 25+ built-in evaluators.</p><p>From idea to production with fewer tokens wasted.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/aws-bsa_110726&quot;,&quot;text&quot;:&quot;Get started&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/aws-bsa_110726"><span>Get started</span></a></p><div><hr></div><p>This week&#8217;s system design refresher:</p><ul><li><p>6 frequently used orchestration frameworks in an AI system</p></li><li><p>Top 6 Cost Optimization Strategies in AI Systems</p></li><li><p>How a SQL Query Executes Inside a Database</p></li><li><p>How does a request actually travel through Claude Code?</p></li></ul><div><hr></div><h2>6 frequently used orchestration frameworks in an AI system</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3b7A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3b7A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3b7A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3b7A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3b7A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3b7A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!3b7A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3b7A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3b7A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3b7A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fded076f5-1d02-49c3-ac12-adff29fdd143_2484x3002.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Orchestration in an AI system manages tasks across agents, handles failures, shared memory and context. </p><ol><li><p>LangGraph: This uses a graph-based technique where workflows are represented as nodes and edges determine the state transitions.</p></li><li><p>CrewAI: A role-based abstraction technique is used here. Agents are assigned a defined role and goal that enables them to work on the tasks sequentially or via a manager agent . </p></li><li><p>Microsoft Agent Framework: This framework is designed to handle organizational workflows. It also uses graphs with built-in branching, checkpoints, and human intervention pauses.</p></li><li><p>OpenAI Agents SDK: An LLM driven runtime approach is used, where an agent decides whether it should delegate control to other agent or retain execution to complete the task itself.</p></li><li><p>Google ADK: Hybrid control approach is used where a developer defines a strategy to run tasks and a root agent splits and distributes tasks to sub-agents.</p></li><li><p>Claude Agent SDK: No separate layer for orchestration exists. It lives inside an agent which gathers context, works with tools, evaluates and keeps going until no calls left.</p></li></ol><div><hr></div><h2>Top 6 Cost Optimization Strategies in AI Systems</h2><p>Your AI bills can grow quickly. The diagram below shows the top 6 techniques to make your AI system less expensive.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dTMB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dTMB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!dTMB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!dTMB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!dTMB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dTMB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:363822,&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://blog.bytebytego.com/i/222756662?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.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_!dTMB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!dTMB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!dTMB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!dTMB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2136557-40c3-4634-bf2d-70eea7872e73_2484x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Prompt caching: This technique caches stable prefixes like system prompts and tool schemas. This means the model can skip redundant computation on requests with a shared prefix.<br><br>Model routing: A router sends simple queries to a small model and hard requests to a frontier model. Since a lot of queries are simple in practice, this can save a lot of money.<br><br>Batch API: This technique processes large jobs asynchronously by batching the requests first and then sending them. Providers often offer discounts on batch requests.<br><br>Semantic cache: We use an embedding model to cache queries. When there is a hit, the stored answer will be reused instead of calling the model again.<br><br>Trim the context: This technique trims the conversation history. This prevents sending the whole conversation every time, which can be costly.<br><br>Smaller model: We can also use techniques like distillation or quantization to convert a large model into a smaller model.<br><br>Over to you: Which of these techniques are most useful in production?</p><div><hr></div><h2><a href="https://go.bytebytego.com/datadog_110726">INFER/CON: Meet the People Building the AI Stack (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/datadog_110726" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UJ_w!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!UJ_w!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!UJ_w!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!UJ_w!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!UJ_w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png" width="1456" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:780045,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/datadog_110726&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/223804969?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!UJ_w!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!UJ_w!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!UJ_w!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!UJ_w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcfbf01b-b5b2-45fd-8ca3-a9fe97854996_1600x840.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Join AI engineers, researchers, founders, and technical leaders at INFER/CON on November 16 in San Francisco. Convened by Datadog, this one-day conference brings together speakers from Anthropic, Together AI, Inferact, Fireworks AI, and more. Explore inference performance, production reliability, evaluation, and the economics of AI alongside the people building and operating these systems. Expect technical conversations, practical perspectives, and opportunities to connect with peers tackling similar challenges.</p><p>Attendance is free and by application only; all applications are subject to approval.</p><p>Use exclusive code to apply:<strong> Byte/VIP</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/datadog_110726&quot;,&quot;text&quot;:&quot;Apply to attend&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://go.bytebytego.com/datadog_110726"><span>Apply to attend</span></a></p><div><hr></div><h2>How a SQL Query Executes Inside a Database</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VdZe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VdZe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!VdZe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!VdZe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!VdZe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!VdZe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png" width="1456" height="1760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!VdZe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 424w, https://substackcdn.com/image/fetch/$s_!VdZe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 848w, https://substackcdn.com/image/fetch/$s_!VdZe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 1272w, https://substackcdn.com/image/fetch/$s_!VdZe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F044535fb-39e0-4c57-9a11-5f71eaaf2974_2484x3002.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Parse and validate: The database parses the SQL to check it is syntactically correct and the referenced objects, columns, and data types are valid. It converts the SQL into a logical query tree. </p><p>Rewrite and Transform: The database simplifies and restructures the query tree so it can be executed efficiently. </p><p>Optimize and choose a plan: The database evaluates the most efficient way to run the query. It compares different execution plans and selects the best plan that is supposed to use the least time and resources. </p><p>Execute the plan tree: The database runs the selected plan operations, like filtering, joining, and sorting, typically from the bottom of the parse tree to the top to produce the results. </p><p>Access cache and storage: The database retrieves the required data during execution from the cache when it is available or reads from the storage when it is not. </p><p>Return rows: The final result is formatted and sent back to the client.</p><div><hr></div><h2>How does a request actually travel through Claude Code?</h2><p>Most of us type a prompt and watch the magic happen. The diagram below shows what's really going on behind the curtain, based on the Claude Code source code.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yVrf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yVrf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yVrf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yVrf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yVrf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!yVrf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg" width="1270" height="1536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1536,&quot;width&quot;:1270,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yVrf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yVrf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yVrf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yVrf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22c1706-e217-45fb-9156-72ce11785cc1_1270x1536.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Let's trace one real request: "Fix the failing test in auth.test.ts."</p><p>Step 1: The user sends a prompt to Claude Code through their interface.<br>Step 2: The interface (CLI, IDE, or SDK) wraps the prompt with repo and file context and hands it to the agent loop as a request.<br>Step 3: The agent loop plans the next move and proposes an action: Edit(auth.ts, lines 42&#8211;58).<br>Step 4: The permission system checks the proposed action against the rules.<br>Step 5: The approved action becomes a tool call: Edit(auth.ts, patch), dispatched to the matching tool.<br>Step 6: The tool runs in the execution environment (shell, cloud, or sandbox) as a real syscall.<br>Step 7: The execution returns a tool result back to the agent loop.<br>Step 8: The agent persists the turn to state and streams the final message to the user.</p><p>The whole system is just this loop, repeated until the model stops asking for tools.</p><p>Over to you: which step in this loop do you think is the hardest one to get right when building your own coding agent?</p>]]></content:encoded></item><item><title><![CDATA[The Hidden Work Behind Every Database Request]]></title><description><![CDATA[Read amplification, write amplification, and space amplification show the differences between logical work and physical cost.]]></description><link>https://blog.bytebytego.com/p/the-hidden-work-behind-every-database</link><guid isPermaLink="false">https://blog.bytebytego.com/p/the-hidden-work-behind-every-database</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Thu, 05 Nov 2026 16:31:07 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1f8x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Mostly, an application&#8217;s storage system has to do work only when users make requests to that application.</p><p>However, there&#8217;s a difference between the work requested and the work that the storage system has to perform. A storage system does extra work as well, which is equally important. It can help you find data quickly, recover data after a crash, or support concurrent transactions. But this extra work also has a cost. For example, the request might involve reading a small record, but it can require fetching many blocks of data. Or when the user requests an update to some value, it can trigger multiple writes in the storage system. Also, if you want to keep the dataset highly available, it might require much more space than the actual size of the dataset.</p><p>Read amplification, write amplification, and space amplification show the differences between logical work and physical cost. In this article, we&#8217;re going to look at these differences in detail. Here&#8217;s what we will cover:</p><ul><li><p>What is logical work and physical work in a database</p></li><li><p>Read amplification</p></li><li><p>Write amplification</p></li><li><p>Space amplification</p></li><li><p>The amplifications with B-trees</p></li><li><p>The amplifications with LSM trees</p></li><li><p>How indexes and filters use space to avoid reads</p></li><li><p>How compression helps improve amplifications</p></li><li><p>The role of caching</p></li><li><p>The impact of amplification</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_!1f8x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1f8x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!1f8x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!1f8x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!1f8x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1f8x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png" width="1456" height="1686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:409794,&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://blog.bytebytego.com/i/223592718?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.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_!1f8x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 424w, https://substackcdn.com/image/fetch/$s_!1f8x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 848w, https://substackcdn.com/image/fetch/$s_!1f8x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 1272w, https://substackcdn.com/image/fetch/$s_!1f8x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16a08cea-fe3e-4a91-ac3d-77f089040faa_2650x3068.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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><h2>Logical Work and Physical Work</h2>
      <p>
          <a href="https://blog.bytebytego.com/p/the-hidden-work-behind-every-database">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Anthropic Redesigned Source Control]]></title><description><![CDATA[In this article, we&#8217;ll look at the architecture behind Scion.]]></description><link>https://blog.bytebytego.com/p/how-anthropic-redesigned-source-control</link><guid isPermaLink="false">https://blog.bytebytego.com/p/how-anthropic-redesigned-source-control</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Wed, 04 Nov 2026 16:30:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ysBB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/unblocked_110426">A Pile of MCP Connectors Is Not a Context Engine (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/unblocked_110426" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mphN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 424w, https://substackcdn.com/image/fetch/$s_!mphN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 848w, https://substackcdn.com/image/fetch/$s_!mphN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 1272w, https://substackcdn.com/image/fetch/$s_!mphN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mphN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1178097,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/unblocked_110426&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/223344070?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.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_!mphN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 424w, https://substackcdn.com/image/fetch/$s_!mphN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 848w, https://substackcdn.com/image/fetch/$s_!mphN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 1272w, https://substackcdn.com/image/fetch/$s_!mphN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023bcd82-138c-4bbd-8d7c-28933f6c3c20_1600x836.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Your team connected Slack, Jira and GitHub over MCP, and engineers still spend their time steering agents to the right answer. This article looks at why: connectors fetch from one tool at a time, so every agent stitches the pieces together itself, trusts the first doc that looks right, and adds a search to your token bill each time.</p><p>Read what changes when a context engine sits on top of your connectors: the same coding task finished 83% faster at 48% lower cost.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/unblocked_110426&quot;,&quot;text&quot;:&quot;Read the blog post&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/unblocked_110426"><span>Read the blog post</span></a></p><div><hr></div><p>Anthropic has recently reached a point where coding isn&#8217;t the bottleneck for them. Claude is able to do a lot of heavy lifting. It can iterate on research loops. Or optimize complex programs. Or even build new services from scratch.</p><p>However, the main problem Anthropic faces is that the infrastructure they have around writing code is not able to keep up with the amount of code being generated by its agents. Activities like downloading repositories, preparing workspaces, and recording changes are becoming major bottlenecks.</p><p>To solve this problem, the Anthropic engineering team built Scion. You can think of Scion as a source control system that has been designed around a huge repository and clients that are almost always online. In this article, we&#8217;ll look at the architecture behind Scion. Here&#8217;s what we will cover:</p><ul><li><p>How source control works</p></li><li><p>Anthropic&#8217;s problem with source control</p></li><li><p>Why Git couldn&#8217;t solve the problem</p></li><li><p>How Scion works</p></li><li><p>How changes are handled in Scion</p></li><li><p>How Scion caches data</p></li><li><p>How Anthropic scales Scion</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies.</em></p><h2>How Source Control Works</h2><p>As you will already know, a software project is made up of files that change continuously. Developers add features. They correct mistakes and update dependencies. They also sometimes need to recover an earlier version. A source control system records all these changes and lets multiple developers work on the same codebase.</p><p>Let&#8217;s look at a few key terms related to source control.</p><p>A repository contains the project&#8217;s versioned information. Next, you have a commit that denotes a specific version along with other details such as the author, a description, and a history of the earlier commits.</p><p>A branch is used to demarcate a line of development. For example, your main branch signifies the line of code into which you integrate all the reviewed and approved changes. Different developers can work on different branches and combine their code through a merge process.</p><p>The files present on a developer&#8217;s machine are known as the working copy. A checkout process prepares those files for a specific version.</p><p>Lastly, you also have automated systems that rely on source control. Continuous integration (CI) runs processes such as compilation, testing, and other checks when code changes. Each job may need a workspace that contains the appropriate version of the code. Coding agents and research jobs need similar environments.</p><h2>Anthropic&#8217;s Problem with Source Control</h2><p>Anthropic stores a large amount of its code in a monorepo. You can think of a monorepo as a shared repository that contains multiple projects and components. This way, code that is related can share a common history. But it also means that many separate activities might depend on the same source control infrastructure.</p><p>But a large repository is only a part of the story. Anthropic&#8217;s problem is much deeper. They report that merged changes have grown from roughly 2500 per day in May 2026 to more than 30000 per day by September. Meanwhile, the size of its main branch&#8217;s history is close to 100 GB. Even a compressed working copy goes beyond 25 GB.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KypJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KypJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 424w, https://substackcdn.com/image/fetch/$s_!KypJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 848w, https://substackcdn.com/image/fetch/$s_!KypJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!KypJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!KypJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.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;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KypJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 424w, https://substackcdn.com/image/fetch/$s_!KypJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 848w, https://substackcdn.com/image/fetch/$s_!KypJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!KypJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919299f6-ec56-4ed7-bd4e-74cc856d49b7_2048x1152.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://www.anthropic.com/research/redesigning-source-control">Anthropic Research</a></figcaption></figure></div><p>The CI system is doing approximately 25 million checkouts per day. This number is before counting developer environments, agent sandboxes, and research jobs. To be clear, you shouldn&#8217;t think of these checkouts as individual code changes. A single change can spawn many jobs. And each job prepares an environment for doing its work. Ultimately, your infrastructure workload can get much larger than the number of changes being merged.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!99Ax!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!99Ax!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 424w, https://substackcdn.com/image/fetch/$s_!99Ax!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 848w, https://substackcdn.com/image/fetch/$s_!99Ax!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!99Ax!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!99Ax!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.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;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!99Ax!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 424w, https://substackcdn.com/image/fetch/$s_!99Ax!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 848w, https://substackcdn.com/image/fetch/$s_!99Ax!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!99Ax!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65ee6d86-a5c9-4dde-ac5b-a5776f86692e_2048x1152.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://www.anthropic.com/research/redesigning-source-control">Anthropic Research</a></figcaption></figure></div><p>For example, a naive approach to transfer a compressed working copy for every CI checkout can generate more than 600 PB of traffic per day. Therefore, the practical problem Anthropic faces has two sides. One is that the system must be able to accept new changes quickly. Second, it must be able to distribute the code to a huge number of consumers. If you improve only one aspect, the other can become a bottleneck.</p><h2>Why Git Couldn&#8217;t Solve the Problem</h2><p>The local independence of Git becomes quite expensive in this type of workload. As you might know, Git is designed in a way that an ordinary full clone of the codebase can be used as a self-contained repository.</p><p>When the necessary data is locally available, you can use Git to inspect history, compare versions, and create commits without the need to contact a central service. This is a great strength of Git.</p><p>However, Anthropic&#8217;s workload is such that this independence is not valuable. Most of the clients are automated jobs and agents that already depend on network services. At the same time, if you give those clients a good chunk of repository data, it leads to repeated transfer, storage, and maintenance costs.</p><p>To be clear, Git also has ways to reduce those costs. Anthropic used a bunch of these strategies. For example, they use features like shallow clones, sparse checkouts, partial clones, internal mirrors, and repository seeds. Each of these techniques can handle different parts of the problem. For example, a feature like sparse checkout helps deal with files that are part of the workspace.</p><p>The first architecture Anthropic built was around the use of Git. You had jobs start from seeds, obtain additional data through caches, and use layers of repository mirrors. At its peak, the Anthropic engineering team was operating several hundred internal mirrors to distribute traffic. But they had to keep all these mirrors in sync with each other as the repository data changed. Seeds also became outdated as the rate of merging increased. Operations that needed historical data became a lot harder to manage because clients held only partial repository data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xR11!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xR11!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 424w, https://substackcdn.com/image/fetch/$s_!xR11!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 848w, https://substackcdn.com/image/fetch/$s_!xR11!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 1272w, https://substackcdn.com/image/fetch/$s_!xR11!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!xR11!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png" width="1456" height="525" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:525,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139336,&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://blog.bytebytego.com/i/223344070?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.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_!xR11!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 424w, https://substackcdn.com/image/fetch/$s_!xR11!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 848w, https://substackcdn.com/image/fetch/$s_!xR11!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 1272w, https://substackcdn.com/image/fetch/$s_!xR11!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F223355d3-03c0-4bce-bd2c-69f604c03105_4186x1510.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 Anthropic team realized that its workflow already had one authoritative shared repository while the infrastructure supported a lot of independence at the client level. With Scion, they changed this responsibility allocation approach.</p><h2>How Scion Works</h2><p>Scion makes the server responsible for repository operations. It assumes that clients can reach a source control service when they need data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!M2XK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M2XK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 424w, https://substackcdn.com/image/fetch/$s_!M2XK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 848w, https://substackcdn.com/image/fetch/$s_!M2XK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 1272w, https://substackcdn.com/image/fetch/$s_!M2XK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!M2XK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png" width="1456" height="1327" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1327,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:138906,&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://blog.bytebytego.com/i/223344070?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.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_!M2XK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 424w, https://substackcdn.com/image/fetch/$s_!M2XK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 848w, https://substackcdn.com/image/fetch/$s_!M2XK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 1272w, https://substackcdn.com/image/fetch/$s_!M2XK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4922cad2-9eba-4647-842e-74ca5e2fabf9_2416x2202.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 this setup, the server answers historical data queries, calculates diffs, and creates commits. It also performs merges and rebases. The client (known as scn) maintains a limited cache and prepares files on disk. It watches for local filesystem changes and provides an interface for developers and jobs to deal with the service.</p><p>This setup is known as the client-server asymmetry. You can think of it as the client and server having different capabilities and responsibilities. For example, let&#8217;s say you have a tool that needs to find out the change behind a particular line of code. This operation is commonly known as blame. In Scion&#8217;s operating model, the tool asks the service for the answer to its question. It doesn&#8217;t need to assemble enough local history to calculate the answer.</p><p>The same principle applies when you&#8217;ve to create changes. In Git, you have a commit that&#8217;s created locally and later shared through a push. In Scion, you create a commit using a server operation. There&#8217;s no separate push step.</p><p>You might think that such a centralized service uses a single server that contains everything. But that&#8217;s not the case. Anthropic distributes the data and scales the service across machines. There&#8217;s no fully materialized repository on any single individual server. The tradeoff is that you have a strong dependence on service availability and connectivity.</p><h2>How Changes are Handled by Scion</h2><p>Changesets provide a small, durable record of each change. Once you create a commit on the server, you need to ensure that they are accepted efficiently.</p><p>Scion&#8217;s basic unit for managing this is a changeset. You can think of this changeset as a durable record of a change. You can easily construct other useful representations of the repository from this changeset.</p><p>To understand its structure, two terms are important. First is a blob that stores the contents of the file. Second is a tree that describes the contents of the directory. It connects names to files and subdirectories. In Git, a commit points to a root tree that represents the project at that version.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eR5n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eR5n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 424w, https://substackcdn.com/image/fetch/$s_!eR5n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 848w, https://substackcdn.com/image/fetch/$s_!eR5n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 1272w, https://substackcdn.com/image/fetch/$s_!eR5n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!eR5n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png" width="1456" height="1135" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1135,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eR5n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 424w, https://substackcdn.com/image/fetch/$s_!eR5n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 848w, https://substackcdn.com/image/fetch/$s_!eR5n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 1272w, https://substackcdn.com/image/fetch/$s_!eR5n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F579c8dab-ec53-4013-b727-9b6e4784f272_2048x1597.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://www.anthropic.com/research/redesigning-source-control">Anthropic Research</a></figcaption></figure></div><p>A Scion changeset records the files that changed relative to its first parent. This happens together with a reference to their contents. For example, let&#8217;s say you have a change that updates a file named &#8220;docs/guide[dot]md&#8221;, deletes &#8220;src/legacy[dot]rs, and modifies &#8220;tools/build[dot]sh&#8221;. The changeset keeps a record of those file changes and their relevant references. It also keeps the parent information and author details. Here, &#8220;changed files&#8221; doesn&#8217;t mean a sequence of line-by-line patches.</p><p>A merge can also have multiple parents. The first parent gives you the baseline against which Scion records its file changes.</p><p>Changeset metadata is stored in Spanner, which is a distributed database. Compressed file contents are kept in cloud object storage. The root tree is derived by the server rather than being stored directly inside the changeset.</p><p>This way, you can record a change based on the changed data and affected structures. No need to process the whole repository.</p><h2>How Scion Caches Data</h2><p>Using immutable objects makes it easy to use shared caching.</p><p>Scion recognizes its source control objects by their contents. This technique is known as content-addressing. In this approach, you have a hash function that calculates an identifier from the contents of an object. The system can then find that object later using this identifier. If there&#8217;s a change in the content, the new object gets a different ID value.</p><p>This way, your stored objects are immutable. A specific ID continues to refer to the same data. For example, let&#8217;s say you have a cache that contains a particular version of &#8220;parser[dot].rs&#8221;. If you have another job that asks for the same object, the cache can return it without asking another server if the contents have been modified. If there&#8217;s a new version of the file, it means the object is different.</p><p>There are two consequences of this. One is that you can use identical content. Cached historical objects don&#8217;t need freshness checks merely because development is happening somewhere else in the repository.</p><p>Git uses content addressing. But the way Scion differs is in how extensively its service and architecture are organized around asking for and caching these objects.</p><p>Information still changes in the system. For example, let&#8217;s say the name &#8220;main&#8221; moves as changes are integrated. The immutable object that represents a specific version and the mutable name that identifies the latest version require you to treat things differently.</p><h2>How Anthropic Scales Scion</h2><p>Scion scales by combining shared source control APIs with a hierarchy of caches. Its design is such that answering questions is separate from delivering the files needed for a working directory.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ysBB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ysBB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 424w, https://substackcdn.com/image/fetch/$s_!ysBB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 848w, https://substackcdn.com/image/fetch/$s_!ysBB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 1272w, https://substackcdn.com/image/fetch/$s_!ysBB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ysBB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png" width="1456" height="648" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:648,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:188443,&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://blog.bytebytego.com/i/223344070?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.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_!ysBB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 424w, https://substackcdn.com/image/fetch/$s_!ysBB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 848w, https://substackcdn.com/image/fetch/$s_!ysBB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 1272w, https://substackcdn.com/image/fetch/$s_!ysBB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbf6a96d-e5e3-4877-a6ea-e125f1204b3d_4024x1790.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 first point is that repository operations move into a shared service. Many tools need information such as which changes affected a file, who modified a line, and so on. If you&#8217;ve to maintain a local repository to answer such questions, it creates a lot of downloading and maintenance work.</p><p>Scion exposes these operations through APIs. You can have clients ask the servers directly. The servers can compute derived data when needed and save those results to Spanner. With this, any jobs that only need these answers don&#8217;t have to prepare a local repository.</p><p>Second, you have immutable objects that make caching pretty simple. As we saw earlier, Scion identifies objects using hashes based on their contents. An existing ID always refers to the same data.</p><p>Third, clients only request the objects they need. Scion represents directory structure through trees and file contents through blobs. The client identifies what is missing. So the server receives explicit object requests rather than having to think about a customized transfer.</p><p>Fourth, by sharing caches, they reduce the need for repeated downloads and computation. On a compute node, jobs talk to &#8220;scion-daemon&#8221;. You can think of it as a background process that shares cached objects across jobs.</p><p>Any missing objects come from &#8220;scion-cache&#8221;. This is the regional caching layer that&#8217;s shared across many nodes. If that layer also misses, you can get the data from authoritative Scion servers that read from Spanner or cloud storage.</p><p>Lastly, you also have strict cache boundaries that help contain failures. All three layers support the same object-request interface. Otherwise, a regional cache that fails could cause its consumers to overwhelm the authoritative servers.</p><h2>Conclusion</h2><p>The Anthropic engineering team learnt a lot of important lessons while building and running Scion.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vj69!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vj69!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 424w, https://substackcdn.com/image/fetch/$s_!Vj69!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 848w, https://substackcdn.com/image/fetch/$s_!Vj69!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!Vj69!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vj69!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png" width="1456" height="1776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1776,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vj69!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 424w, https://substackcdn.com/image/fetch/$s_!Vj69!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 848w, https://substackcdn.com/image/fetch/$s_!Vj69!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!Vj69!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ed52207-5ae9-439b-a9e3-fc961552b2d4_1679x2048.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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"><strong>Source: </strong><a href="https://www.anthropic.com/research/redesigning-source-control">Anthropic Research</a></figcaption></figure></div><p>First was that rapid development is very possible with a small team. For reference, it was just a team of seven people that built both Scion and Antique (which is their code review tool).</p><p>The second takeaway was that developers are still valuable, but their scope of work is changing. All of the developers working on this system would rate Claude as better at writing code than they are. But the developers were critical in providing invaluable understanding of the high-level inter-system components and considering the trade-offs in the design decisions. A lot of the developer work revolved around stopping Claude from taking a certain path.</p><p>Third, they were able to make things more optimized and also deliver high-quality stuff. Due to Claude&#8217;s ability to write a ton of code much faster than human developers, Scion is among the most well-tested and well-defended codebases they&#8217;ve ever created.</p><p>Fourth, they were able to achieve a new level of operational excellence. The team uses Claude Tag heavily so that they can monitor each component of the system.</p><p><strong>References:</strong></p><ul><li><p><a href="https://www.anthropic.com/research/redesigning-source-control">Redesigning source control at Anthropic</a></p></li><li><p><a href="https://git-scm.com/docs">Git Reference</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[How Netflix Uses AI Agents for Performance Engineering]]></title><description><![CDATA[The Netflix engineering team has developed an autonomous performance agent system. In this article, we&#8217;ll be learning more about it.]]></description><link>https://blog.bytebytego.com/p/how-netflix-uses-ai-agents-for-performance</link><guid isPermaLink="false">https://blog.bytebytego.com/p/how-netflix-uses-ai-agents-for-performance</guid><dc:creator><![CDATA[ByteByteGo]]></dc:creator><pubDate>Tue, 03 Nov 2026 16:31:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uk-_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><a href="https://go.bytebytego.com/datadog_110326">The real benefits of end-to-end observability (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/datadog_110326" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AhGz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!AhGz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!AhGz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!AhGz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AhGz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156679,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/datadog_110326&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/222755655?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.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_!AhGz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!AhGz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!AhGz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!AhGz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff6acab-5dfa-413b-b839-cf5b13501afc_1200x628.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>How does full-stack observability impact engineering speed, incident response, and cost control?</p><p>In this eBook from Datadog, you&#8217;ll learn how real teams across industries are using observability to:</p><ul><li><p>Reduce mean time to resolution (MTTR)</p></li><li><p>Cut tooling costs and improve team efficiency</p></li><li><p>Align business and engineering KPIs</p></li></ul><p>See how unifying your stack leads to faster troubleshooting and long-term operational gains.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/datadog_110326&quot;,&quot;text&quot;:&quot;Download the eBook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/datadog_110326"><span>Download the eBook</span></a></p><div><hr></div><p>Performance engineering is the discipline in which you design, analyze, and optimize software systems so that they run quickly. Also, they should use resources efficiently. In distributed architectures, the focus of any performance engineering activity is on shaving milliseconds off response times. Or locating execution bottlenecks in CPU or memory. Or making sure infrastructure costs are kept under control.</p><p>Historically, performance engineering work has been slow. And manual. You often depend on a small group of really skilled developers. However, with the rise of AI-assisted software development, there&#8217;s a contradiction. Developers can write and ship code faster than ever. No matter what their skill level may be. But that code often introduces subtle performance problems.</p><p>To solve this problem, the Netflix engineering team has developed an autonomous performance agent system. In this article, we&#8217;ll be learning more about it. Here&#8217;s what we will cover:</p><ul><li><p>Bottlenecks for traditional performance work</p></li><li><p>The problem with AI-Generated code</p></li><li><p>Can LLMs handle profile data</p></li><li><p>The agentic profiling pipeline</p></li><li><p>The problems Netflix found in production</p></li><li><p>Safety, verification, and trust architecture</p></li><li><p>Shifting left</p></li></ul><p style="text-align: justify;"><em>Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies.</em></p><h2>Bottlenecks For Traditional Performance Work</h2><p>Traditional performance engineering work at Netflix was built on a highly iterative loop that is pretty much manual in nature.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uk-_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uk-_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 424w, https://substackcdn.com/image/fetch/$s_!uk-_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 848w, https://substackcdn.com/image/fetch/$s_!uk-_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 1272w, https://substackcdn.com/image/fetch/$s_!uk-_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!uk-_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png" width="1456" height="1220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1220,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:176693,&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://blog.bytebytego.com/i/222755655?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.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_!uk-_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 424w, https://substackcdn.com/image/fetch/$s_!uk-_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 848w, https://substackcdn.com/image/fetch/$s_!uk-_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 1272w, https://substackcdn.com/image/fetch/$s_!uk-_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa461266-54bb-4caa-87bd-44e62109da52_2432x2038.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>First, you trigger profiling for an application. A developer tries to detect high latency or increased resource usage by triggering a profiler on a live production server.</p><p>In the second step, the profiler outputs raw trace data or flame graphs. The developer downloads these details to their local machine.</p><p>Third, the developer spends time looking at complex, color-coded flame graphs. They try to spot wide stack frames that might show signs of higher-than-normal CPU or memory consumption.</p><p>Next, the developer goes through the codebase looking for cryptic method names found in the flame graph. They try to make sense of the surrounding application logic to figure things out.</p><p>Fifth, the developer traces the execution path and identifies the inefficient operation. They write a proposed patch to fix the operation.</p><p>Moving further, the developers deploy the patch to an environment where any change in performance levels can be measured.</p><p>At the end, when new code paths are deployed in production, the developer starts the manual process once again.</p><p>As you may have noticed, this workflow doesn&#8217;t scale. Everything depends on a few domain experts who have a deep sense of understanding about low-level execution stacks. Since human attention is a scarce resource, you can investigate performance issues only for major incidents or obvious system slowdowns. Smaller but steady resource drains go unnoticed.</p><div><hr></div><h2><a href="https://go.bytebytego.com/warpbuild_110326">Why Braintrust, Raycast and Jane Street use WarpBuild (Sponsored)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://go.bytebytego.com/warpbuild_110326" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XUMB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!XUMB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!XUMB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!XUMB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!XUMB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png" width="1456" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:104824,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://go.bytebytego.com/warpbuild_110326&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytebytego.com/i/222755655?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.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_!XUMB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!XUMB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!XUMB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!XUMB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02e5fb7-c8c4-4a9b-bba1-0fd863850cbb_1600x840.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Fast-moving teams ship more code than ever, and AI tools add even more. Their CI has to keep up without the bill getting out of hand.</p><p>That is why teams at Braintrust, Raycast, OpenRouter, Comcast and Jane Street run GitHub Actions on WarpBuild:</p><ul><li><p>Twice as fast at half the cost</p></li><li><p>Linux, macOS and Windows on x86-64 and ARM64</p></li><li><p>Unlimited macOS concurrency</p></li><li><p>One line change to runs-on</p></li></ul><p>Use code START50 for $50 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://go.bytebytego.com/warpbuild_110326&quot;,&quot;text&quot;:&quot;Try WarpBuild free&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://go.bytebytego.com/warpbuild_110326"><span>Try WarpBuild free</span></a></p><div><hr></div><h2>The Problem with AI Code</h2><p>The use of AI coding assistants has increased performance problems. There are two main reasons for this. The speed trap and the context gap.</p><p>Developers who are using AI tools can generate and ship code up to 10 times faster than before. No matter their skill level or knowledge of the system. But you cannot guarantee that code that is fast to generate also performs well. While your average developer might be able to write 10K lines of code in a few minutes, the team might have to spend years debugging regressions. Or dealing with code bloat. Or handling other architecture-related problems.</p><p>Also, if you&#8217;ve noticed, LLMs are great at syntax and local-level logic. If you ask an LLM to write a function or an API endpoint, it writes code that compiles successfully and runs without any obvious errors. It might also pass standard unit tests. However, the LLM has no idea about the host platform&#8217;s runtime environment.</p><p>For example, you can&#8217;t expect the LLM to know that a particular utility function being used in your code might run 10 million times per second on a critical request path. It cannot see the overall call stack. Neither can it understand memory allocation challenges that might exist inside a container running at peak load within your platform. Therefore, the code you write might appear good enough in isolation. But it can still waste a huge amount of resources when you run it at scale.</p><h2>Can LLMs Handle Profile Data</h2><p>Netflix wanted to test whether automation could remove these issues. They set up an experiment to find out if an LLM can read and make sense of raw profiling data directly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jm17!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jm17!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 424w, https://substackcdn.com/image/fetch/$s_!Jm17!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 848w, https://substackcdn.com/image/fetch/$s_!Jm17!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 1272w, https://substackcdn.com/image/fetch/$s_!Jm17!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jm17!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png" width="1456" height="890" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:890,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:235731,&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://blog.bytebytego.com/i/222755655?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.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_!Jm17!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 424w, https://substackcdn.com/image/fetch/$s_!Jm17!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 848w, https://substackcdn.com/image/fetch/$s_!Jm17!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 1272w, https://substackcdn.com/image/fetch/$s_!Jm17!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe791ea9f-247d-4cc5-bc29-5f800a035695_3292x2012.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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>Different languages have different profilers. But they use a shared language and store the same core information. For example, JVM&#8217;s async-profiler or Java Flight Recorder operates at 100 Hz sampling to capture execution traces, memory allocation rates, and thread lock contention. Python&#8217;s py-spy provides low-overhead, async stack sampling of live production processes. Go has pprof, which generates goroutine profiles, heap snapshots, and block contention data.</p><p>Each one of these profilers breaks down execution into call stacks. They track two main metrics. First, you have the inclusive time. This is the total time spent executing a function. It includes every child function and the subroutines called by this function. Second, you have the Self (CPU) Time. It&#8217;s the time spent running code purely inside the function itself. No external calls are involved.</p><p>With this exercise, the Netflix engineering team came to the conclusion that a single analytical pipeline could understand data from almost any programming runtime.</p><p>Another advantage of LLMs is that they don&#8217;t have to guess how an algorithm works from scratch. Since LLMs have been broadly trained on many software repositories, they are mostly familiar with classic programming anti-patterns. For example, they know that quadratic loops where a hot method is called again and again for each item in a collection aren&#8217;t a good idea. Also, loop invariants where you compute a calculation for every iteration of the loop instead of making the calculation once at the beginning. Other patterns include excessive object allocation on hot execution paths and &#8220;N+1&#8221; query patterns.</p><p>Due to this knowledge base of LLMs, you don&#8217;t need to ask an AI model to guess why an application might be performing poorly. You can build a workflow that asks the model to pattern-match known performance bugs against actual call stacks.</p><h2>The Agentic Profiling Pipeline</h2><p>Netflix built an automated performance system that wraps the LLM inside a well-defined pipeline.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fpfx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fpfx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 424w, https://substackcdn.com/image/fetch/$s_!Fpfx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 848w, https://substackcdn.com/image/fetch/$s_!Fpfx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 1272w, https://substackcdn.com/image/fetch/$s_!Fpfx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fpfx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png" width="1456" height="811" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:811,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:218745,&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://blog.bytebytego.com/i/222755655?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.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_!Fpfx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 424w, https://substackcdn.com/image/fetch/$s_!Fpfx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 848w, https://substackcdn.com/image/fetch/$s_!Fpfx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 1272w, https://substackcdn.com/image/fetch/$s_!Fpfx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937b41ad-bfbf-411c-9061-fbd0fbfad501_3472x1934.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 key lesson Netflix engineers learnt during this implementation was about scoping. If you feed an LLM a complete, raw stack trace without boundaries, it can get distracted. Often, the model spends a lot of reasoning tokens analyzing internal JVM garbage collection pauses, low-level Linux kernel syscalls, or even 3rd party open-source framework overhead.</p><p>Application developers don&#8217;t have any control over such internal library concerns or OS routines. Therefore, you need to provide the agent with strict package prefix rules. This way, the model can ignore generic platform noise and focus on tracing only the specific application code.</p><h2>The Problems Netflix Found in Production</h2><p>When the Netflix engineering team deployed the profiling pipeline against its production service, the agent found 4 major categories of performance bugs.</p><p>First was an algorithmic bottleneck that wasted 8.8% of CPU resources. The agent found an aggregation method using Java Streams where an immutable map was updated inside a reduction step.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;d63f2803-e9e6-4387-8704-107f424e97ce&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">// Anti-pattern: O(N^2) accumulation inside stream reduction
stream().reduce(ImmutableMap.of(), (acc, val) -&gt; {
    return ImmutableMap.builder()
        .putAll(acc) // Copies every existing entry on every single step
        .put(val)
        .build();
});</code></pre></div><p>Since putAll(acc) copies every existing key-value pair on every step, you need to copy elements again and again to build a map of size N. This results in quadratic complexity.</p><p>The agent modified the quadratic builder reduction with a linear collection approach.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;8b69c361-428c-4324-a99a-462ed700093f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">// Optimized: O(N) single-pass collection
stream()
    .flatMap(e -&gt; e.entrySet().stream())
    .collect(toMap(Entry::getKey, Entry::getValue));</code></pre></div><p>The second category was about regular expressions on the hot path. In a service, the developer had to sanitize incoming request strings by modifying characters that weren&#8217;t allowed. The earlier implementation ran a raw regular expression substitution on every request.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;875d0767-aa20-4bf2-a681-1095943ac5ae&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">// Anti-pattern: Dynamic regex evaluation per request
String sanitized = input.replaceAll(&#8221;[^a-zA-Z0-9.-]&#8221;, &#8220;_&#8221;);</code></pre></div><p>As you might know, evaluating regular expressions involves parsing and state-machine transitions. This logic on high-volume traffic used 46% of the service&#8217;s CPU time.</p><p>The agent replaced the regex evaluation with a pre-computed lookup table that checked characters by index. The execution got 22 times faster.</p><p>The next category was related to unnecessary object allocation that caused OOM crashes. A service frequently checked whether incoming data payloads contained specific metadata fields. To perform the check, the code was creating a new, heavy HashSet on every incoming call.</p><p>However, the underlying data object already had an internal lookup method available. Also, instantiating millions of such objects consumed 47% of the service&#8217;s total heap collections.</p><p>The agent fixed this issue by removing the redundant object instantiations and modified the code to reuse the cached method.</p><p>The next category was around library misuse. For example, the discovery involved metric telemetry instrumentation. One of the services tracked operations by looking up a counter from a metric registry on every single call.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;be7bea9a-ecba-4bfb-9c79-25372495862f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">// Anti-pattern: Looking up metric instances on every function execution
Metrics.counter(&#8221;request.count&#8221;).increment();</code></pre></div><p>When the query was sent to the registry, it needed dictionary lookups and internal synchronization locks. The profiler showed that the work consumed 66% of the CPU, whereas the actual business logic used only 0.3%.</p><p>The agent fixed it by caching the metric counter reference at the time of class initialization. Also, it found that the same issue was happening across three independent services.</p><h2>Safety, Verification, and Trust Architecture</h2><p>If you have an AI agent that can optimize code, it&#8217;s quite dangerous if the changes are applied without automatic verification. If the agent makes a change that breaks business logic, it&#8217;s worse than inefficient code.</p><p>To prevent regressions, the agentic pipeline uses the standard SDLC.</p><p>In stage 1, you verify the logic. Before you move any code, the agent&#8217;s branch must pass all existing unit, integration, and contract tests. This is to make sure that the changes made by the change don&#8217;t alter basic inputs, outputs, or handling of edge cases.</p><p>In stage 2, you have the canary deployment. If the tests pass, the pipeline spins up a canary deployment in production. The canary instance gets a portion of the traffic. It runs side-by-side with an identical baseline instance that runs the original code.</p><p>Stage 3 is about generating the observability report. The platform collects hard telemetry metrics over a big enough window. Some metrics are relative CPU utilization, median latency, P99 latency, and memory allocation rates. They also don&#8217;t use any AI model to check the canary results.</p><p>In stage 4, you have the final engineering decision. When the canary version shows a good level of performance improvement with zero increase in error rates, the system opens a PR. This PR goes for human review. It includes the code change, the original flame graph, and the canary report. The final decision on deploying the change to production is taken by the human developer.</p><h2>Shifting Left</h2><p>Automated production profiling is quite effective. But if you just rely on it, you end up exposing several limitations.</p><p>By the time an agent finds an anti-pattern in production, you&#8217;ve already paid for days or weeks of wasted compute capacity.</p><p>Second, developers are anyway cautious about changing a running service. If you have a service that handles production traffic without crashing, the developers hesitate to just make changes for the sake of optimization.</p><p>Lastly, multiple teams often make the exact same mistakes when it comes to patterns. If you run a super-expensive agent on 10 different services just to find the same problem, it&#8217;s not very efficient.</p><p>These limitations led to Netflix making the decision to shift performance checks left into the early development cycle. Also, they wanted the agents to share their findings across the entire engineering organization.</p><p>However, as you might know, language models are stateless. Every time you send a prompt to an LLM, it starts with a clean slate. It might no retain any memory of the bug it found some time back in another service. The Netflix engineering team built a Pattern Catalog to make the models achieve persistence. This was done by pairing a stateless LLM with a stateful catalog. Or a shared memory across the fleet.</p><p>The Pattern Catalog was built around 4 key principles.</p><ul><li><p>First, it has to be centralized and serve as the single source of truth for all engineering teams. This way, no two teams end up debugging the same issues.</p></li><li><p>The second principle is that the same catalog entries should work across distinct environments. For example, offline profiling, CI/CD pull request checks, and local development tools.</p></li><li><p>Third, you need to format entries so that an automation script can easily inject them into an LLM&#8217;s system prompt.</p></li><li><p>Lastly, the contents of the catalog should be reviewable by human developers.</p></li></ul><p>To implement the Pattern Catalog, the Netflix engineering team used a simple Git repository filled with plain Markdown files. They didn&#8217;t use vector databases or complex knowledge stores. The idea was borrowed from the &#8220;LLM-wiki&#8221; concept popularized by Andrej Karpathy.</p><p>By using a standard Git repository, the developers got several advantages. For one, developers can diff changes, open pull requests, and use git features to find out why an entry was created. It also scales well to 100s of detailed performance rules without the need for complex search infrastructure. Lastly, plain Markdown is easy for both humans and language models to read without translation layers.</p><h2>How Netflix Catches Problems Early</h2><p>With the Pattern Catalog in place, Netflix can handle performance engineering via two paths. Reactive and Proactive.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zz8C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zz8C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 424w, https://substackcdn.com/image/fetch/$s_!zz8C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 848w, https://substackcdn.com/image/fetch/$s_!zz8C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 1272w, https://substackcdn.com/image/fetch/$s_!zz8C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!zz8C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png" width="1456" height="921" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:921,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:245211,&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://blog.bytebytego.com/i/222755655?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.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_!zz8C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 424w, https://substackcdn.com/image/fetch/$s_!zz8C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 848w, https://substackcdn.com/image/fetch/$s_!zz8C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 1272w, https://substackcdn.com/image/fetch/$s_!zz8C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b9b4997-595e-4a9f-9b67-fffaba0aca9c_3592x2272.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 the reactive path, your system profiles production services on a recurring schedule or on demand. When the agent finds a new bottleneck, it tests the fix on a canary instance. If everything goes fine, the patch is merged, and the agent documents the new finding in the Pattern Catalog.</p><p>In the proactive path, the process starts when a developer creates a new PR. CI tooling performs a fast regex or symbol match against the Pattern Catalog index. If the code in the PR matches known anti-patterns, the CI bot calls an LLM and provides it with the pull request diff. The LLM checks the context and leaves an inline comment that explains the inefficiency. It shows the resource impact and suggests a fix. All this happens before the code ever merges to the main branch.</p><h2>Conclusion</h2><p>The key learning from the Netflix engineering experience is that automating performance engineering work is not an all-or-nothing game. You can have organizations adopt workflows along a four-level maturity spectrum.</p><p>Level 0 is the manual situation. This is the level where machine learning is not used. Human developers manually capture traces, interpret flame graphs, and trace code paths.</p><p>Level 1 is the assist approach. This is the entry point for AI adoption. The LLM acts as an analytical copilot. A developer initiates the profiling process. But they don&#8217;t spend time studying flame graphs. Instead, they feed the stack dump to the model. The model finds the hot execution path.</p><p>Level 2 is the orchestration level. This is the current state at Netflix. A lot of proactive scanning happens. Also, they use the Pattern Catalog.</p><p>Level 3 is the fully autonomous level. This is the long-term vision at Netflix for performance agents. At Level 3, the agents will create their own optimization strategies. They will explore multiple alternative implementations. Or run automated benchmarks.</p><p><strong>References:</strong></p><ul><li><p><a href="https://p99conf.io/session/the-autonomous-performance-agent-a-netflix-production-story/">A Netflix Production Story - P99 Conference</a></p></li></ul>]]></content:encoded></item></channel></rss>