<?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[Daily Dose of Data Science]]></title><description><![CDATA[A free newsletter for continuous learning about data science and ML, lesser-known techniques, and how to apply them in 2 minutes. We keep things no-fluff.

Join 100,000+ data scientists from top companies like Google, NVIDIA, Microsoft, Uber, etc.]]></description><link>https://blog.dailydoseofds.com</link><image><url>https://substackcdn.com/image/fetch/$s_!heKx!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5dc1fee-2d1e-4892-b219-4b96f6998ab5_288x288.png</url><title>Daily Dose of Data Science</title><link>https://blog.dailydoseofds.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 11 Aug 2026 16:48:34 GMT</lastBuildDate><atom:link href="https://blog.dailydoseofds.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Avi Chawla]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[avi@dailydoseofds.com]]></webMaster><itunes:owner><itunes:email><![CDATA[avi@dailydoseofds.com]]></itunes:email><itunes:name><![CDATA[Avi Chawla]]></itunes:name></itunes:owner><itunes:author><![CDATA[Avi Chawla]]></itunes:author><googleplay:owner><![CDATA[avi@dailydoseofds.com]]></googleplay:owner><googleplay:email><![CDATA[avi@dailydoseofds.com]]></googleplay:email><googleplay:author><![CDATA[Avi Chawla]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How to Query Billion+ Rows on Postgres Without the Overhead]]></title><description><![CDATA[...explained as a full setup guide.]]></description><link>https://blog.dailydoseofds.com/p/how-to-query-billion-rows-on-postgres</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/how-to-query-billion-rows-on-postgres</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Mon, 10 Aug 2026 13:48:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RGTf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p>How to query billion+ rows on postgres without overhead.</p></li><li><p>&#8203;Cross-model KV cache transfer in LLM families&#8203;.</p></li></ul><div><hr></div><h3><a href="https://fandf.co/4fHmscZ">How to query billion+ rows on postgres without the overhead</a></h3><p>Robert Cepa&#8217;s team at Cloudflare spent two years patching Postgres before they found a database that cut their query times by up to 35x.</p><p>Plain Postgres held up fine until the dataset hit billions of rows, and querying across longer time windows became the bottleneck. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7OXf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7OXf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 424w, https://substackcdn.com/image/fetch/$s_!7OXf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 848w, https://substackcdn.com/image/fetch/$s_!7OXf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 1272w, https://substackcdn.com/image/fetch/$s_!7OXf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7OXf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png" width="1456" height="740" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:740,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1221492,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.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_!7OXf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 424w, https://substackcdn.com/image/fetch/$s_!7OXf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 848w, https://substackcdn.com/image/fetch/$s_!7OXf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 1272w, https://substackcdn.com/image/fetch/$s_!7OXf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58e96654-9fc3-497d-9df6-0eac44075b8b_1688x858.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>They manually built precomputed aggregates with cron jobs, then evaluated ClickHouse, which required a full ingestion pipeline just to handle their write pattern cleanly.</p><p><strong><a href="https://fandf.co/4fHmscZ">The full Cloudflare case study is available here if you want to learn more &#8594;</a></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yzjD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yzjD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 424w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 848w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1272w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yzjD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png" width="1125" height="795" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:795,&quot;width&quot;:1125,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106830,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.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_!yzjD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 424w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 848w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1272w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 teams face the same bottlenecks and end up spending months on partition management, aggregation pipelines, and retention infrastructure before the actual product gets any attention.</p><p><strong><a href="https://fandf.co/4yoUZFx">Tiger Cloud</a></strong> is built for exactly that layer. It is a managed TimescaleDB service, the same technology Cloudflare moved to, built on the Postgres you already know, with automatic time-based partitioning, continuous aggregates, and compression built in from the start.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RGTf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RGTf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 424w, https://substackcdn.com/image/fetch/$s_!RGTf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 848w, https://substackcdn.com/image/fetch/$s_!RGTf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 1272w, https://substackcdn.com/image/fetch/$s_!RGTf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RGTf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png" width="1456" height="685" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75694f25-937d-456a-af02-886c04be7025_1756x826.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:685,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:295530,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.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_!RGTf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 424w, https://substackcdn.com/image/fetch/$s_!RGTf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 848w, https://substackcdn.com/image/fetch/$s_!RGTf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 1272w, https://substackcdn.com/image/fetch/$s_!RGTf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75694f25-937d-456a-af02-886c04be7025_1756x826.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 show how this feels in practice, I built a real-time earthquake intelligence dashboard on a 3D globe using Claude Code and Tiger Cloud in a single session. </p><p>But before that, let&#8217;s understand the problem.</p><h4>The problem with time-series data</h4><p>Most applications that deal with timestamped data start the same way. </p><p>You create a table, add a timestamp column, and plain Postgres handles it fine.</p><p>When the table grows into hundreds of millions of rows and queries start filtering across long time windows, Postgres slows down.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uc0P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uc0P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 424w, https://substackcdn.com/image/fetch/$s_!uc0P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 848w, https://substackcdn.com/image/fetch/$s_!uc0P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 1272w, https://substackcdn.com/image/fetch/$s_!uc0P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uc0P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png" width="1456" height="890" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.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;:1266064,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.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_!uc0P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 424w, https://substackcdn.com/image/fetch/$s_!uc0P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 848w, https://substackcdn.com/image/fetch/$s_!uc0P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 1272w, https://substackcdn.com/image/fetch/$s_!uc0P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd726c2-e8b2-4c56-b979-7d4e47f256ba_1522x930.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Postgres does have time-based partitioning, but nothing creates or retires those partitions for you, so splitting a growing table by day or month is a system you have to build and maintain yourself. The more data accumulates, the worse queries over longer time windows get.</p><p>Adding indexes on the timestamp column helps initially, but as the table keeps growing, those indexes become expensive to maintain, and the query planner starts making poor choices.</p><h4>The cost of building it yourself</h4><p>Most teams end up manually splitting data into child tables by day or month.</p><p>That means building tooling to create new partitions on schedule, handle edge cases at boundaries, and drop old ones when retention policies kick in.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lrei!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lrei!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 424w, https://substackcdn.com/image/fetch/$s_!Lrei!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 848w, https://substackcdn.com/image/fetch/$s_!Lrei!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 1272w, https://substackcdn.com/image/fetch/$s_!Lrei!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lrei!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png" width="1456" height="929" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:929,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1379411,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.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_!Lrei!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 424w, https://substackcdn.com/image/fetch/$s_!Lrei!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 848w, https://substackcdn.com/image/fetch/$s_!Lrei!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 1272w, https://substackcdn.com/image/fetch/$s_!Lrei!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc964278d-1785-4cd0-817b-6650c677c7f2_1476x942.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Dashboards need event counts per hour, weekly averages, and trends across months. Computing those on raw data gets expensive fast, so teams build precomputed aggregate tables and refresh them with cron jobs.</p><p>Every schema change after that means updating the cron logic and coordinating across teams.</p><p>Cloudflare spent two years in exactly that cycle before the data outgrew it, and they had to rebuild the layer underneath.</p><h4>How Tiger Cloud handles it</h4><p>Tiger Cloud takes a different approach entirely.</p><p>TimescaleDB partitions data by timestamp automatically through hypertables. </p><p>Converting any Postgres table to a hypertable takes a single function call, and time-based partitioning runs from that point forward.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mTyb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mTyb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 424w, https://substackcdn.com/image/fetch/$s_!mTyb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 848w, https://substackcdn.com/image/fetch/$s_!mTyb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 1272w, https://substackcdn.com/image/fetch/$s_!mTyb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mTyb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png" width="1456" height="877" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:877,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1501876,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.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_!mTyb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 424w, https://substackcdn.com/image/fetch/$s_!mTyb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 848w, https://substackcdn.com/image/fetch/$s_!mTyb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 1272w, https://substackcdn.com/image/fetch/$s_!mTyb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5abb7faf-0505-40a3-9a21-cf113d62341d_1584x954.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Queries hit only the chunks relevant to the time window being filtered, regardless of how large the full dataset gets.</p><p>Continuous aggregates replace the cron job layer. You define a rollup query once, and TimescaleDB refreshes it incrementally in the background, including the most recent data not yet rolled up, with no separate pipeline to maintain.</p><p>Tiger Cloud provisions all of this as a managed service. You connect through the standard Postgres wire protocol, and the infrastructure is ready from day one.</p><h4>Setup</h4><p>Tiger CLI is the bridge between Claude Code and Tiger Cloud. It runs as an MCP server that gives Claude Code direct access to your database infrastructure.</p><p>Start by signing up at <strong><a href="https://fandf.co/4yoUZFx">tigerdata.com</a></strong> and creating an account.</p><p>Then install Tiger CLI with one command.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;359850fe-25e2-4379-99b0-164e309f14d9&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">curl -fsSL https://cli.tigerdata.com | sh</code></pre></div><p>Once installed, authenticate with your Tiger Cloud account. This opens a browser window, and the CLI stores your session locally after you log in.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;26ca8cf4-d803-4d1e-8440-8a6a049d4078&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">tiger auth login</code></pre></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A4pw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A4pw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 424w, https://substackcdn.com/image/fetch/$s_!A4pw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 848w, https://substackcdn.com/image/fetch/$s_!A4pw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 1272w, https://substackcdn.com/image/fetch/$s_!A4pw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A4pw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png" width="468" height="425.9253112033195" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1316,&quot;width&quot;:1446,&quot;resizeWidth&quot;:468,&quot;bytes&quot;:310117,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.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_!A4pw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 424w, https://substackcdn.com/image/fetch/$s_!A4pw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 848w, https://substackcdn.com/image/fetch/$s_!A4pw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 1272w, https://substackcdn.com/image/fetch/$s_!A4pw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97e128f0-8bd7-411e-8445-dab6fa514cd5_1446x1316.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Now, connect Tiger CLI to Claude Code as an MCP server.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;3e2cf5d9-a7cf-4259-9f2f-2181bbbd7b38&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">tiger mcp install claude-code</code></pre></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Kkgc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Kkgc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 424w, https://substackcdn.com/image/fetch/$s_!Kkgc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 848w, https://substackcdn.com/image/fetch/$s_!Kkgc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!Kkgc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Kkgc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png" width="1456" height="1215" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1215,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1532674,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.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_!Kkgc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 424w, https://substackcdn.com/image/fetch/$s_!Kkgc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 848w, https://substackcdn.com/image/fetch/$s_!Kkgc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!Kkgc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5143e-5a19-45d3-a78d-ca2f803aa24e_1522x1270.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Restart Claude Code after that. </p><p>Tiger Cloud shows up as a connected tool in the session, and Claude Code can now provision databases, create hypertables, and run SQL directly against your Tiger Cloud instance without leaving the conversation.</p><h4>Building the dashboard</h4><p>I gave Claude Code a single prompt describing the full build and let it run.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;499f17a6-83db-40ed-93df-2810e1dccebe&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Build a real-time earthquake intelligence dashboard on a 3D globe.
TimescaleDB backend on Tiger Cloud via Tiger MCP, hypertable for
earthquake events with event_time as the time dimension, continuous
aggregates for hourly counts and average magnitude per region, seeded
from the USGS catalog for all magnitude 4.0+ events from 1900 to
today. Next.js and Three.js frontend, dark theme, ripple animations
sized by magnitude and colored by depth, time slider from 1900 to today,
magnitude filter, side panel with event count and top quakes, popup on click.</code></pre></div><p>The video below shows the final build in action.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;a565767e-a9b4-4df4-9318-1fff2e5aa4f5&quot;,&quot;duration&quot;:null}"></div><p>Claude Code connected to Tiger Cloud through the Tiger CLI MCP server, provisioned the database, pulled the full USGS catalog, and assembled the complete frontend in the same session.</p><p>The globe plots every earthquake as a ripple animation sized by magnitude and colored by depth. The Ring of Fire, the seismic belt circling the Pacific, lights up naturally from the data.</p><p>Every slider position fires a live query.</p><p>Dragging it across 120 years of history, the hypertable partitioning means each query hits only the relevant time chunk, and the side panel pulls from continuous aggregates, so both update fast regardless of how far back you go.</p><h4>The takeaway</h4><p>Cloudflare spent two years getting to the infrastructure that Tiger Cloud provisions on day one.</p><p>The partition management, aggregate refresh, and retention tooling are all there from the start. The database layer should not be a project in itself.</p><p>Tiger CLI is open source under Apache 2.0 and works with Claude Code, Cursor, Codex, Gemini CLI, and VS Code.</p><p>&#8594; Sign up for <strong><a href="https://fandf.co/4yoUZFx">Tiger Cloud</a></strong>. New accounts get $1,000 in free credits, no credit card required.</p><p>&#8594; Install Tiger CLI:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;9d8704d6-8e0e-4fe2-9598-70c48a1f7309&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">curl -fsSL https://cli.tigerdata.com | sh</code></pre></div><p>&#8594; Connect to Claude Code:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;62328b02-443a-4b83-8034-bea9ef3877cf&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">tiger mcp install claude-code</code></pre></div><p>&#8594; Give Claude Code a prompt and let it build.</p><p>Tiger Cloud uses the Postgres you already know, built for real-time analytics and time-series workloads, with autoscaling reads and writes and deep observability built in.</p><p><strong><a href="https://fandf.co/4yoUZFx">Get started with Tiger Cloud here &#8594;</a></strong></p><p><strong><a href="https://fandf.co/4fHmscZ">Also, the full Cloudflare case study is here if you want to learn more &#8594;</a></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yzjD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yzjD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 424w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 848w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1272w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yzjD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png" width="1125" height="795" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:795,&quot;width&quot;:1125,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106830,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.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_!yzjD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 424w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 848w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1272w, https://substackcdn.com/image/fetch/$s_!yzjD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af1d54-1504-4e0c-82b0-89042d6e577f_1125x795.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><em>Thanks to Tiger Data for working with us today!</em></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">Cross-model KV cache transfer in LLM Families</a></h3><p>NVIDIA released a paper in which they shared a method to make the KV cache transferable between models.</p><p>The target model skips prefill entirely, and the conversion runs 2.7 to 25x faster than processing the context again.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NI1X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NI1X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 424w, https://substackcdn.com/image/fetch/$s_!NI1X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 848w, https://substackcdn.com/image/fetch/$s_!NI1X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 1272w, https://substackcdn.com/image/fetch/$s_!NI1X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NI1X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png" width="650" height="581" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:581,&quot;width&quot;:650,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51264,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.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_!NI1X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 424w, https://substackcdn.com/image/fetch/$s_!NI1X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 848w, https://substackcdn.com/image/fetch/$s_!NI1X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 1272w, https://substackcdn.com/image/fetch/$s_!NI1X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82503920-b5c6-4bcb-841c-027f11dc2ec5_650x581.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 understand why this is so important today.</p><p>During LLM token generation, every turn sends the entire conversation back to the model. The model reads all of it again before writing a single new token, and all of it is billed as input.</p><p><strong><a href="https://www.dailydoseofds.com/p/prompt-caching-in-llms/">Prompt caching</a></strong> allows Anthropic and other providers to hold the KV cache for a stable prefix and bill a hit at roughly 10% of the base input rate, because the compute was already done once.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w4Oc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w4Oc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 424w, https://substackcdn.com/image/fetch/$s_!w4Oc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 848w, https://substackcdn.com/image/fetch/$s_!w4Oc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 1272w, https://substackcdn.com/image/fetch/$s_!w4Oc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!w4Oc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png" width="1024" height="559" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:559,&quot;width&quot;:1024,&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_!w4Oc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 424w, https://substackcdn.com/image/fetch/$s_!w4Oc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 848w, https://substackcdn.com/image/fetch/$s_!w4Oc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 1272w, https://substackcdn.com/image/fetch/$s_!w4Oc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b62ea1-5dfe-408b-9a42-ae47a469910d_1024x559.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 90% reduction is one of the largest levers in LLM serving, which is why so much production work goes into keeping prefixes byte-stable.</p><p>But the cache only works on the model that produced it. Keys and values are produced from that model&#8217;s weights, so no other model can read them.</p><p>In practice, the constraint shows up in LLM routing. If the traffic is shifted to a different model for cost/capability reasons, the accumulated KV cache becomes invalid.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HgS-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HgS-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 424w, https://substackcdn.com/image/fetch/$s_!HgS-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 848w, https://substackcdn.com/image/fetch/$s_!HgS-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 1272w, https://substackcdn.com/image/fetch/$s_!HgS-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HgS-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png" width="1416" height="417" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:417,&quot;width&quot;:1416,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:607791,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8810cae1-7bdf-4f6f-8db0-fe1ee67d76a8_1448x1086.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_!HgS-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 424w, https://substackcdn.com/image/fetch/$s_!HgS-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 848w, https://substackcdn.com/image/fetch/$s_!HgS-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 1272w, https://substackcdn.com/image/fetch/$s_!HgS-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dc7db3b-5d5e-4e4a-9751-60fb0cef8fb9_1416x417.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 a result, the accumulated context has to be processed from scratch, and it&#8217;s billed at full rate.</p><p>NVIDIA&#8217;s recent paper treats this as a representation problem.</p><p>Prefill&#8217;s only output is the KV cache, so to move KV between models, we need to convert one model&#8217;s cache into the format the other expects.</p><p>They first checked whether the conversion has any structure worth exploiting.</p><p>They found that moving from Qwen3 14B to 32B, a plain linear regression from a single source layer reconstructed 56% of the variance in the target model&#8217;s keys.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A5lx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A5lx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 424w, https://substackcdn.com/image/fetch/$s_!A5lx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 848w, https://substackcdn.com/image/fetch/$s_!A5lx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 1272w, https://substackcdn.com/image/fetch/$s_!A5lx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A5lx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png" width="1315" height="856" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:856,&quot;width&quot;:1315,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:119660,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.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_!A5lx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 424w, https://substackcdn.com/image/fetch/$s_!A5lx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 848w, https://substackcdn.com/image/fetch/$s_!A5lx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 1272w, https://substackcdn.com/image/fetch/$s_!A5lx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a82c54c-3a0a-4262-952a-94cfd4b223de_1315x856.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 two models obviously may have different layer counts, so there is no natural one-to-one pairing between them.</p><p>For each target layer, they rank every source layer by how well it predicts that layer, then feed the top eight in together, which takes the reconstruction to 79%.</p><p>The mapper itself has three parts:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t0Qp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t0Qp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 424w, https://substackcdn.com/image/fetch/$s_!t0Qp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 848w, https://substackcdn.com/image/fetch/$s_!t0Qp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 1272w, https://substackcdn.com/image/fetch/$s_!t0Qp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t0Qp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif" width="960" height="362" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:362,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:364992,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!t0Qp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 424w, https://substackcdn.com/image/fetch/$s_!t0Qp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 848w, https://substackcdn.com/image/fetch/$s_!t0Qp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 1272w, https://substackcdn.com/image/fetch/$s_!t0Qp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5223d8c-7480-4957-86dc-c5d86f571e91_960x362.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>&gt; Each target layer and head gets its own independent linear map, solved in one closed-form step rather than by gradient descent.</p><p>&gt; The cross-layer selection described above is the second part, and their ablation shows it carries the most weight of the three.</p><p>&gt; Keys also carry a position-dependent rotation from RoPE. They strip that rotation, fit the map in position-free space, then reapply the target model&#8217;s rotation at inference.</p><p>Across six pairs from Qwen3, Llama 3.1, and Ministral 3, four retain 73 to 98% of the receiving model&#8217;s standalone accuracy, and the conversion runs 3-25x faster than processing the context again.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LSYn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LSYn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 424w, https://substackcdn.com/image/fetch/$s_!LSYn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 848w, https://substackcdn.com/image/fetch/$s_!LSYn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 1272w, https://substackcdn.com/image/fetch/$s_!LSYn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LSYn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png" width="1109" height="281" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:281,&quot;width&quot;:1109,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54990,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.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_!LSYn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 424w, https://substackcdn.com/image/fetch/$s_!LSYn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 848w, https://substackcdn.com/image/fetch/$s_!LSYn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 1272w, https://substackcdn.com/image/fetch/$s_!LSYn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554cf094-9c75-4830-a90c-74f92b622ee5_1109x281.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Prior work on cross-model KV reuse exists, but it either trains a neural adapter per pair or requires both models to be architecturally identical.</p><p>This is probably the first version that is closed-form and training-free, so a lot of it is still open research.</p><p>Every pair tested belongs to one family, so it works on Qwen to Qwen and Llama to Llama.</p><p>Cross-family transfer is listed as future work.</p><p>All six pairs mentioned above also happen to share the KV head count and per-head dimension across scales. Mismatched head configurations are currently untested.</p><p>The researchers scoped this to dense full-attention only, so sliding-window and attention-recurrent hybrids still need work.</p><p>Here&#8217;s the paper: <strong><a href="https://arxiv.org/abs/2608.03893">https://arxiv.org/abs/2608.03893</a></strong></p><p>Plenty of work is yet to be done. Still, the constraint being solved is genuine.</p><p>Every model swap currently invalidates the full KV that was already paid for, and this is the first result showing that work might be recoverable without training anything extra.</p><p>To dive deeper into KV cache management specifically for running LLMs in production, we wrote a <strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">full 50 min deep dive</a></strong> that covers:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qjvk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qjvk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 424w, https://substackcdn.com/image/fetch/$s_!qjvk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 848w, https://substackcdn.com/image/fetch/$s_!qjvk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 1272w, https://substackcdn.com/image/fetch/$s_!qjvk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qjvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png" width="1086" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1086,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116772,&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.dailydoseofds.com/i/208828976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.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_!qjvk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 424w, https://substackcdn.com/image/fetch/$s_!qjvk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 848w, https://substackcdn.com/image/fetch/$s_!qjvk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 1272w, https://substackcdn.com/image/fetch/$s_!qjvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57d39cfb-3419-41df-a2d5-c87e33c960b5_1086x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Why prefill dominates RAG latency, not retrieval</p></li><li><p>How the KV cache works and what it costs in memory</p></li><li><p>Why prefix caching approaches zero hit rate for RAG workloads</p></li><li><p>Three independent failures when you try to reuse cached chunks</p></li><li><p>Six published approaches to fix them</p></li><li><p>Hands-on implementation that covers every problem and fixes</p></li><li><p>Best practices for production to assess what applies to your system</p></li></ul><p><strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">Read the full deep dive here &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/&quot;,&quot;text&quot;:&quot;Production RAG Deep Dive&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/"><span>Production RAG Deep Dive</span></a></p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[A 10-week Roadmap to Run LLMs in Production]]></title><description><![CDATA[...covered with hands-on resources.]]></description><link>https://blog.dailydoseofds.com/p/a-10-week-roadmap-to-run-llms-in</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/a-10-week-roadmap-to-run-llms-in</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Sun, 09 Aug 2026 20:17:07 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TRw6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p><span>ReAct vs Plan-and-Act pattern in agents.</span></p></li><li><p><span>A 10-week roadmap to run LLMs in production.</span></p></li><li><p><span>Phases of ML modeling.</span></p></li></ul><div><hr></div><h3><a href="https://arxiv.org/pdf/2503.09572">ReAct vs Plan-and-Act Pattern in Agents</a></h3><p>Every wrong turn a ReAct agent takes stays in its context for the rest of the run.</p><p>For more context, the ReAct pattern runs one model in a single loop.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CC8z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CC8z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 424w, https://substackcdn.com/image/fetch/$s_!CC8z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 848w, https://substackcdn.com/image/fetch/$s_!CC8z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 1272w, https://substackcdn.com/image/fetch/$s_!CC8z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CC8z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp" width="936" height="218" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:218,&quot;width&quot;:936,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:378510,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CC8z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 424w, https://substackcdn.com/image/fetch/$s_!CC8z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 848w, https://substackcdn.com/image/fetch/$s_!CC8z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 1272w, https://substackcdn.com/image/fetch/$s_!CC8z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a7680cf-9255-4cce-a619-76b759cdec33_936x218.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>The model writes a thought about what to do next, takes one action, reads the observation that comes back, appends all three to the same prompt, and repeats until it decides the task is done.</p><p>Nothing ever leaves the prompt.</p><p>So a failed search from step three is still retained and accessible at subsequent steps, competing with the original objective for the model&#8217;s attention.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dAim!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dAim!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dAim!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dAim!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dAim!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dAim!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91322,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.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_!dAim!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dAim!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dAim!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dAim!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbed63c0f-8551-49b3-81fb-1425cfdd3c78_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Plan-and-Act splits the overall loop into two jobs.</p><p>The authors of the <strong><a href="https://arxiv.org/pdf/2503.09572">Plan-and-Act paper</a></strong> experimented on web navigation, so the observation coming back after every action is the raw HTML of the page the agent is currently on.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CAGL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CAGL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 424w, https://substackcdn.com/image/fetch/$s_!CAGL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 848w, https://substackcdn.com/image/fetch/$s_!CAGL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 1272w, https://substackcdn.com/image/fetch/$s_!CAGL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CAGL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif" width="668" height="305" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:305,&quot;width&quot;:668,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:660351,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CAGL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 424w, https://substackcdn.com/image/fetch/$s_!CAGL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 848w, https://substackcdn.com/image/fetch/$s_!CAGL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 1272w, https://substackcdn.com/image/fetch/$s_!CAGL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2628096-f330-4b3b-a5e6-96ed974dab1a_668x305.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>A planner reads the user query and the initial page and writes high-level steps.</p></li><li><p>An executor reads the plan, the task, its own past actions, and the current HTML, then emits one grounded action.</p></li></ul><p>After each action, the executor strips the HTML it no longer needs before taking the next one, so the execution context does not grow the way a ReAct trace does.</p><p>Whether this is helpful is determined by plan granularity.</p><p>A good step covers one unit of work, like searching for the product in the search box.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nRV9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nRV9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nRV9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nRV9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nRV9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nRV9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92673,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.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_!nRV9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nRV9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nRV9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nRV9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ea400e-3cf6-437a-88f0-ebe3db282dec_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 individual click is too small to be a step, and &#8220;analyze the search results&#8221; is not a step at all, because it pushes the reasoning back onto the executor.</p><p>A step must also name the actual values it needs.</p><p>The paper&#8217;s planner instructions ask for &#8220;input New York as the arrival city&#8221; instead of &#8220;input the arrival city&#8221;, because the second version leaves the executor to guess which city goes in the box.</p><p>The executor&#8217;s job is picking the right element and typing into it, not filling in the blanks the planner left open.</p><p>They also found that a badly trained planner makes things worse than no planner at all.</p><p>On WebArena-Lite, a ReAct-style executor with no planner scored 36.97%.</p><p>But the same executor with a naively finetuned planner scored just 20.60%.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ln-d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ln-d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 424w, https://substackcdn.com/image/fetch/$s_!Ln-d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 848w, https://substackcdn.com/image/fetch/$s_!Ln-d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 1272w, https://substackcdn.com/image/fetch/$s_!Ln-d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ln-d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png" width="1285" height="650" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:1285,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62458,&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.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.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_!Ln-d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 424w, https://substackcdn.com/image/fetch/$s_!Ln-d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 848w, https://substackcdn.com/image/fetch/$s_!Ln-d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 1272w, https://substackcdn.com/image/fetch/$s_!Ln-d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdbc7a9-b355-48d5-be85-feb910fac73f_1285x650.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 planner had never seen those sites, so it wrote steps that read fine but matched nothing on the page, and the executor followed them anyway.</p><p>A properly trained planner reached 43.63%.</p><p>A plan written once and never revised has its own problem. For instance, if the search for &#8220;library at CMU&#8221; gives no results, the executor will still hold a step that cannot work anymore, and it will keep trying it anyway.</p><p>Replanning after every action is necessary to recover from that.</p><p>For instance, in the paper, the planner saw the current state, the previous plans, and the actions taken, and rewrote the step to &#8220;libraries near CMU&#8221;, which increased the score to 53.94%.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rosw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rosw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Rosw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Rosw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Rosw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rosw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76168,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.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_!Rosw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Rosw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Rosw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Rosw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505362da-6b2f-4d92-96b5-ade59a21ceed_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 a result, the failed attempt got replaced in the plan rather than accumulated in the context.</p><p>The cost is one planner call per executor step. The authors flag this directly and suggest letting the executor decide when a replan is required.</p><p>Nearly all of this is harness design rather than model choice.</p><p>You can read the paper here &#8594; <strong><a href="https://arxiv.org/pdf/2503.09572">https://arxiv.org/pdf/2503.09572</a></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3rkX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3rkX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 424w, https://substackcdn.com/image/fetch/$s_!3rkX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 848w, https://substackcdn.com/image/fetch/$s_!3rkX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 1272w, https://substackcdn.com/image/fetch/$s_!3rkX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3rkX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png" width="1203" height="705" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:705,&quot;width&quot;:1203,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71514,&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.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.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_!3rkX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 424w, https://substackcdn.com/image/fetch/$s_!3rkX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 848w, https://substackcdn.com/image/fetch/$s_!3rkX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 1272w, https://substackcdn.com/image/fetch/$s_!3rkX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2069487b-fb1c-46f4-afc9-7b49bb65c70d_1203x705.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><h3><a href="http://github.com/patchy631/time-to-first-token">A 10-week Roadmap to Run LLMs in Production</a></h3><p>As an AI engineer, please learn:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1jkA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1jkA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 424w, https://substackcdn.com/image/fetch/$s_!1jkA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 848w, https://substackcdn.com/image/fetch/$s_!1jkA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!1jkA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1jkA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png" width="1450" height="1134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1134,&quot;width&quot;:1450,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97055,&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.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.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_!1jkA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 424w, https://substackcdn.com/image/fetch/$s_!1jkA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 848w, https://substackcdn.com/image/fetch/$s_!1jkA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!1jkA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6ec3080-9304-4077-b622-c31dde8e0308_1450x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Learn the roofline model and why decode is memory-bound</p></li><li><p>Deploy vLLM and SGLang, then read their schedulers</p></li><li><p>Understand paged attention from the code, not the blog post</p></li><li><p>Build observability before you optimize anything</p></li><li><p>Track TTFT, inter-token latency, throughput, queue depth</p></li><li><p>Use Grafana + Prometheus for inference dashboards</p></li><li><p>Turn on prefix caching and find which workloads it helps</p></li><li><p>Learn continuous batching and chunked prefill</p></li><li><p>Run load tests with 1000+ concurrent requests</p></li><li><p>Report p50, p95, p99, never just the mean</p></li><li><p>Master quantization tradeoffs (FP8, INT4, AWQ, GPTQ)</p></li><li><p>Learn speculative decoding and where it stops helping</p></li><li><p>Set up KV cache eviction for long contexts</p></li><li><p>Try disaggregated prefill and decode serving</p></li><li><p>Learn Kubernetes for AI workloads and autoscale on queue depth</p></li><li><p>Learn how inference costs break unit economics</p></li><li><p>Build your own model router based on cost, latency, and quality</p></li><li><p>Create a token budgeting system per request</p></li><li><p>Build one inference service and benchmark it publicly</p></li><li><p>Read inference research instead of model release news</p></li><li><p>Start sharing your optimization benchmarks</p></li></ul><p>We put together a 10-week plan that covers every one of these at 30 minutes a day.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TRw6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TRw6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 424w, https://substackcdn.com/image/fetch/$s_!TRw6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 848w, https://substackcdn.com/image/fetch/$s_!TRw6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 1272w, https://substackcdn.com/image/fetch/$s_!TRw6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TRw6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png" width="1221" height="824" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:824,&quot;width&quot;:1221,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73758,&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.dailydoseofds.com/i/210501665?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.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_!TRw6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 424w, https://substackcdn.com/image/fetch/$s_!TRw6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 848w, https://substackcdn.com/image/fetch/$s_!TRw6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 1272w, https://substackcdn.com/image/fetch/$s_!TRw6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09b1b6bf-5d12-40be-bcf5-db46b62dae17_1221x824.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It has 50 sessions, split between reading the theory and building on your own service, and all of them feed one artifact: an inference service you deploy, instrument, load test past 1000 concurrent requests, tune, and publish as a reproducible benchmark.</p><p>It is open on GitHub, and contributions are welcome, especially newer sources worth adding.</p><p>GitHub repo: <strong><a href="http://github.com/patchy631/time-to-first-token">http://github.com/patchy631/time-to-first-token</a></strong></p><p>(don&#8217;t forget to star it &#127775;)</p><div><hr></div><h3><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/">&#8203;Phases of ML Modeling&#8203;</a></strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a></h3><p>Most ML systems don&#8217;t jump straight to deep learning. They evolve.</p><p>A practical way to think about this evolution is in phases, starting from the simplest possible solution and gradually increasing complexity only when it&#8217;s justified. Because unnecessary complexity = low utility.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZsWP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZsWP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 424w, https://substackcdn.com/image/fetch/$s_!ZsWP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 848w, https://substackcdn.com/image/fetch/$s_!ZsWP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 1272w, https://substackcdn.com/image/fetch/$s_!ZsWP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZsWP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png" width="797" height="267" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:267,&quot;width&quot;:797,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ZsWP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 424w, https://substackcdn.com/image/fetch/$s_!ZsWP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 848w, https://substackcdn.com/image/fetch/$s_!ZsWP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 1272w, https://substackcdn.com/image/fetch/$s_!ZsWP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33dc6716-4847-43bc-aa16-72de11bcb06b_797x267.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 staged approach reduces risk, improves debuggability, and aligns naturally with MLOps best practices.</p><p>Now, let&#8217;s walk through the different phases of ML model development:</p><h4><strong>Phase 1: Before ML (heuristics and rules):</strong></h4><p>If you&#8217;re solving a problem for the first time, resist the urge to start with a model. Begin with a non-ML baseline: a rule, a heuristic, or a simple deterministic strategy.</p><p>For example, in a movie recommendation system, a phase-1 solution could be as simple as recommending the top-10 most popular movies to every user.</p><p>This might sound naive, but such heuristics are often surprisingly strong.</p><p>These baselines are fast to build, easy to reason about, and set a minimum performance bar. If a complex ML model cannot beat a naive heuristic, something is wrong; either ML isn&#8217;t adding value, or there&#8217;s a bug in the pipeline.</p><p>Here is a conceptual diagram summarizing Phase 1:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1W-X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1W-X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 424w, https://substackcdn.com/image/fetch/$s_!1W-X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 848w, https://substackcdn.com/image/fetch/$s_!1W-X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 1272w, https://substackcdn.com/image/fetch/$s_!1W-X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1W-X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png" width="1024" height="505" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1W-X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 424w, https://substackcdn.com/image/fetch/$s_!1W-X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 848w, https://substackcdn.com/image/fetch/$s_!1W-X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 1272w, https://substackcdn.com/image/fetch/$s_!1W-X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9158da26-a336-4cc6-ad30-777b80fb8294_1024x505.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Conceptually, Phase 1 looks like a direct mapping from input to output using rules, without any learning component.</p><h4><strong>Phase 2: The simplest ML model</strong></h4><p>Once a heuristic baseline exists (or once it&#8217;s clear that heuristics aren&#8217;t enough), the next step is not a deep model.</p><p>It&#8217;s the simplest possible ML model.</p><p>Think logistic regression, a shallow decision tree, k-nearest neighbors, or a basic linear model; something easy to train, interpret, and deploy.</p><p>The goal here is not peak accuracy. This phase answers foundational questions:</p><ul><li><p>Can we train on historical data and get sensible predictions?</p></li><li><p>Are the features informative?</p></li><li><p>Does the model generalize better than the heuristic?</p></li></ul><p>This is where you validate the end-to-end ML pipeline: data ingestion, feature extraction, training, evaluation, and serving.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yeJd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yeJd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 424w, https://substackcdn.com/image/fetch/$s_!yeJd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 848w, https://substackcdn.com/image/fetch/$s_!yeJd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 1272w, https://substackcdn.com/image/fetch/$s_!yeJd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yeJd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png" width="1024" height="504" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:504,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!yeJd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 424w, https://substackcdn.com/image/fetch/$s_!yeJd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 848w, https://substackcdn.com/image/fetch/$s_!yeJd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 1272w, https://substackcdn.com/image/fetch/$s_!yeJd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15940d4d-0f8c-4bee-b280-09e04b27f5f6_1024x504.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Conceptually, Phase 2 introduces learning, but keeps the model and serving logic minimal.</p><h4><strong>Phase 3: Optimizing the simple model:</strong></h4><p>Once the basic model works, there&#8217;s often significant performance left on the table, without changing the model class at all.</p><p>Phase 3 focuses on extracting as much value as possible from the existing approach.</p><p>Typical levers include:</p><ul><li><p>Feature engineering: creating better representations of the input data.</p></li><li><p>Hyperparameter tuning: systematically searching for better configurations.</p></li><li><p>More data: expanding the dataset or improving data quality.</p></li></ul><p>This phase is where returns on investment are often highest.</p><p>You&#8217;re working with models that are easy to understand, cheap to train, and simple to serve, while still achieving meaningful gains.</p><p>Many real-world ML systems stop here. A well-tuned logistic regression, gradient boosted tree, or modest ensemble can meet production requirements without the complexity of deep learning.</p><p>Here&#8217;s the entire thing summarized as a diagram:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8y1D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8y1D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 424w, https://substackcdn.com/image/fetch/$s_!8y1D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 848w, https://substackcdn.com/image/fetch/$s_!8y1D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 1272w, https://substackcdn.com/image/fetch/$s_!8y1D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8y1D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png" width="1456" height="754" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:754,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8y1D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 424w, https://substackcdn.com/image/fetch/$s_!8y1D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 848w, https://substackcdn.com/image/fetch/$s_!8y1D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 1272w, https://substackcdn.com/image/fetch/$s_!8y1D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a6eb4b-9e63-4790-9af1-93a82f66fa1d_1511x782.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Hence, phase 3 overall looks like a refinement loop around the same model family, not a shift in paradigm.</p><h4><strong>Phase 4: Complex models:</strong></h4><p>Only after simpler approaches are exhausted should you move to fundamentally more complex models.</p><p>This includes deep neural networks, transformers, or large pretrained architectures, depending on the domain.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KcxV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KcxV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 424w, https://substackcdn.com/image/fetch/$s_!KcxV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 848w, https://substackcdn.com/image/fetch/$s_!KcxV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 1272w, https://substackcdn.com/image/fetch/$s_!KcxV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KcxV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png" width="1257" height="617" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:617,&quot;width&quot;:1257,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KcxV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 424w, https://substackcdn.com/image/fetch/$s_!KcxV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 848w, https://substackcdn.com/image/fetch/$s_!KcxV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 1272w, https://substackcdn.com/image/fetch/$s_!KcxV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe52e4e5f-0806-4e2d-97f3-bed894de2c88_1257x617.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Complex models bring capacity, but also cost. The decision to enter Phase 4 should be evidence-driven.</p><p>Conceptually, Phase 4 introduces higher model expressiveness alongside increased engineering complexity.</p><div><hr></div><p>A key point to keep in mind is that, at every phase, the previous phase&#8217;s best model becomes the baseline.</p><p>This phased approach encourages incremental progress and disciplined decision-making.</p><p>If you want to learn more about these real-world ML practices and start your MLOps, we have already covered MLOps from an engineering perspective in our <a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/">18-part MLOps course</a></strong>.</p><p>It covers foundations, ML system lifecycle, reproducibility, versioning, data and pipeline engineering, model compression, deployment, Docker and Kubernetes, cloud fundamentals, virtualization, a deep dive into AWS EKS, monitoring, and CI/CD in production.</p><p><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/">Start with the MLOps course here &#8594;</a></strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a></p><p>&#128073; Over to you: Which phase do most of your models actually live in today?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[[Hands-on] Build Semantic Search Inside Your Database Without an Embedding Pipeline]]></title><description><![CDATA[...explained with code.]]></description><link>https://blog.dailydoseofds.com/p/hands-on-build-semantic-search-inside</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/hands-on-build-semantic-search-inside</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Fri, 07 Aug 2026 20:41:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!D_AD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p>&#8203;Build a semantic search inside your database without an embedding pipeline.</p></li><li><p>8 LLM precision formats.</p></li><li><p>&#8203;6 memory optimization techniques for Agentic systems.</p></li></ul><div><hr></div><h3><a href="https://fandf.co/45Hl0Tm">[Hands-on] Build semantic search inside your database without an embedding pipeline</a></h3><p>We typed a plain English query against 21,000 movie plots and got back semantically relevant results without writing a single line of embedding 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_!D_AD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D_AD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 424w, https://substackcdn.com/image/fetch/$s_!D_AD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 848w, https://substackcdn.com/image/fetch/$s_!D_AD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 1272w, https://substackcdn.com/image/fetch/$s_!D_AD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D_AD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png" width="1456" height="933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:909990,&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.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.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_!D_AD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 424w, https://substackcdn.com/image/fetch/$s_!D_AD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 848w, https://substackcdn.com/image/fetch/$s_!D_AD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 1272w, https://substackcdn.com/image/fetch/$s_!D_AD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1843328d-aac8-46cd-8d4d-a0aed939af4b_3110x1992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 database is <strong><a href="https://fandf.co/45Hl0Tm">MongoDB Atlas</a></strong>, which added auto-embedding powered by Voyage AI directly into its vector search index configuration.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fandf.co/45Hl0Tm&quot;,&quot;text&quot;:&quot;MongoDB Atlas Platform&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fandf.co/45Hl0Tm"><span>MongoDB Atlas Platform</span></a></p><p>When you add semantic search to an app, the standard move is to wire up an external embedding service, sync vectors to a separate store, and write glue to keep everything updated as data changes. </p><p>Most teams never question this setup because that&#8217;s just how the stack looked when vector search was new.</p><p>The real problem shows up later when your data changes, but your pipeline has already run, and search quality starts degrading in ways that are hard to pin down because nothing is explicitly broken. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q5qP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q5qP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 424w, https://substackcdn.com/image/fetch/$s_!Q5qP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 848w, https://substackcdn.com/image/fetch/$s_!Q5qP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 1272w, https://substackcdn.com/image/fetch/$s_!Q5qP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q5qP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png" width="1456" height="925" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:925,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:791821,&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.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.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_!Q5qP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 424w, https://substackcdn.com/image/fetch/$s_!Q5qP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 848w, https://substackcdn.com/image/fetch/$s_!Q5qP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 1272w, https://substackcdn.com/image/fetch/$s_!Q5qP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96a7459a-565c-47fe-969c-7963738b636a_3112x1978.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>MongoDB Atlas handles this with auto-embedding. You point an index at a text field, specify a Voyage AI model, and it generates and maintains the vectors inside the database. </p><p>When a document changes, it re-embeds automatically, so your search stays current.</p><h4>Setting up auto-embedding</h4><p>Load MongoDB&#8217;s sample dataset from your Atlas cluster and navigate to <code>sample_mflix</code> &#8594; <code>movies</code>. Then go to Search &amp; Vector Search &#8594; Create Search Index.</p><p>On the index creation screen:</p><ul><li><p>Select <strong>Vector Search</strong> as the search type</p></li><li><p>Scroll down and select <strong>Automated Embedding</strong> under &#8220;How do you want to set up your vector data?&#8221;</p></li><li><p>Name your index <code>autoembed_index</code></p></li><li><p>Select <code>sample_mflix</code> &#8594; <code>movies</code> as the database and collection</p></li><li><p>Choose <strong>JSON Editor</strong> as the configuration method</p></li></ul><p>Atlas pre-populates the config. Just replace <code>&lt;field-name&gt;</code> with <code>plot</code>:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;cf76cbbe-ca2a-4039-b511-1a5833952f23&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
  "fields": [
    {
      "type": "autoEmbed",
      "modality": "text",
      "path": "plot",
      "model": "voyage-4"
    }
  ]
}</code></pre></div><p>Once the index flips to Active, open the Aggregation tab on the movies collection and run:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;47ba5edf-b02e-4335-bc96-6b86dc9a57cc&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">[
  {
    "$vectorSearch": {
      "index": "autoembed_index",
      "path": "plot",
      "query": "dystopian future where machines control humans",
      "numCandidates": 50,
      "limit": 3
    }
  },
  {
    "$project": {
      "title": 1,
      "plot": 1,
      "_id": 0
    }
  }
]</code></pre></div><p>The results come back with movies whose plots share none of those exact words with the query, which is the index doing semantic matching rather than keyword lookup.</p><p>One index config replaced the embedding service, the vector store, and the sync layer you used to maintain separately.</p><p>If you want to go deeper, MongoDB has a full <strong><a href="https://fandf.co/4fVsOG0">AI Skill Badges program</a></strong> on MongoDB University covering everything from vector search fundamentals to agentic memory and RAG, and each badge earns a Credly credential you can share on LinkedIn.</p><p><strong><a href="https://fandf.co/4fVsOG0">Explore the AI Skill Badges &#8594;</a></strong></p><p><strong><a href="https://fandf.co/45Hl0Tm">MongoDB Atlas Platform &#8594;</a></strong></p><p><em>Thanks to MongoDB for working with us on today&#8217;s issue!</em></p><div><hr></div><h3><strong><a href="https://www.dailydoseofds.com/p/5-llm-quantization-techniques/">8 LLM precision formats</a></strong></h3><p>A 12GB consumer GPU cannot hold a 7B model in FP32, which needs 28GB just for the weights.</p><p>But running <code>ollama run llama3</code> on that card works anyway.</p><p>The reason is that Ollama does not ship weights in FP32.</p><p>Instead, it pulls a Q4_K_M GGUF by default, which averages around 4.8 bits per weight and puts a 7B model near 4.1GB.</p><blockquote><p><strong><a href="https://www.dailydoseofds.com/p/5-llm-quantization-techniques/">We covered several different LLM quantization techniques here &#8594;</a></strong></p></blockquote><p>Every format below FP32 is doing the same thing, i.e., trading numeric detail for memory.</p><p>The visual below explains 8 such LLM precision formats:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rEf9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rEf9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 424w, https://substackcdn.com/image/fetch/$s_!rEf9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 848w, https://substackcdn.com/image/fetch/$s_!rEf9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 1272w, https://substackcdn.com/image/fetch/$s_!rEf9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rEf9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png" width="1456" height="1446" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/daeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1446,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:260645,&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.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.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_!rEf9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 424w, https://substackcdn.com/image/fetch/$s_!rEf9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 848w, https://substackcdn.com/image/fetch/$s_!rEf9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 1272w, https://substackcdn.com/image/fetch/$s_!rEf9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb6e53-c360-40f6-9cb3-5b338f7a4538_1988x1975.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Before we dive into them, some background:</p><p>A floating-point number splits its bits three ways.</p><p>One sign bit, then exponent bits that decide how large or small a value can get, then mantissa bits that decide how finely values can be told apart inside that range.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!M3xm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M3xm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 424w, https://substackcdn.com/image/fetch/$s_!M3xm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 848w, https://substackcdn.com/image/fetch/$s_!M3xm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!M3xm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M3xm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg" width="1200" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91014,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.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_!M3xm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 424w, https://substackcdn.com/image/fetch/$s_!M3xm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 848w, https://substackcdn.com/image/fetch/$s_!M3xm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!M3xm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82edbd28-b067-46f7-83a2-23c4f1ae33cb_1200x896.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Cutting exponent bits causes overflow, where large values saturate, and training blows up.</p></li><li><p>Cutting mantissa bits causes rounding error, where nearby values collapse into the same number and the error accumulates.</p></li></ul><p>Different formats focus on different sides.</p><p><strong>1) FP32 has 8 exponent bits and 23 mantissa bits, reaching about 3.4e38.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iGNN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iGNN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iGNN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iGNN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iGNN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iGNN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg" width="1376" height="526" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:526,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90855,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd993c1e9-6c11-4eb5-92fb-cfabe79e1ffc_1376x768.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_!iGNN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iGNN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iGNN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iGNN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc52fa81-3dff-4284-b3a1-b13417d431a5_1376x526.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Four bytes per parameter is expensive, but optimizer states and master weights still use FP32 even in low-precision training runs, because the gradient updates are small enough that FP16 storage might round them away entirely.</p><p><strong>2) TF32 is 19 bits, made of FP32&#8217;s 8 exponent bits and FP16&#8217;s 10 mantissa bits.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MYjq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MYjq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MYjq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MYjq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MYjq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MYjq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg" width="1376" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106658,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0069564f-8462-47f2-b0e6-2d77e21a04bc_1376x768.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_!MYjq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MYjq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MYjq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MYjq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc44dc3-7c07-4333-ae24-87c19f482f04_1376x686.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It only exists inside the tensor core, so weights load and store as FP32, and memory usage does not drop at all.</p><p>PyTorch enables it on Ampere and later without any code change, and this small change results in roughly 3x faster matmuls in exchange for 13 fewer mantissa bits during the multiplication process.</p><p><strong>3) BF16 keeps FP32&#8217;s 8 exponent bits and cuts the mantissa to 7.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GldY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GldY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GldY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GldY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GldY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GldY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg" width="1376" height="607" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:607,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:115784,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1438e7f-7d66-4763-9d6e-aaf277c0d5b9_1376x768.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_!GldY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GldY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GldY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GldY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe178da4f-eca6-4740-811e-10d6e208275b_1376x607.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 identical range means casting down from FP32 only rounds and never overflows, which is why it has become the pre-training default.</p><p><strong>4) FP16 splits the same 16 bits the other way, 5 exponent bits and 10 mantissa bits.</strong> </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZjSV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZjSV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ZjSV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ZjSV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ZjSV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZjSV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg" width="1376" height="611" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:611,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:115778,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04ba15b9-53d6-4409-b510-377919191de7_1376x768.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_!ZjSV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ZjSV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ZjSV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ZjSV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4741ec8-e0a5-45ef-bd41-97be8a63c496_1376x611.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It resolves values eight times more finely than BF16 but is limited to just 65504, so gradients above that become infinity, and training needs loss scaling to survive.</p><p>It is also the only 16-bit option on V100 and T4 class hardware, which predate BF16.</p><blockquote><p><em>An RL fine-tuning paper from late 2025 found BF16&#8217;s rounding error accumulates across autoregressive sampling until the training and inference engines assign different probabilities to the same tokens, and that moving the whole pipeline to FP16 removed the divergence.</em></p></blockquote><p><strong>5) FP8 has two layouts:</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q0y8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q0y8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 424w, https://substackcdn.com/image/fetch/$s_!q0y8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 848w, https://substackcdn.com/image/fetch/$s_!q0y8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!q0y8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q0y8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg" width="1376" height="703" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:703,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:122280,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c03cdc-5eba-4bce-bcd0-b84f0a187ecc_1376x768.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_!q0y8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 424w, https://substackcdn.com/image/fetch/$s_!q0y8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 848w, https://substackcdn.com/image/fetch/$s_!q0y8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!q0y8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7cfe03a-6a96-40ed-8032-ce8bd598e4c2_1376x703.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>E4M3 reaches 448 and is ideal for weights and activations</p></li><li><p>E5M2 reaches 57344 and is ideal for gradients, which span more orders of magnitude.</p></li></ul><p>Throughput-wise, this is about 2x faster BF16, but since the range is narrow, scaling factors per tensor or per block are no longer optional.</p><p><strong>6) INT8 has no floating point.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ghsi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ghsi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ghsi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ghsi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ghsi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ghsi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79692,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.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_!Ghsi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ghsi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ghsi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ghsi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d145767-08f0-4316-bad8-5d8d8477aa5f_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Weights map onto 256 evenly spaced integer levels between a calibrated minimum and maximum, which puts a 7B model in about 7GB with under 1% quality loss on many models.</p><p>Yes, even spacing is&nbsp;indeed a weakness, since a few outlier activations stretch the range and waste levels on values almost nothing uses.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!taT9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!taT9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 424w, https://substackcdn.com/image/fetch/$s_!taT9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 848w, https://substackcdn.com/image/fetch/$s_!taT9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!taT9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!taT9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg" width="1376" height="528" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:528,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:124591,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96aa4574-df05-40a0-bd3b-0ce7112ca8ba_1376x768.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_!taT9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 424w, https://substackcdn.com/image/fetch/$s_!taT9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 848w, https://substackcdn.com/image/fetch/$s_!taT9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!taT9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf7e1c4-8f78-4860-bb5c-06e312076af7_1376x528.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong>7) INT4 gives each weight 16 possible values:</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wAhc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wAhc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 424w, https://substackcdn.com/image/fetch/$s_!wAhc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 848w, https://substackcdn.com/image/fetch/$s_!wAhc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 1272w, https://substackcdn.com/image/fetch/$s_!wAhc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wAhc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp" width="1376" height="633" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:633,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:50104,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wAhc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 424w, https://substackcdn.com/image/fetch/$s_!wAhc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 848w, https://substackcdn.com/image/fetch/$s_!wAhc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 1272w, https://substackcdn.com/image/fetch/$s_!wAhc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f5c2004-a671-4267-9180-84c94a4430e6_1376x633.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 compare, INT8 can take 256 values, so the gaps between allowed values are sixteen times wider, and every weight moves further when it snaps to the nearest one.</p><p>Rounding to the nearest value keeps that individual move as small as possible. But a layer multiplies thousands of weights against the input and adds the results, so the error that shows up in the output is the sum of thousands of these moves.</p><p>Rounding cannot see that sum. It treats every weight as equally important, when in practice, only some of them meaningfully change the output.</p><p>GPTQ works around this by quantizing a block one weight at a time and adjusting the weights not yet done to cancel the error already made.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C6Uk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C6Uk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!C6Uk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!C6Uk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!C6Uk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C6Uk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png" width="1338" height="214" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:214,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:50448,&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.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.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_!C6Uk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!C6Uk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!C6Uk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!C6Uk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0241eca1-c5fc-4c1d-b390-719689ab7b4d_1338x214.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>AWQ finds the channels carrying the most signal and scales them up before quantizing, spending more of the 16 values where it counts.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j2nS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j2nS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!j2nS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!j2nS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!j2nS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j2nS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png" width="1338" height="214" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:214,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:44031,&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.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.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_!j2nS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!j2nS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!j2nS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!j2nS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faced23a2-78bc-42fa-b130-e4240528bb32_1338x214.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Both need calibration data, a few hundred real inputs, since that is the only way to tell which weights matter.</p><p>8) NF4 also uses 16 levels but spaces them unevenly, with bin edges placed along a normal distribution because pretrained weights sit close to a zero-centered Gaussian.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X5uQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X5uQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 424w, https://substackcdn.com/image/fetch/$s_!X5uQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 848w, https://substackcdn.com/image/fetch/$s_!X5uQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!X5uQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X5uQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg" width="1376" height="548" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:548,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:131286,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208056931?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e076731-1df0-47cc-ab93-3cb758215ea3_1376x768.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_!X5uQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 424w, https://substackcdn.com/image/fetch/$s_!X5uQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 848w, https://substackcdn.com/image/fetch/$s_!X5uQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!X5uQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47e75904-01a9-4941-aa94-7cf41883c749_1376x548.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It exists for QLoRA, where the base model stays frozen in 4 bits, and <strong><a href="https://www.dailydoseofds.com/implementing-lora-from-scratch-for-fine-tuning-llms/">LoRA</a></strong> adapters train in BF16 on top, which puts 65B fine-tuning on one 48GB GPU at 16-bit task quality.</p><p>The weights get dequantized back to BF16 for the actual matmul, so it saves memory without adding speed.</p><p>As a result, quality degrades far less on larger models, so a 70B at 4-bit generally beats a 13B at 16-bit for the same memory.</p><p>And the sharp drop is between 3-bit and 4-bit, not between 4-bit and 8-bit, which is why 4-bit ended up as the default everywhere from Ollama to vLLM.</p><p><span>To dive deeper, we have already written a full </span><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">deep dive on Quantization</a></strong><span>, specifically, which covers several of these methods with their simplified mathematics.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fatV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fatV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 424w, https://substackcdn.com/image/fetch/$s_!fatV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 848w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1272w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fatV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png" width="1004" height="442" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:442,&quot;width&quot;:1004,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35848,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.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_!fatV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 424w, https://substackcdn.com/image/fetch/$s_!fatV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 848w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1272w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/"><span>Learn how Quantization optimizes LLMs to run them on tiny hardware here &#8594;</span></a></strong></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/">6 memory optimization techniques for Agentic systems</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a></h3><p>We recently added <a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/">Part 16</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a><strong> </strong>and <a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/">Part 17</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/"><span>&#8203;</span></a><strong> </strong>to our AI Agents crash course<strong>,</strong> where we use LangGraph to implement 6 production-grade memory optimization techniques in agentic workflows.</p><ul><li><p><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/">You can read Part 16 here &#8594;</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a></p></li><li><p><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/">You can read Part 17 here &#8594;</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/"><span>&#8203;</span></a></p></li></ul><p>But what exactly is Memory, and why is it so powerful for Agentic systems?</p><p>To understand this, consider an Agentic system without Memory (below):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lm3M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lm3M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 424w, https://substackcdn.com/image/fetch/$s_!Lm3M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 848w, https://substackcdn.com/image/fetch/$s_!Lm3M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 1272w, https://substackcdn.com/image/fetch/$s_!Lm3M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lm3M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png" width="1456" height="860" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:860,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Lm3M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 424w, https://substackcdn.com/image/fetch/$s_!Lm3M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 848w, https://substackcdn.com/image/fetch/$s_!Lm3M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 1272w, https://substackcdn.com/image/fetch/$s_!Lm3M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e04d510-782e-4d64-be8d-f53989346099_2656x1568.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 iteration #1, the user mentions their favorite color.</p></li><li><p>In iteration #2, the Agent knows nothing about iteration #1.</p></li></ul><p>This means the Agent is mostly stateless, and it has no recall abilities.</p><p>But now consider an Agentic system built with Memory (below):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!naVC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!naVC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 424w, https://substackcdn.com/image/fetch/$s_!naVC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 848w, https://substackcdn.com/image/fetch/$s_!naVC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 1272w, https://substackcdn.com/image/fetch/$s_!naVC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!naVC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png" width="1456" height="811" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.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;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!naVC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 424w, https://substackcdn.com/image/fetch/$s_!naVC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 848w, https://substackcdn.com/image/fetch/$s_!naVC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 1272w, https://substackcdn.com/image/fetch/$s_!naVC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fa4cd6-b689-4b5c-ae9b-547870226a66_2656x1480.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 iteration #1, the user mentions their favorite color.</p></li><li><p>In iteration #2, the Agent can recall iteration #1.</p></li></ul><p>Memory matters because if a memory-less Agentic system is deployed in production, every interaction with that Agent will be a blank slate.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6luh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6luh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 424w, https://substackcdn.com/image/fetch/$s_!6luh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 848w, https://substackcdn.com/image/fetch/$s_!6luh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 1272w, https://substackcdn.com/image/fetch/$s_!6luh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6luh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png" width="1000" height="629" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:629,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6luh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 424w, https://substackcdn.com/image/fetch/$s_!6luh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 848w, https://substackcdn.com/image/fetch/$s_!6luh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 1272w, https://substackcdn.com/image/fetch/$s_!6luh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88885543-77fd-4bc6-84fa-c35b5a03a29f_1000x629.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It doesn&#8217;t matter if the user told the Agent their name five seconds ago, it&#8217;s forgotten. If the Agent helped troubleshoot an issue in the last session, it won&#8217;t remember any of it now.</p><p>With Memory, your Agent becomes context-aware and practically applicable.</p><p>But Memory isn&#8217;t an abstract concept.</p><p>If you dive deeper, it follows a structured and intuitive architecture with several types of Memory.&#8203;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wyy7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wyy7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 424w, https://substackcdn.com/image/fetch/$s_!Wyy7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 848w, https://substackcdn.com/image/fetch/$s_!Wyy7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 1272w, https://substackcdn.com/image/fetch/$s_!Wyy7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wyy7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png" width="1456" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Wyy7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 424w, https://substackcdn.com/image/fetch/$s_!Wyy7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 848w, https://substackcdn.com/image/fetch/$s_!Wyy7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 1272w, https://substackcdn.com/image/fetch/$s_!Wyy7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2439c514-c2cd-457b-843a-14bcfbec2452_1551x616.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Short-Term Memory</p></li><li><p>Long-Term Memory</p></li><li><p>Entity Memory</p></li><li><p>Contextual Memory, and</p></li><li><p>User Memory</p></li></ul><p>Each serves a unique purpose in helping agents &#8220;remember&#8221; and utilize past information.</p><p>To simulate memory, the system has to manage context explicitly: choosing what to keep, what to discard, and what to retrieve before each new model call.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P0BM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P0BM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 424w, https://substackcdn.com/image/fetch/$s_!P0BM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 848w, https://substackcdn.com/image/fetch/$s_!P0BM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 1272w, https://substackcdn.com/image/fetch/$s_!P0BM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P0BM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.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;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!P0BM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 424w, https://substackcdn.com/image/fetch/$s_!P0BM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 848w, https://substackcdn.com/image/fetch/$s_!P0BM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 1272w, https://substackcdn.com/image/fetch/$s_!P0BM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7ff1629-c68e-405b-9438-e56640f26ed2_2000x778.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 is why memory is not a property of the model itself. It is a system design problem that can also be optimized, and we covered them in these two parts:</p><ul><li><p><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/">You can read Part 16 with LangGraph &#8594;</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-16-with-implementation/"><span>&#8203;</span></a></p></li><li><p><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/">You can read Part 17 with LangGraph &#8594;</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-17-with-implementation/"><span>&#8203;</span></a></p></li></ul><p>Also, Part 8 and Part 9 of the crash course cover memory with CrewAI:</p><ul><li><p><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-8-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-8-with-implementation/">AI Agents Crash Course Part 8 &#8594;</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-8-with-implementation/"><span>&#8203;</span></a></p></li><li><p><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-9-with-implementation/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-9-with-implementation/">AI Agents Crash Course Part 9 &#8594;</a></strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-9-with-implementation/"><span>&#8203;</span></a></p></li></ul><p>Both parts cover:</p><ul><li><p>5 types of Memory from a theoretical, practical, and intuitive perspective.</p></li><li><p>How each type of Memory helps an Agent.</p></li><li><p>How an Agent retrieves relevant details from the Memory.</p></li><li><p>The underlying mechanics of Memory and how it is stored.</p></li><li><p>How to utilize each type of Memory for Agents (implementations).</p></li><li><p>How to customize Memory settings.</p></li><li><p>How to reset the Memory if needed.</p></li><li><p>And more.</p></li></ul><p>Happy learning!</p>]]></content:encoded></item><item><title><![CDATA[The Missing Piece of Agent Self-Improvement]]></title><description><![CDATA[...explained step-by-step with code.]]></description><link>https://blog.dailydoseofds.com/p/the-missing-piece-of-agent-self-improvement</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/the-missing-piece-of-agent-self-improvement</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Thu, 06 Aug 2026 18:40:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Z41r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><strong><a href="https://fandf.co/3QSrCLa">Postgres for time-series workloads at any scale</a></strong></h3><p>Most databases that need both fast ingest and fast analytical queries end up split across two systems. </p><p>One table for writes, another for reads, and a pipeline stitching them together that you now have to maintain.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xW6O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xW6O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 424w, https://substackcdn.com/image/fetch/$s_!xW6O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 848w, https://substackcdn.com/image/fetch/$s_!xW6O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 1272w, https://substackcdn.com/image/fetch/$s_!xW6O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xW6O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png" width="1098" height="801" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:801,&quot;width&quot;:1098,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:195935,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.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_!xW6O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 424w, https://substackcdn.com/image/fetch/$s_!xW6O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 848w, https://substackcdn.com/image/fetch/$s_!xW6O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 1272w, https://substackcdn.com/image/fetch/$s_!xW6O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe28cef5c-9509-4209-83f7-a3d84679744d_1098x801.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>That split means more infrastructure to manage, more failure points to monitor, and query results that are only as fresh as your last pipeline run.</p><p><strong><a href="https://fandf.co/3QSrCLa">Tiger Cloud</a></strong> by Tiger Data ships with Hypercore, a hybrid storage engine built into TimescaleDB. New data lands in row storage for fast inserts. As it ages, Hypercore converts it automatically to columnar storage, compressing it by up to 95%.</p><p>The query engine then scans far fewer bytes. Summary queries like COUNT, MIN, MAX, FIRST, and LAST read directly from batch metadata without decompressing anything.</p><p>You write and query the same table, and Hypercore handles which storage format each chunk lives in based on age.</p><p>New accounts get $1,000 in free credits, no card required.</p><p><strong><a href="https://fandf.co/3QSrCLa">Get started with Tiger Cloud here &#8594;</a></strong></p><p><em>Thanks to Tiger Data for working with us on today&#8217;s issue!</em></p><div><hr></div><h3><a href="https://github.com/comet-ml/opik">The missing piece of agent self-improvement</a></h3><p>Most AI systems don&#8217;t get better on their own. A model ships, it fails on some input, someone notices, and someone fixes it. The system itself carries none of that experience forward.</p><p>Self-improvement loops are defined to improve that.</p><p>Every failure ending in a one-off patch is the old pattern. The new one uses the outcome of a run to change the system&#8217;s future behavior. So the same mistake becomes less likely to happen again.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2pfB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2pfB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 424w, https://substackcdn.com/image/fetch/$s_!2pfB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 848w, https://substackcdn.com/image/fetch/$s_!2pfB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 1272w, https://substackcdn.com/image/fetch/$s_!2pfB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2pfB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp" width="1456" height="606" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp&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;:52266,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2pfB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 424w, https://substackcdn.com/image/fetch/$s_!2pfB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 848w, https://substackcdn.com/image/fetch/$s_!2pfB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 1272w, https://substackcdn.com/image/fetch/$s_!2pfB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F067373cf-1337-48be-8056-e9fdaffd5a7d_1456x606.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 idea isn&#8217;t unique to agents. Search ranking systems adjust signal weights based on click behavior. Recommendation engines update their predictions based on what users engage with and what they ignore.</p><p>Agents make the problem more interesting because they don&#8217;t produce a single output. They don&#8217;t just produce one output; they make a chain of decisions. So the mistake that causes a failure happens steps before the final answer is wrong.</p><p>Can the agent turn those failures into something it acts on later, or does the failure get forgotten?</p><p>That&#8217;s the real test of self-improvement. </p><h4>Why most agents don&#8217;t self-improve</h4><p>In theory, a self-improving agent should learn from both its successes and its failures. In practice, most production systems still follow a manual loop.</p><p>The code gets changed, the bug gets fixed, but the agent itself doesn&#8217;t learn anything from the failure. If the same class of problem shows up again a month later, you will repeat the same debugging process.</p><p>Hermes is one of the few open-source agents built around the idea that useful experience should be reusable. Rather than restarting from zero on every task, it keeps what worked and reuses it later.</p><h4>How Hermes learns</h4><p>When Hermes discovers a useful way to solve a problem, it doesn&#8217;t discard that experience after the task finishes. It saves the successful approach as a reusable <code>SKILL.md</code> file.</p><p>The next time it encounters a similar problem, it can load that skill instead of rediscovering the solution from scratch.</p><p>That is the core runtime learning loop of solving a problem, capturing the successful strategy, and reusing it later.</p><p>As more tasks are completed, the number of saved skills grows. So Hermes also includes a background curator to manage that library. </p><p>The curator removes outdated skills, keeps the collection organized, and helps prevent the skill store from turning into an unmaintainable pile of snippets.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mvMZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mvMZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 424w, https://substackcdn.com/image/fetch/$s_!mvMZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 848w, https://substackcdn.com/image/fetch/$s_!mvMZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 1272w, https://substackcdn.com/image/fetch/$s_!mvMZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mvMZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png" width="1200" height="664" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:664,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:236420,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.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_!mvMZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 424w, https://substackcdn.com/image/fetch/$s_!mvMZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 848w, https://substackcdn.com/image/fetch/$s_!mvMZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 1272w, https://substackcdn.com/image/fetch/$s_!mvMZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F438e397f-3d77-4d85-b604-ef1cbd991224_1200x664.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Hermes also has a second learning path through <strong>GEPA (Genetic-Pareto Prompt Evolution)</strong>. This is not the same as the runtime skill loop. </p><p>GEPA works offline by analyzing execution traces from agent runs. It checks the results and keeps the variants that perform best.</p><p>The important distinction is that GEPA is an optimization process, not a training run. It doesn&#8217;t require GPU fine-tuning.</p><p>The Hermes self-evolution repository describes this as an evolutionary search that can improve prompts, skills, and tool descriptions without retraining the model itself.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!alYx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!alYx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 424w, https://substackcdn.com/image/fetch/$s_!alYx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 848w, https://substackcdn.com/image/fetch/$s_!alYx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 1272w, https://substackcdn.com/image/fetch/$s_!alYx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!alYx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png" width="1200" height="981" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:981,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:152116,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.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_!alYx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 424w, https://substackcdn.com/image/fetch/$s_!alYx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 848w, https://substackcdn.com/image/fetch/$s_!alYx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 1272w, https://substackcdn.com/image/fetch/$s_!alYx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F091c1f04-b5e1-4cc6-82dc-6e0f39987b80_1200x981.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Taken together, these pieces give Hermes a genuine self-improvement loop. Successful solutions become reusable skills, the curator keeps those skills healthy, and GEPA helps refine the system from what it has learned running.</p><h4>Self-improvement has limits</h4><p>Hermes&#8217; self-improvement loop still has a few practical limitations:</p><ul><li><p><strong>Self-bias.</strong> Hermes can rate its own work highly, which increases the risk of weak solutions being saved as reusable skills.</p></li><li><p><strong>Skill overwrite.</strong> Auto-generated skills can replace well-crafted manual ones with lower-quality alternatives.</p></li><li><p><strong>GEPA runs offline.</strong> Optimization happens outside the running agent, so improvements only happen after someone collects traces and reruns the optimization process.</p></li></ul><p>Those are specific implementation details, but they point to a broader limitation. The loop has no automatic way to learn from failures that appear in production.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gu2r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gu2r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 424w, https://substackcdn.com/image/fetch/$s_!Gu2r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 848w, https://substackcdn.com/image/fetch/$s_!Gu2r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 1272w, https://substackcdn.com/image/fetch/$s_!Gu2r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gu2r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png" width="1456" height="678" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:678,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:147333,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.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_!Gu2r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 424w, https://substackcdn.com/image/fetch/$s_!Gu2r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 848w, https://substackcdn.com/image/fetch/$s_!Gu2r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 1272w, https://substackcdn.com/image/fetch/$s_!Gu2r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6cb1b4d-faaf-4ccc-8694-23428e64744c_1456x678.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 production failure often looks very different from a development-time mistake. The agent may behave correctly in testing and fail only under real workloads, real user inputs, or unusual tool interactions. Those failures don&#8217;t automatically become part of what the agent learns.</p><p>Instead, someone opens the trace, figures out what went wrong, patches the code, and redeploys the agent. The fix lives in Git, but the learning stops there.</p><p>That is the gap between a system that can remember successful solutions and a system that can continuously learn from production failures.</p><h4>Closing the production gap</h4><p>Hermes&#8217;s missing piece shows up once the agent is live in production. Opik picks up there, covering what the internal loop can&#8217;t.</p><p>Opik is an <strong><a href="https://github.com/comet-ml/opik">open-source</a></strong> observability and optimization platform for AI agents. It integrates with dozens of agent frameworks and developer tools and now includes an official integration for Hermes as well.</p><p>Most observability platforms stop after showing you the trace. Opik treats that trace as the beginning of another learning loop instead of the end of one.</p><p>It closes the production gap with a workflow where each layer feeds into the next: </p><p><strong>Trace &#8594; Ollie diagnoses &#8594; proposed fix &#8594; approval &#8594; rerun &#8594; regression test &#8594; future traces. </strong></p><p>These aren&#8217;t separate features; they&#8217;re stages of the same debugging loop. Rather than treating those as separate features, think of them as stages of the same debugging loop.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mtlN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mtlN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 424w, https://substackcdn.com/image/fetch/$s_!mtlN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 848w, https://substackcdn.com/image/fetch/$s_!mtlN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 1272w, https://substackcdn.com/image/fetch/$s_!mtlN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mtlN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png" width="1024" height="522" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:522,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103557,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.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_!mtlN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 424w, https://substackcdn.com/image/fetch/$s_!mtlN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 848w, https://substackcdn.com/image/fetch/$s_!mtlN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 1272w, https://substackcdn.com/image/fetch/$s_!mtlN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20a456b1-558c-4b14-97dc-a15c19a152cf_1024x522.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Here&#8217;s each layer in practice.</p><h5>Layer 1: Tracing</h5><p>Everything starts with an agent trace, a record of what the agent did during a run.</p><p>Every LLM call, tool invocation, and retrieval step is recorded automatically. Opik works out of the box with LangGraph, CrewAI, Hermes, and more than fifty other frameworks, so the entire execution path is available when something goes wrong.</p><p>For example, I asked my Hermes agent for the latest news about Google&#8217;s Gemma 4 model family. The entire execution was captured automatically as an Opik trace.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vtrA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vtrA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 424w, https://substackcdn.com/image/fetch/$s_!vtrA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 848w, https://substackcdn.com/image/fetch/$s_!vtrA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 1272w, https://substackcdn.com/image/fetch/$s_!vtrA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vtrA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png" width="1456" height="903" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:903,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:219901,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.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_!vtrA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 424w, https://substackcdn.com/image/fetch/$s_!vtrA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 848w, https://substackcdn.com/image/fetch/$s_!vtrA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 1272w, https://substackcdn.com/image/fetch/$s_!vtrA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7399de19-b1ed-4f34-902e-181503ef467c_1456x903.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h5>Layer 2: Ollie</h5><p>A trace tells you what happened, and your next logical question will be why.</p><p>That&#8217;s where most observability platforms stop, right after showing you the trace. Opik goes further with <strong>Ollie</strong>, a built-in coding agent that turns failures into fixes.</p><p>Ollie is the coding agent built into Opik. By reading the span tree, it follows the chain of events across every model call and tool invocation until it identifies the actual failure.</p><p>If you run a single <code>opik connect</code> command from your project root, Ollie can also inspect your local project.</p><p>From there it can:</p><ul><li><p>read the relevant source files</p></li><li><p>identify the code responsible for the failure</p></li><li><p>propose a fix as a Git-style diff</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_!r1CR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r1CR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 424w, https://substackcdn.com/image/fetch/$s_!r1CR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 848w, https://substackcdn.com/image/fetch/$s_!r1CR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 1272w, https://substackcdn.com/image/fetch/$s_!r1CR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r1CR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png" width="1456" height="760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:199037,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.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_!r1CR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 424w, https://substackcdn.com/image/fetch/$s_!r1CR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 848w, https://substackcdn.com/image/fetch/$s_!r1CR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 1272w, https://substackcdn.com/image/fetch/$s_!r1CR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04bafdd2-32d4-4630-a37d-31b6040ab6bd_1456x760.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 detail I particularly like is that nothing happens automatically. Ollie never edits your project on its own. Every proposed change waits for your approval before it&#8217;s applied.</p><p><strong>Here&#8217;s a real example using Hermes.</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;f7aec0ef-e696-49ae-aed6-bad4effe74a6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Install the pip-audit tool and run a security
vulnerability scan on the current Python environment.</code></pre></div><p>The above task failed because the execution environment was configured incorrectly.</p><p>After connecting Ollie to the project, it inspected both the execution trace and my local configuration. It traced the failure back to where the <code>execute_code</code> tool had been configured with an unsupported <code>cloud_runner</code> environment.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ljnN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ljnN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 424w, https://substackcdn.com/image/fetch/$s_!ljnN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 848w, https://substackcdn.com/image/fetch/$s_!ljnN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 1272w, https://substackcdn.com/image/fetch/$s_!ljnN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ljnN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png" width="1456" height="913" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:913,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:259210,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.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_!ljnN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 424w, https://substackcdn.com/image/fetch/$s_!ljnN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 848w, https://substackcdn.com/image/fetch/$s_!ljnN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 1272w, https://substackcdn.com/image/fetch/$s_!ljnN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeeaa1b8-e3c9-46d0-a2db-399061ea4d95_1456x913.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Ollie proposed a small change to the configuration, explained why it would fix the problem, and waited for approval before making any modifications.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;c0f9b0cb-77d6-4383-9a97-605807b628d3&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">The Hermes agent&#8217;s execute_code tool is configured with
environment type cloud_runner, which is not a supported value.</code></pre></div><p>The fix Ollie proposes:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fghv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fghv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 424w, https://substackcdn.com/image/fetch/$s_!Fghv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 848w, https://substackcdn.com/image/fetch/$s_!Fghv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 1272w, https://substackcdn.com/image/fetch/$s_!Fghv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fghv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png" width="1456" height="958" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:958,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:154190,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.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_!Fghv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 424w, https://substackcdn.com/image/fetch/$s_!Fghv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 848w, https://substackcdn.com/image/fetch/$s_!Fghv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 1272w, https://substackcdn.com/image/fetch/$s_!Fghv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32e92a8a-2081-4ccd-bd12-7757fedd4f4f_1456x958.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 entire workflow becomes the following:</p><p><strong>Bad trace &#8594; root cause &#8594; diff &#8594; approve &#8594; rerun &#8594; regression locked</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!50Ka!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!50Ka!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 424w, https://substackcdn.com/image/fetch/$s_!50Ka!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 848w, https://substackcdn.com/image/fetch/$s_!50Ka!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 1272w, https://substackcdn.com/image/fetch/$s_!50Ka!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!50Ka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png" width="1024" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:127129,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.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_!50Ka!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 424w, https://substackcdn.com/image/fetch/$s_!50Ka!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 848w, https://substackcdn.com/image/fetch/$s_!50Ka!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 1272w, https://substackcdn.com/image/fetch/$s_!50Ka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68097b2e-d0f5-4e8f-a162-79db3e5d6107_1024x486.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h5>Layer 3: Test Suites</h5><p>Fixing a bug once isn&#8217;t enough. The real goal is making sure it never comes back.</p><p>Many evaluation systems start by asking you to build labeled datasets and numerical metrics. Opik gives you test suites to describe expected behavior in plain English instead of a dataset to maintain.</p><p>Opik instead gives you test suites to describe expected behavior in plain English.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;780ebf80-99f1-4cfc-a9b4-4d54b54e3787&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">suite = opik.TestSuite(&#8221;Hermes Agent Regression&#8221;)

suite.add_assertion(
    "Check if the &#8216;requests&#8217; package is installed and print its version.&#8221;
)

suite.add_assertion(
    "List the files in the current directory and identify the project.&#8221;
)

suite.add_assertion(
    "Run Python and print the interpreter version together with the first ten installed packages.&#8221;
)

suite.run_tests()</code></pre></div><p>Under the hood, Opik evaluates those assertions with LLM-as-a-judge, giving each case a straightforward pass or fail without requiring you to maintain labeled evaluation datasets.</p><p>So this workflow lets you turn real production failures into regression tests as part of the debugging loop.</p><blockquote><p><strong>Note:</strong> Everything above can be done manually with the Opik SDK, but Ollie automates the process for you.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0QqU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0QqU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 424w, https://substackcdn.com/image/fetch/$s_!0QqU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 848w, https://substackcdn.com/image/fetch/$s_!0QqU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 1272w, https://substackcdn.com/image/fetch/$s_!0QqU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0QqU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png" width="1456" height="902" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.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;:143560,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.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_!0QqU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 424w, https://substackcdn.com/image/fetch/$s_!0QqU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 848w, https://substackcdn.com/image/fetch/$s_!0QqU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 1272w, https://substackcdn.com/image/fetch/$s_!0QqU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbc7218-8d87-468e-808b-7f2f6fa54d26_1456x902.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h5>Layer 4: Agent Sandbox</h5><p>One question still remains unanswered. Did the fix actually solve the problem without breaking anything else?</p><p>Most playgrounds let you tweak a system prompt and rerun a single LLM call. Opik&#8217;s Agent Sandbox goes further; it executes the complete Hermes workflow end to end.</p><p>You can change a prompt, update a configuration, switch a model, or apply Ollie&#8217;s proposed fix, then rerun the same agent against the same input that originally failed.</p><p>After approving Ollie&#8217;s <code>config.yaml</code> change, I reran the original <code>pip-audit</code> request.</p><p>The first trace failed during environment validation. The second completed successfully using the updated configuration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jg77!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jg77!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 424w, https://substackcdn.com/image/fetch/$s_!jg77!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 848w, https://substackcdn.com/image/fetch/$s_!jg77!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 1272w, https://substackcdn.com/image/fetch/$s_!jg77!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jg77!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png" width="1456" height="839" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:839,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139505,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.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_!jg77!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 424w, https://substackcdn.com/image/fetch/$s_!jg77!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 848w, https://substackcdn.com/image/fetch/$s_!jg77!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 1272w, https://substackcdn.com/image/fetch/$s_!jg77!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6073cbc8-8fed-46c0-bd56-442a14bba97f_1456x839.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Rather than relying on a patch that &#8220;looks right,&#8221; you can verify the fix against the exact scenario that exposed the bug in the first place.</p><h4>Why this matters in practice</h4><p>What I like about this workflow is that it complements Hermes instead of replacing it.</p><p>Hermes gets better by remembering successful ways to solve problems.</p><p>Opik focuses on the failures that only appear after deployment. It traces them, helps diagnose the root cause, verifies the proposed fix, and turns that failure into a regression test. So the same issue is far less likely to slip through again.</p><p>Together, they cover both sides of the learning loop, where one learns from success and the other systematically learns from failure.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dDd-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dDd-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 424w, https://substackcdn.com/image/fetch/$s_!dDd-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 848w, https://substackcdn.com/image/fetch/$s_!dDd-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 1272w, https://substackcdn.com/image/fetch/$s_!dDd-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dDd-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png" width="1024" height="536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac502908-6499-4c19-975b-49d07c832445_1024x536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:536,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97051,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.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_!dDd-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 424w, https://substackcdn.com/image/fetch/$s_!dDd-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 848w, https://substackcdn.com/image/fetch/$s_!dDd-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 1272w, https://substackcdn.com/image/fetch/$s_!dDd-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac502908-6499-4c19-975b-49d07c832445_1024x536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h4>Running it yourself</h4><p>The full setup runs on Linux, macOS, or WSL2. Python 3.11+ comes with the Hermes installer. 8GB RAM is enough for API-based usage.</p><h5>Step 1: Hermes setup</h5><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;3a63459d-6c6a-4ad7-b588-d469a448e294&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrc   # or ~/.zshrc</code></pre></div><p>Run the setup wizard. It walks through provider, API key, model, and tools.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;78901b7f-652b-4066-8f05-0aec9fe0e8a2&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">hermes setup
hermes</code></pre></div><h5>Step 2: Install the Opik plugin</h5><p>Install it into the same Python environment as Hermes:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;e2a41e7d-c041-4a9a-bd92-f2aba6230cf7&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash"> ~/.hermes/hermes-agent/venv/bin/python3 -m pip install opik-hermes</code></pre></div><p>This pulls in the Opik SDK automatically as a dependency; no separate install needed.</p><h5>Step 3: Enable the plugin</h5><p>Add it to your Hermes config:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;b7701aa8-a0d7-4869-bf4e-4043701b124b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash"># ~/.hermes/config.yaml
plugins:
  enabled: [opik]</code></pre></div><p>The plugin registers itself through a Hermes entry point once installed, so this is the only step required to turn it on.</p><h5>Step 4: Configure Opik</h5><p>Set these in <code>~/.hermes/.env</code>. If you&#8217;re running local open-source Opik, <code>http://localhost:5173/api</code> then no API key is needed.</p><p>For Comet-hosted Opik, add your workspace and key instead:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;18424d1c-46f0-43df-b9db-23a670734ff2&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext"># ~/.hermes/.env
OPIK_API_KEY=...
OPIK_WORKSPACE=your-workspace
OPIK_PROJECT_NAME=Hermes Agent</code></pre></div><h5>Step 5: Restart Hermes and check the trace</h5><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;e83f64a7-d41d-4db0-ab70-e67585faddeb&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">hermes</code></pre></div><p>Talk to Hermes from the terminal UI however you normally do; every turn gets traced automatically. </p><p>Using the CLI directly:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;e34e875d-be12-4a7d-a410-1b69e1f4f784&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">hermes chat -q &#8220;list the files here and tell me how many there are&#8221;</code></pre></div><h5>Step 6: Connect Ollie</h5><p>Run this from your agent folder:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;6772de7d-227e-4306-b975-7166b98ed1f9&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">cd .hermes
opik connect --project &#8220;Hermes Agent&#8221;</code></pre></div><p>Open Opik and look for a trace named after your message, with an LLM span (input, output, model, and token cost) and a span for each tool call.</p><p>From here, the loop runs on its own. Every failure that lands in Opik gets diagnosed by Ollie. Once you approve, that failure locks permanently as a test case. So the test suite grows with every cycle.</p><p>One thing worth knowing as you scale is that Hermes limits an agent to 90 turns. Opik&#8217;s traces show where those turns are being spent, making it much easier to spot unnecessary loops and wasted steps.</p><h4>Putting it together</h4><p>Hermes and Opik aren&#8217;t trying to solve the same problem, and that&#8217;s exactly why they work well together.</p><p>Hermes improves from what already works. Opik makes sure production failures don&#8217;t just get patched and forgotten, turning each one into a fix that&#8217;s diagnosed, verified, and locked in as a regression test.</p><p>Taken together, the two systems cover much more of the self-improvement loop than either one does on its own.</p><p>The whole Opik stack ships in the open with Tracing, Test Suites, the Agent Sandbox, a 6-algorithm Agent Optimizer, and 50+ framework integrations, with the project past 20.8K stars on GitHub.</p><p>If you&#8217;d like to run Opik yourself, you can self-host it in three commands:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;e5c9b519-0bfc-4cae-a7cd-cf414f55658f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">git clone https://github.com/comet-ml/opik
cd opik
./opik.sh</code></pre></div><p>If you&#8217;re already running agents in production, it&#8217;s worth exploring what that extra half of the learning loop looks like in practice.</p><p><strong><a href="https://github.com/comet-ml/opik">Check out Comet ML and Opik &#8594;</a></strong></p><p>(don&#8217;t forget to star &#127775;)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z41r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z41r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 424w, https://substackcdn.com/image/fetch/$s_!Z41r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 848w, https://substackcdn.com/image/fetch/$s_!Z41r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 1272w, https://substackcdn.com/image/fetch/$s_!Z41r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z41r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png" width="1200" height="1065" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1065,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:299724,&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.dailydoseofds.com/i/208327613?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.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_!Z41r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 424w, https://substackcdn.com/image/fetch/$s_!Z41r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 848w, https://substackcdn.com/image/fetch/$s_!Z41r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 1272w, https://substackcdn.com/image/fetch/$s_!Z41r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f41be9c-37da-4a46-af32-994db9888ac2_1200x1065.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>&#128073; Over to you: Where does your debugging loop hand back to you, and is that failure gone for good or just gone for now?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[[Hands-on] How to Serve 5 Models On One GPU]]></title><description><![CDATA[How small specialized models are changing inference infrastructure, and why serving them efficiently takes more than standard serving frameworks.]]></description><link>https://blog.dailydoseofds.com/p/hands-on-how-to-serve-5-models-on</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/hands-on-how-to-serve-5-models-on</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Wed, 05 Aug 2026 20:02:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!szXp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Small models are changing how AI systems are built.</p><p>Production AI systems are moving from a single large model doing everything to several smaller models, each doing one job.</p><p>One parses the document, the next extracts fields, a third reranks search results, a vision model reads the image, and a final model handles generation.</p><p>At the model level, this usually brings the cost down quite a bit.</p><p>But the model is only part of the inference bill. You still need GPUs to run it, memory to keep it loaded, and a serving layer to batch and schedule the requests coming through it, which is why most teams don't experience the cost savings they expect.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!szXp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!szXp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 424w, https://substackcdn.com/image/fetch/$s_!szXp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 848w, https://substackcdn.com/image/fetch/$s_!szXp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 1272w, https://substackcdn.com/image/fetch/$s_!szXp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!szXp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png" width="1200" height="415" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:415,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114029,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.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_!szXp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 424w, https://substackcdn.com/image/fetch/$s_!szXp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 848w, https://substackcdn.com/image/fetch/$s_!szXp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 1272w, https://substackcdn.com/image/fetch/$s_!szXp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f26ce-5485-4313-9783-e6ab7f94db08_1200x415.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Today, we understand why that is the case, what serving small models well actually takes, and how the <a href="https://github.com/superlinked/sie"><span>&#8203;</span></a><strong><a href="https://github.com/superlinked/sie">SIE open-source inference engine</a></strong><span>&nbsp;</span>solves it end-to-end.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OwPZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OwPZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 424w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 848w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png" width="1456" height="919" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:919,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:143464,&quot;alt&quot;:&quot;&quot;,&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.dailydoseofds.com/i/204703366?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.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_!OwPZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 424w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 848w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><h4>Problem with standard serving tools</h4><p>Once an agentic pipeline starts using several model types, the multi-framework serving problem becomes a hardware problem too. </p><p>Even though pipelines rely on a mix of vLLM, TEI, and custom servers, each tool is great at what it does. The challenge is deciding where and how those models should actually run.</p><p>That leaves two practical ways to arrange them. Give each serving stack its own GPU, or put several of them on the same card.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uODr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uODr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uODr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uODr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uODr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uODr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg" width="1199" height="423" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:423,&quot;width&quot;:1199,&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_!uODr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uODr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uODr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uODr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d41e99-99f4-4391-96cf-ea1d573a328d_1199x423.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Unfortunately, with today&#8217;s standard AI serving tools, neither setup works cleanly.</p><h5>1. Give every model its own GPU</h5><p>The simplest setup is to give each serving stack its own GPU. There is no resource sharing to manage, and each service gets the hardware it needs.</p><p>vLLM handles the main LLM on one GPU, TEI gets another for embeddings and reranking, and your document processing, NER, and vision models each get their own dedicated GPUs.</p><p>While this setup works operationally, the issue comes down to GPU cost and utilization.</p><p>Take our earlier flood insurance claim pipeline, where work proceeds in the following sequence.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7NTl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7NTl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 424w, https://substackcdn.com/image/fetch/$s_!7NTl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 848w, https://substackcdn.com/image/fetch/$s_!7NTl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!7NTl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7NTl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png" width="1456" height="812" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:812,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5505583,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.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_!7NTl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 424w, https://substackcdn.com/image/fetch/$s_!7NTl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 848w, https://substackcdn.com/image/fetch/$s_!7NTl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!7NTl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5009f7a-b20b-4226-a83b-429478d17d48_2754x1536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 catch is that a single claim moves through those stages sequentially, so each dedicated GPU spends much of that time waiting for its turn.</p><p>Across many claims, those workloads can overlap, but that still doesn&#8217;t mean every dedicated GPU stays well utilized all the time.</p><p>So if each stage has its own dedicated GPU, the GPU running the document parser sits idle while the reranker runs. Then the reranker waits while the LLM runs.</p><p>That idle GPU also doesn&#8217;t get freed up or handed to something else. The serving process is still running on it, so the hardware stays allocated to that one stage the entire time, whether it&#8217;s doing anything or not.</p><p>That&#8217;s a real budget concern because GPU infrastructure is paid for by the time you hold it, not by how many seconds the GPU is actually computing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1mW6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1mW6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!1mW6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!1mW6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!1mW6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1mW6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1230927,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.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_!1mW6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!1mW6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!1mW6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!1mW6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dd5bca5-78e4-4c79-9f26-a0be55c34a18_1376x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Furthermore, many of these specialized models are small enough that they do not need an entire dedicated GPU.</p><p>An extraction model, reranker, or small vision model will use only a fraction of an L4 GPU&#8217;s 24 GB of memory, while also spending much of its time waiting for 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_!hm8f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hm8f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 424w, https://substackcdn.com/image/fetch/$s_!hm8f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 848w, https://substackcdn.com/image/fetch/$s_!hm8f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 1272w, https://substackcdn.com/image/fetch/$s_!hm8f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hm8f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png" width="1456" height="618" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:618,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1305775,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.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_!hm8f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 424w, https://substackcdn.com/image/fetch/$s_!hm8f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 848w, https://substackcdn.com/image/fetch/$s_!hm8f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 1272w, https://substackcdn.com/image/fetch/$s_!hm8f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ae895d-461c-41d6-9713-dc4be3275f06_1584x672.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>So adding more GPUs increases the bill while leaving capacity unused on each card.</p><p>Remember how your pipeline started with multiple specialized models? By the time you add extra steps, every new capability will demand its own serving process and another dedicated GPU before you know it.</p><p>You moved to smaller models to reduce the hardware needed per task. Now the hardware count grows with every new task you add.</p><h5>2. Fit multiple models on one GPU</h5><p>The other option looks much better from a cost perspective, where you put several of those models on the same GPU.</p><p>When the models fit within the GPU&#8217;s memory, there is no fundamental reason each needs its own GPU. A single L4, for example, has 24 GB of memory, which is enough to hold several small models at once.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rN5n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rN5n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 424w, https://substackcdn.com/image/fetch/$s_!rN5n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 848w, https://substackcdn.com/image/fetch/$s_!rN5n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 1272w, https://substackcdn.com/image/fetch/$s_!rN5n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rN5n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png" width="1200" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1141451,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.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_!rN5n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 424w, https://substackcdn.com/image/fetch/$s_!rN5n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 848w, https://substackcdn.com/image/fetch/$s_!rN5n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 1272w, https://substackcdn.com/image/fetch/$s_!rN5n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5aab7eda-3d14-4648-9e72-d900108c8e0e_1200x896.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 difficult part is not fitting the models onto the card. It is getting separate serving processes to share that card efficiently.</p><p>A serving process is usually built around the model it was started with. It manages that model&#8217;s memory, requests, and batches without knowing what the other processes on the same GPU are doing.</p><p>Take vLLM as an example. Its <code>--gpu-memory-utilization</code> setting defaults to <code>0.92</code>, which defines how much of the GPU memory that instance is allowed to use.</p><p>Run another serving process beside it, and that second process does not automatically know what vLLM is using or what memory could safely be made available to it.</p><p>Now try packing vLLM, TEI, and your custom parsing, extraction, and vision servers all onto the same 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_!ZGmc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZGmc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 424w, https://substackcdn.com/image/fetch/$s_!ZGmc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 848w, https://substackcdn.com/image/fetch/$s_!ZGmc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!ZGmc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZGmc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png" width="3252" height="1312" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1312,&quot;width&quot;:3252,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6393215,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb281a5f-909c-4bea-9a4e-10c8f6332313_3252x1312.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_!ZGmc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 424w, https://substackcdn.com/image/fetch/$s_!ZGmc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 848w, https://substackcdn.com/image/fetch/$s_!ZGmc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!ZGmc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c473ae5-4033-4d24-a992-70ec637c8a12_3252x1312.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 are deciding manually how much memory each process should be given to use before you even know what the actual traffic will look like: </p><ul><li><p><strong>Give one process too little room or card memory. </strong>And a long document or sudden batch can push one model beyond its limit. </p><p>When that happens, it doesn't just fail on its own; it can take every other model sharing that GPU down with 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_!Z0nz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z0nz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 424w, https://substackcdn.com/image/fetch/$s_!Z0nz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 848w, https://substackcdn.com/image/fetch/$s_!Z0nz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 1272w, https://substackcdn.com/image/fetch/$s_!Z0nz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z0nz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp" width="1456" height="640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:640,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75238,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp&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_!Z0nz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 424w, https://substackcdn.com/image/fetch/$s_!Z0nz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 848w, https://substackcdn.com/image/fetch/$s_!Z0nz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 1272w, https://substackcdn.com/image/fetch/$s_!Z0nz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd920a4c7-2060-4ed5-9cef-cfeed4a26249_1456x640.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong>Give one process too much room or card memory.</strong> That memory sits unavailable to every other model, even while it's sitting idle itself.</p></li></ul><h4>What a serving stack for small models needs</h4><p>First, step back from searching for another framework and understand the things we need the ideal server to do.</p><ul><li><p>The first requirement is breadth. The server has to run embeddings, rerankers, OCR, vision, extraction, and generation behind one API.</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_!eaUQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eaUQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 424w, https://substackcdn.com/image/fetch/$s_!eaUQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 848w, https://substackcdn.com/image/fetch/$s_!eaUQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!eaUQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eaUQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png" width="2842" height="1504" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1504,&quot;width&quot;:2842,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6119815,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0555d33a-efac-4364-9540-0907b5532ad8_2842x1504.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_!eaUQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 424w, https://substackcdn.com/image/fetch/$s_!eaUQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 848w, https://substackcdn.com/image/fetch/$s_!eaUQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!eaUQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25ef55f8-aee2-4574-a935-8866b97fd1b4_2842x1504.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>GPU utilization is the second problem. And that turns out to require more than a good scheduler. </p><p>Because to pack requests of different lengths into one pass without wasting compute, the engine has to control the batching and the attention path for every architecture it serves.</p></li><li><p>Model memory needs to follow traffic too. It should load and evict models as traffic moves, keeping the busy ones loaded and letting the idle ones move out.</p><p>So that a model is not holding memory the way a cold serverless worker or a padded vLLM instance does.</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_!vVGq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vVGq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 424w, https://substackcdn.com/image/fetch/$s_!vVGq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 848w, https://substackcdn.com/image/fetch/$s_!vVGq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 1272w, https://substackcdn.com/image/fetch/$s_!vVGq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vVGq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png" width="1456" height="698" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:698,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5657124,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.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_!vVGq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 424w, https://substackcdn.com/image/fetch/$s_!vVGq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 848w, https://substackcdn.com/image/fetch/$s_!vVGq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 1272w, https://substackcdn.com/image/fetch/$s_!vVGq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9440668a-c429-4a7a-8add-bfc49ad1a39a_2976x1426.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>And the serving layer still has to behave like production infrastructure with routing, autoscaling, monitoring, and GPU pools.</p><p>This is important since a bare runtime like vLLM is only the engine. On its own, it cannot spread load across replicas, add or remove GPUs as traffic changes.</p></li><li><p>And adding a new replica would be a config change, not a redeployment.</p></li></ul><p>Today, developers have to build all of this from scratch, spending months on custom engineering because different model families run completely differently under the hood.</p><ul><li><p>A Qwen model handles positions and attention differently.</p></li><li><p>A ColBERT model returns a vector for every token.</p></li><li><p>A reranker returns a single score and no vector at all.</p></li></ul><p>Building one engine that can hold all of those shapes and pack any of them into a full batch is critical work. And it is the reason this did not already exist as an open-source package.</p><h4>Open-source solution: Superlinked Inference Engine</h4><p>The solution to all of this is implemented in the open-source <strong><a href="https://github.com/superlinked/sie">Superlinked Inference Engine (SIE)</a></strong>.</p><p>SIE is an open-source inference engine that runs as a production cluster for multi-model pipelines on shared infrastructure.</p><p>It supports 100+ models through a unified API, so different model types can run through the same serving layer instead of each needing its own deployment.</p><p>One API is useful, but the bigger advantage is coordination. SIE can manage those models around the same GPU pool.</p><p>It runs as one cluster inside your own cloud, and it&#8217;s built for exactly the kind of multi-model pipeline we have been describing, i.e., several small models of different kinds running back to back on shared GPUs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lr4l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lr4l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 424w, https://substackcdn.com/image/fetch/$s_!lr4l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 848w, https://substackcdn.com/image/fetch/$s_!lr4l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!lr4l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lr4l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png" width="1456" height="711" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:711,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5088255,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.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_!lr4l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 424w, https://substackcdn.com/image/fetch/$s_!lr4l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 848w, https://substackcdn.com/image/fetch/$s_!lr4l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!lr4l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3baae5a-b05a-40f1-9a78-c143b21c3bcf_2950x1440.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>For the kinds of workloads we have been discussing for the flood insurance claim use case, SIE exposes multiple core primitives as:</p><ul><li><p><strong>extract</strong> does three different jobs in this pipeline: </p><ul><li><p>turning the claim form and policy document into clean markdown (<code>docling</code>)</p></li><li><p>pulling labeled fields like name, policy number, and date out of text (<code>gliner</code>)</p></li><li><p>and finding labeled flood-damaged categories in the claim photo (<code>grounding-dino</code>)</p></li></ul></li><li><p>Three genuinely different tasks of parsing, entity extraction, and vision detection using the same <code>extract</code> interface. </p><p>The models can be different underneath, but the serving interface doesn't have to be.</p></li><li><p><strong>score</strong> reranks the policy&#8217;s chunks against a query using <code>bge-reranker</code>, and returns the ranked list.</p></li><li><p><strong>generate</strong> takes everything gathered so far- parsed documents, extracted fields, policy language, and photo analysis- and produces the final review, using <code>Qwen3.5</code>.</p></li></ul><p>Under the old approach, TEI could handle the reranking stage, but that still leaves four other stages to serve separately.</p><p>Parsing, entity extraction, vision detection, and generation would each need their own serving setup.</p><p>A single SIE cluster runs all five stages without a separate serving stack for any of them. It gives us five stages, three primitives, and one shared serving layer.</p><p>The API is only the visible part. The interesting work happens underneath it, where SIE has to actually coordinate those models on shared GPUs.</p><h5>1. Models load only when they are needed</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lkC5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lkC5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lkC5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lkC5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lkC5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lkC5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg" width="1199" height="575" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:575,&quot;width&quot;:1199,&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_!lkC5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lkC5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lkC5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lkC5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6c56ca-0fcf-4b17-b9a4-0cf3f6b02d5f_1199x575.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 problem we had with standard serving tools was memory.</p><p>If several models share one GPU, we cannot keep every model loaded all the time and hope the memory works out. The serving layer needs to decide which models actually deserve space on the card.</p><p>SIE loads a model when a request actually needs it. </p><ul><li><p>When GPU memory becomes constrained, SIE evicts the least recently used model and makes room for another one.</p></li><li><p>The GPU is no longer permanently attached to one model. It becomes a shared pool that different models can use as traffic moves through the pipeline.</p></li></ul><h5>2. One queue sees all the work</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-4fa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-4fa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 424w, https://substackcdn.com/image/fetch/$s_!-4fa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 848w, https://substackcdn.com/image/fetch/$s_!-4fa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 1272w, https://substackcdn.com/image/fetch/$s_!-4fa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-4fa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png" width="1456" height="618" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bae09d78-538b-48de-925a-1f22d5902958_1584x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:618,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1249327,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.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_!-4fa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 424w, https://substackcdn.com/image/fetch/$s_!-4fa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 848w, https://substackcdn.com/image/fetch/$s_!-4fa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 1272w, https://substackcdn.com/image/fetch/$s_!-4fa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbae09d78-538b-48de-925a-1f22d5902958_1584x672.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 second problem was coordination in a shared pool of resources.</p><p>With separate serving processes, each model sees only its own requests. The document server does not know what the reranker is waiting for, and the reranker has no idea what the extraction service is doing.</p><p>SIE puts the work behind a shared queue instead.</p><ul><li><p>The gateway publishes requests into that common pool, and workers pull from it when they are ready to run. </p></li><li><p>That gives the serving layer a view of the workload across models instead of forcing every process to make scheduling decisions in isolation.</p></li></ul><h5>3. Batching follows compute cost</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-4HJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-4HJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-4HJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-4HJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-4HJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-4HJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg" width="1200" height="727" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:727,&quot;width&quot;:1200,&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_!-4HJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-4HJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-4HJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-4HJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d7a08d-6aff-4cc4-8403-288226f6e90c_1200x727.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>There is another source of waste once incoming requests start sharing the same GPU.</p><p>Requests are rarely the same size. If you batch a short input together with a much longer one, the shorter input is usually padded to the longer length. </p><p>The GPU then spends part of the computation processing padding rather than useful input.</p><ul><li><p>SIE groups requests by estimated compute cost instead of simply grouping a fixed number of requests together.</p></li><li><p>Requests with similar compute costs can be batched together, so shorter inputs don't spend most of their GPU time being padded to match much longer ones.</p></li></ul><h5>4. The shared server scales with the workload</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Drgt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Drgt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 424w, https://substackcdn.com/image/fetch/$s_!Drgt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 848w, https://substackcdn.com/image/fetch/$s_!Drgt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 1272w, https://substackcdn.com/image/fetch/$s_!Drgt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Drgt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png" width="1456" height="618" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:618,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1300535,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.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_!Drgt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 424w, https://substackcdn.com/image/fetch/$s_!Drgt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 848w, https://substackcdn.com/image/fetch/$s_!Drgt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 1272w, https://substackcdn.com/image/fetch/$s_!Drgt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8732eb65-0f9a-4335-b33f-3cd5491590d0_1584x672.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Sharing one GPU is useful locally, but production traffic does not stay constant.</p><ul><li><p>SIE puts a gateway and worker layer around the model-serving runtime so the same setup can scale beyond. </p></li><li><p>It matters because the shared-GPU idea should not end when you move from a laptop to a production cluster. The same serving layer needs to handle both.</p></li><li><p>The system can add workers as demand increases and scale back down when demand falls.</p></li></ul><p>SIE also provides deployment and operational pieces for production environments, including Kubernetes-oriented infrastructure, monitoring, and cloud deployment (AWS, GCP) support.</p><h5>5. Models come with their serving configuration</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GBH9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GBH9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GBH9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GBH9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GBH9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GBH9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg" width="1200" height="901" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:901,&quot;width&quot;:1200,&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_!GBH9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GBH9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GBH9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GBH9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3300633b-b5cf-4e01-b05f-00e60f9c627a_1200x901.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>There is one more problem that is very easy to underestimate.</p><p>Supporting a new model is not just downloading its weights. Different model architectures have different memory requirements, batching behavior, precision settings, and runtime characteristics.</p><p>A production serving layer therefore needs to know how each supported model should run instead of making you tune every model from scratch with vLLM or Triton, etc.</p><ul><li><p>SIE&#8217;s model catalog packages supported models with their serving configuration, so adding or swapping a supported model does not mean rebuilding an entire serving stack around it.</p></li><li><p>The current catalog covers 112 models. So you reference a model by name, and the engine loads it with settings known to work.</p></li></ul><h4>Proving it against a real document</h4><p>To see what serving looks like in practice, let&#8217;s execute our flood insurance claim review workflow in SIE (Superlinked Inference Engine).</p><p>The claim workflow spans plain text, formatted PDFs, and images, bringing multiple modalities together into a single pipeline.</p><p>The documents are deliberately messy, pulled straight from real public-domain sources to stress-test the pipeline:</p><ul><li><p>a proof-of-loss user form</p></li><li><p>a repair estimate cost</p></li><li><p>an insurance policy document</p></li><li><p>and a photograph of the actual flood damage</p></li></ul><p>Under the fragmented approach, this is the same five-tool sprawl covered earlier. SIE runs the same five jobs through one shared cluster instead.</p><p>None of these models does the same job. That means five serving setups where SIE runs the same five jobs through one shared cluster.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tW8A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tW8A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!tW8A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!tW8A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!tW8A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tW8A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1376750,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.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_!tW8A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!tW8A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!tW8A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!tW8A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882b9717-c6e3-4f62-b4e7-c9b2b72d1367_1376x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h4>One cluster executing five different jobs</h4><p>Here&#8217;s what the pipeline looks like, with each stage showing the task, model, and SIE endpoint it uses:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ajmR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ajmR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 424w, https://substackcdn.com/image/fetch/$s_!ajmR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 848w, https://substackcdn.com/image/fetch/$s_!ajmR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 1272w, https://substackcdn.com/image/fetch/$s_!ajmR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ajmR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png" width="1456" height="824" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:824,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:271275,&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.dailydoseofds.com/i/208720252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.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_!ajmR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 424w, https://substackcdn.com/image/fetch/$s_!ajmR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 848w, https://substackcdn.com/image/fetch/$s_!ajmR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 1272w, https://substackcdn.com/image/fetch/$s_!ajmR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F053a887d-4eaf-4d85-942d-1a549d9c9617_1552x878.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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, start by installing and starting the server. The <code>serve</code> command starts the server on port 8080.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;07749782-5ec7-4615-bdcf-852871c20b96&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">pip install "sie-server[local]"
sie-server serve</code></pre></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u7P0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u7P0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 424w, https://substackcdn.com/image/fetch/$s_!u7P0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 848w, https://substackcdn.com/image/fetch/$s_!u7P0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!u7P0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u7P0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg" width="1199" height="537" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:537,&quot;width&quot;:1199,&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_!u7P0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 424w, https://substackcdn.com/image/fetch/$s_!u7P0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 848w, https://substackcdn.com/image/fetch/$s_!u7P0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!u7P0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24b17a7f-c38c-4da7-892b-aeeecb70662a_1199x537.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It is ready when the health check answers.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;aef93459-316e-4ace-9abc-34e81f8d5326&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">curl http://localhost:8080/readyz     # ok</code></pre></div><p>Now, instantiate the client and point it at the running server:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;ed06bb51-328b-4a02-bb7a-012f8136b0fd&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from sie_sdk import SIEClient

client = SIEClient("http://localhost:8080")</code></pre></div><p>Every stage of the rest of the pipeline now goes through this one object and this one endpoint, no matter which model it hits.</p><p>Let&#8217;s walk through them one by one.</p><h5>1. Parsing the policy documents</h5><p>The proof-of-loss form, the repair estimate cost, and the insurance policy all go through <code>docling</code> for parsing, turning documents into clean markdown.</p><p>Docling is an open-source document parser that reads PDFs and structured documents and outputs clean markdown while keeping tables and layout intact.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;96bd9943-e754-42fb-a28d-c88c93e1e448&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">result = client.extract(
    "docling",
    Item(id=path.stem, document=path),
    options={"profile": "default"},
)
markdown = result["data"]["markdown"]

print(markdown)
# "# Proof of Loss\n\nPolicyholder: ...\n\nDate of Loss: ..."</code></pre></div><p>Parsing calls go through the <code>extract</code> endpoint. <code>extract</code> is SIE&#8217;s general-purpose call turns raw input, text, or image into structured or clean output. </p><p>So a document parser, an entity extractor, and a vision model can all sit behind the same endpoint even though they&#8217;re doing different work underneath.</p><h5>2. Pulling the claim identity</h5><p>Once the proof-of-loss form is in Markdown, an extraction model pulls the structured fields actually needed. i.e., name, loss date, property address, etc.</p><p>GLiNER is doing named entity extraction here, which means it can identify fields from labels you provide instead of needing a fixed schema baked into the model.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;9dee6157-5862-4e8e-9f04-ff54894a6922&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">labels = [
    "insured name",
    "date and time loss",
    "flood insurance policy number",
    "insured property address",
]
result = client.extract(
    "fastino/gliner2-large-v1",
    Item(id="claim-identity", text=markdown[:5000]),
    labels=labels,
)

print(result["data"])
# [
#   {"label": "insured name", "text": "...", "score": 0.97, "start": 0, "end": 0},
#   {"label": "date and time loss", "text": "...", "score": 0.96, "start": 0, "end": 0},
#   ...
# ]</code></pre></div><h5>3. Finding the policy language</h5><p>The policy document is long, so a naive approach would rerank every chunk against the query. </p><p>The cross-encoder reads the query and a candidate together and outputs a relevance score. This means every chunk it evaluates costs a full pass, not a cheap lookup. </p><p>So we will filter first before actual reranking: </p><ul><li><p>It scores candidate chunks by keyword overlap, with terms like &#8220;proof of loss,&#8221; &#8220;signed,&#8221; and &#8220;60 days,&#8221; before sending only the strongest candidates to the reranker.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;2a4af335-14e7-482c-8fc6-5b1425e0568c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">score_result = client.score(
    "BAAI/bge-reranker-v2-m3",
    Item(id="policy-requirements", text=POLICY_QUERY),
    [Item(id=str(i), text=text) for i, text in candidates],
)

print(score_result["scores"])
# [{'item_id': '0', 'rank': 0, 'score': 3.009},
#  {'item_id': '1', 'rank': 1, 'score': -1.061},
#  {'item_id': '2', 'rank': 2, 'score': -11.425}]</code></pre></div><p>SIE has the <code>score()</code> method that uses a cross-encoder. The scores are cross-encoder logits, so the absolute numbers do not mean much on their own. </p><p>Instead, the order is important. The results come back already ranked, so the top passage is the best match:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;2c15d108-6ca7-418c-a892-f65104e568fc&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">best_id = score_result["scores"][0]["item_id"]

best = candidates[int(best_id)][1]
# 'Proof of loss must be signed and submitted within 60 days of the date of loss.'</code></pre></div><h5>4. Reading the damage photo</h5><p>The damage photograph goes through zero-shot object detection, looking for specific damage categories with a confidence floor.</p><p>Zero-shot means the model was never trained on these exact labels of 'standing water&#8217; and 'flooded room.&#8217; So just text descriptions are handed to it at request time. </p><p>And it matches them against the image directly instead of needing a model fine-tuned to recognize this specific list of categories in advance.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;4933706b-09bf-45ff-aabe-8bd1827d009f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">labels = ["standing water", "flooded room", "water damaged wall", "damaged furniture"]
result = client.extract(
    "IDEA-Research/grounding-dino-tiny",
    Item(id="damage-photo", images=[photo_path]),
    labels=labels,
    options={"score_threshold": 0.05},
)

print(result["data"])
# [
#   {"label": "furniture", "score": 0.509, "bbox": [412, 890, 1180, 1640]},
#   {"label": "standing water", "score": 0.276, "bbox": [50, 1500, 2900, 2280]},
# ]</code></pre></div><h5>5. Writing the review</h5><p>By this point, the pipeline has written out its own set of intermediate results as markdown for each parsed document, the structured claim identity, the ranked policy passages, and the photo analysis. </p><p>Those feed into one generation call, which produces the final review. The output is locked to a JSON schema, so the result has a fixed structure.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;21bc2707-25c3-48a7-b2b4-86b7c6d60f3b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">result = client.generate(
    "Qwen/Qwen3.5-4B:no-spec",
    generation_prompt,
    max_new_tokens=1500,
    temperature=0,
    top_p=1,
)

print(result["data"])
# {
#   "status": "manual_review",
#   "findings": [
#     {
#       "severity": "blocking",
#       "detail": "Proof of Loss lacks required signature and date."
#     }
#   ]
# }</code></pre></div><p>For generation, SIE invokes <code>generate()</code> to compose the answer. This is free text with token usage, produced by a generative model, and it comes back through the same client as the entities, the scores, and the bounding boxes.</p><h4>Run it yourself</h4><p>Finally, we have a whole pipeline with five models, three shared primitives, <code>extract</code>, <code>score</code>, and <code>generate</code>, running through one client against one SIE cluster.</p><p>The important part is that these five stages do not require five separate serving stacks. How you place the models underneath that serving layer depends on the available GPU memory and the models you need to run.</p><p>For this example, you can also run two SIE servers:</p><ul><li><p>one for Docling, GLiNER2, and reranking</p></li><li><p>a second for Grounding DINO and Qwen&#8217;s generation</p></li></ul><p>Or, if you want to reuse a single GPU, you can load one model bundle, run its calls, release it, and then load the second bundle.</p><p>So the deployment can use multiple servers or reuse the same GPU. The serving layer stays the same.</p><p>Five models are pulled from Hugging Face on their first call and stay active for subsequent requests while their bundle is loaded.</p><p>Run the five calls end to end, inspect what each model returns, and see how the whole pipeline runs through SIE.</p><p>Want to try the pipeline without building it from scratch? </p><p>The repository includes notebooks that walk through the complete insurance-claim workflow, along with the full code and server setup.</p><p><strong><a href="https://github.com/superlinked/sie/tree/main/examples/insurance-claims-agent">Full example and notebooks &#8594;</a></strong></p><p>(Don&#8217;t forget to &#11088; the repo.)</p><div><hr></div><p>Using small, specialized models for the narrow tasks is the right approach, and it is not really controversial. </p><p>They are accurate enough on the task they are trained for, and they keep your data in your own environment.</p><p>But switching to small models does not make inference cheaper by itself. It moves the cost from a per-token bill to the GPUs you rent, and if you put each model on its own GPU, most of that hardware sits idle, and you are paying for it.</p><p>The saving only appears when the models share GPUs, and that requires a single engine that can run all of them. The moment you serve each model with a different tool, each one takes a GPU of its own again.</p><p><strong><a href="http://github.com/superlinked/sie"><span>SIE</span></a><span> </span></strong>(open-source) already implements that, letting you run the different models your agent needs on one shared cluster, with the routing and autoscaling for production you&#8217;d otherwise have to build yourself.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KNY6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KNY6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KNY6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KNY6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KNY6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KNY6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg" width="1199" height="757" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:757,&quot;width&quot;:1199,&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_!KNY6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KNY6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KNY6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KNY6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F893bdda0-0e1f-4cf8-a031-95f36c000892_1199x757.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It also plugs into your existing stack, from vector databases (Chroma, Qdrant) to agent frameworks (LangChain, CrewAI). And it even has drop-in OpenAI compatibility, so existing embedding or chat can just point at a new URL.</p><p><strong><a href="https://github.com/superlinked/sie">Superlinked GitHub (100% Open Source) &#8594;</a></strong></p><p><span>&#128073;</span> Over to you: how many separate models does a single request in your stack call, and how many of them are holding a dedicated GPU right now?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[Why Your Agent Remembers Everything and Understands Nothing]]></title><description><![CDATA[Building a pattern recognition layer for memory in production.]]></description><link>https://blog.dailydoseofds.com/p/why-your-agent-remembers-everything</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/why-your-agent-remembers-everything</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Tue, 04 Aug 2026 21:12:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hd-8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p>Code verification that runs inside the agent&#8217;s session.</p></li><li><p>Your Agent remembers everything and understands nothing.</p></li><li><p>&#8203;Automatic LLM routing in two lines of code.</p></li></ul><div><hr></div><h3><strong><a href="https://fandf.co/3Rp9xo9">Code verification that runs inside the agent&#8217;s session</a></strong></h3><p>GitGuardian tracked every public GitHub commit last year and found Claude Code-assisted commits leaked credentials at 3.2%, against a 1.5% human baseline.</p><p>Most teams catch this with a pre-commit hook that shells out to a scanner, or a script that pipes findings back into the agent&#8217;s context. </p><p>Both are glue you maintain, and both run outside the session where the code gets written.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hVHb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hVHb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 424w, https://substackcdn.com/image/fetch/$s_!hVHb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 848w, https://substackcdn.com/image/fetch/$s_!hVHb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 1272w, https://substackcdn.com/image/fetch/$s_!hVHb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hVHb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png" width="1456" height="845" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:845,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1407267,&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.dailydoseofds.com/i/209102583?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.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_!hVHb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 424w, https://substackcdn.com/image/fetch/$s_!hVHb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 848w, https://substackcdn.com/image/fetch/$s_!hVHb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 1272w, https://substackcdn.com/image/fetch/$s_!hVHb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28696dd7-2c3c-4695-b2d0-d7a8538d0bf2_1716x996.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://fandf.co/3Rp9xo9">SonarQube CLI</a></strong> (by Sonar) removes that glue. One command registers the hooks and configures the SonarQube MCP server in Claude Code:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;c125d4aa-c972-488d-8c85-dff7043f7218&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">sonar integrate claude -p &lt;your-project&gt;</code></pre></div><p>Secrets detection and the MCP server run on the SonarQube free tier, with context augmentation and deeper code analysis on paid plans as part of Sonar Vortex.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!byPf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!byPf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 424w, https://substackcdn.com/image/fetch/$s_!byPf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 848w, https://substackcdn.com/image/fetch/$s_!byPf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!byPf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!byPf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png" width="1444" height="1440" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1440,&quot;width&quot;:1444,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:835148,&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.dailydoseofds.com/i/209102583?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.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_!byPf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 424w, https://substackcdn.com/image/fetch/$s_!byPf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 848w, https://substackcdn.com/image/fetch/$s_!byPf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!byPf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F765cb319-55b7-4c7e-ac70-25f3f145b194_1444x1440.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>After that, secrets detection runs on every file the agent reads or writes and every prompt submission, static analysis checks whatever the agent just wrote, and the MCP server puts those findings in Claude&#8217;s context so it can fix its own issues.</p><p>Because the hooks sit in the session rather than in CI, the agent gets the finding while it still has the context to fix it.</p><p><strong><a href="https://fandf.co/3Rp9xo9">Find the SonarQube CLI GitHub repo here &#8594;</a></strong></p><p>(don&#8217;t forget to star it &#11088; )</p><p><em>Thanks to Sonar for partnering today!</em></p><div><hr></div><h3><a href="https://github.com/getzep/graphiti">Your Agent remembers everything and understands nothing</a></h3><p>Every agent memory system today solves the same problem. They store facts and retrieve the right ones at query time.</p><p>The part that&#8217;s missing is pattern recognition.</p><p>Consider a project management assistant that reads status updates from an engineering team. Three people filled out updates in the same week. Each one reports a blocker, and each report is accurate and specific. </p><p>The agent stores all three and can retrieve any of them on request. </p><p>What it can&#8217;t tell you is that all three blockers trace back to a single delayed task.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lvD9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lvD9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 424w, https://substackcdn.com/image/fetch/$s_!lvD9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 848w, https://substackcdn.com/image/fetch/$s_!lvD9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 1272w, https://substackcdn.com/image/fetch/$s_!lvD9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lvD9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png" width="1456" height="815" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0a5993f-93bf-4204-b128-652b69658479_2264x1268.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:815,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:937884,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.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_!lvD9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 424w, https://substackcdn.com/image/fetch/$s_!lvD9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 848w, https://substackcdn.com/image/fetch/$s_!lvD9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 1272w, https://substackcdn.com/image/fetch/$s_!lvD9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a5993f-93bf-4204-b128-652b69658479_2264x1268.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Think of it like this. A new project manager reads three status updates and sees three problems to solve. An experienced one reads the same three and sees one problem with three symptoms. </p><p>Nobody taught the experienced PM to connect them. They&#8217;ve sat through enough standups to recognize the shape.</p><p>Agent memory today gives you the new PM. It stores every update correctly, retrieves them accurately, but misses the structure connecting them,</p><p><strong><a href="https://www.getzep.com/">Zep</a></strong> implements a feature called <strong><a href="https://help.getzep.com/observations">Observations</a></strong> that addresses this. It automatically detects cross-conversation patterns from the knowledge graph and surfaces them as durable, evidence-backed context the agent can use.</p><p>Let&#8217;s look at how it works.</p><div><hr></div><h4>How the knowledge graph stores data</h4><p>Zep builds a knowledge graph from conversations and business data. The structure has three building blocks:</p><ul><li><p><strong>Entities</strong> are the nouns: people, products, places, tasks, services.</p></li><li><p><strong>Facts</strong> are specific claims connecting two entities, stored as labeled edges.</p></li><li><p><strong>Episodes</strong> are the raw source material: the actual conversation messages, JSON payloads, or documents that Zep ingested. Every fact traces back to the episode it was extracted from.</p></li></ul><p>Graphs can be scoped to a single user or shared across a team. </p><p>A user graph holds one person&#8217;s history. A shared graph holds everything about a project, a workspace, or an organization, with data from many people flowing into the same structure.</p><p>Here&#8217;s a concrete example of a shared project graph. </p><p>Three engineers file status updates with a PM assistant over one week:</p><ul><li><p><strong>Alice (Monday):</strong> The API migration is blocked. She&#8217;s waiting on the auth service refactor, which the backend team owns.</p></li><li><p><strong>Bob (Wednesday):</strong> The payments integration is stalled. He&#8217;s also waiting on the auth service refactor from the backend team.</p></li><li><p><strong>Clara (Friday):</strong> The checkout flow can&#8217;t move forward because the payments integration isn&#8217;t ready. That work belongs to Bob.</p></li></ul><p>Zep processes each update as an episode, extracts the entities and facts automatically, and builds the knowledge graph:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N5hu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N5hu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 424w, https://substackcdn.com/image/fetch/$s_!N5hu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 848w, https://substackcdn.com/image/fetch/$s_!N5hu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 1272w, https://substackcdn.com/image/fetch/$s_!N5hu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N5hu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png" width="1456" height="844" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:844,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52587,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.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_!N5hu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 424w, https://substackcdn.com/image/fetch/$s_!N5hu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 848w, https://substackcdn.com/image/fetch/$s_!N5hu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 1272w, https://substackcdn.com/image/fetch/$s_!N5hu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eda1a35-ba2a-4d3e-bea1-13754592a0a8_2937x1702.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Every fact is accurate and individually retrievable. What the graph doesn&#8217;t contain is the shape those facts form together.</p><div><hr></div><h4>Why better retrieval doesn&#8217;t solve this</h4><p>When the agent queries &#8220;what&#8217;s blocking the team,&#8221; it gets back the stored facts:</p><ul><li><p>Alice is blocked on the API migration</p></li><li><p>The API migration is waiting on the auth service refactor</p></li><li><p>Bob is blocked on the payments integration</p></li><li><p>The payments integration is waiting on the auth service refactor</p></li><li><p>Clara is blocked on the checkout flow</p></li><li><p>The checkout flow is waiting on the payments integration</p></li></ul><p>Every line is correct, but nothing in the result tells the agent that unblocking one task clears all three people.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hd-8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hd-8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 424w, https://substackcdn.com/image/fetch/$s_!hd-8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 848w, https://substackcdn.com/image/fetch/$s_!hd-8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 1272w, https://substackcdn.com/image/fetch/$s_!hd-8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hd-8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png" width="1456" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1133474,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.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_!hd-8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 424w, https://substackcdn.com/image/fetch/$s_!hd-8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 848w, https://substackcdn.com/image/fetch/$s_!hd-8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 1272w, https://substackcdn.com/image/fetch/$s_!hd-8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28c38093-68e4-437c-a7a6-4a04dbb4ae1d_2660x1462.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 tune the reranker, widen the search scope, or return more results. </p><p>None of it helps, because the insight the agent needs was never stored as a discrete piece of content. It exists in how the facts connect across three separate conversations.</p><p>The workaround most teams reach for is a rule: flag any task that three or more people mention as a blocker. It just tells you the team is stuck without telling you which task to unblock first, and it only catches blockers that people name directly. </p><p>Clara never mentions the auth service. Her update is two hops away from the actual cause.</p><p>At this scale, a person could connect the dots manually. But at thirty status updates a week, nobody does, and that&#8217;s exactly when the chain matters most.</p><div><hr></div><h4>What Observations produce</h4><p>For this project graph, Zep generates:</p><blockquote><p><strong>Name:</strong> Auth service refactor blocking multiple workstreams</p><p><strong>Summary:</strong> The auth service refactor, owned by the backend team, is the root blocker in a dependency chain affecting three workstreams. Alice&#8217;s API migration and Bob&#8217;s payments integration are both waiting on it directly. Clara&#8217;s checkout flow is blocked downstream of the payments integration. Unblocking the auth service refactor clears all three.</p></blockquote><p>No individual fact in the graph contains this. It spans three people, four work items, and three separate conversations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SSAR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SSAR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SSAR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SSAR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SSAR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SSAR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png" width="1456" height="786" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:786,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:472144,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.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_!SSAR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SSAR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SSAR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SSAR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4882fd5-85df-4d8f-ad6c-55251df7b241_1896x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Three properties make observations different from individual facts:</p><ul><li><p><strong>Cross-entity:</strong> A fact sits on one edge between two entities. An observation synthesizes across an entire cluster, connecting multiple entities and conversations.</p></li><li><p><strong>Evidence-backed:</strong> Every claim traces to specific facts and episodes in the graph.</p></li><li><p><strong>Read-only:</strong> You can&#8217;t manually create, edit, or delete observations. They follow the evidence. The mechanism below explains why.</p></li></ul><div><hr></div><h4>How Observations are created</h4><p>The mechanism is a two-stage pipeline:</p><ul><li><p>A deterministic algorithm first handles the clustering </p></li><li><p>An LLM writes the summary afterward. The model never decides what gets grouped.</p></li></ul><h5>Reducing facts to signatures</h5><p>Zep runs a background process that periodically checks for new data. When new conversations have been ingested and the graph has settled, it kicks off the analysis.</p><p>The first step reduces every fact to a <strong>signature</strong>: the two entities it connects plus the relationship type. The goal is to find which conversations reference the same relationships between the same entities.</p><p>After reduction, each episode (conversation) has a set of signatures:</p><ul><li><p><strong>Episode 1</strong> (Alice&#8217;s update): <code>(Alice, API Migration)</code>, <code>(API Migration, Auth Service)</code>, <code>(Auth Service, Backend Team)</code></p></li><li><p><strong>Episode 2</strong> (Bob&#8217;s update): <code>(Auth Service, Backend Team)</code>, <code>(Payments Integration, Auth Service)</code>, <code>(Bob, Payments Integration)</code></p></li><li><p><strong>Episode 3</strong> (Clara&#8217;s update): <code>(Bob, Payments Integration)</code>, <code>(Checkout Flow, Payments Integration)</code>, <code>(Clara, Checkout Flow)</code></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_!RBeV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RBeV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 424w, https://substackcdn.com/image/fetch/$s_!RBeV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 848w, https://substackcdn.com/image/fetch/$s_!RBeV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 1272w, https://substackcdn.com/image/fetch/$s_!RBeV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RBeV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png" width="1456" height="531" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:531,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:65510,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.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_!RBeV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 424w, https://substackcdn.com/image/fetch/$s_!RBeV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 848w, https://substackcdn.com/image/fetch/$s_!RBeV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 1272w, https://substackcdn.com/image/fetch/$s_!RBeV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa0299b-0daa-46a8-b1c5-836748132cbc_3030x1105.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 overlaps become visible:</p><ul><li><p><code>(Auth Service, Backend Team)</code> appears in Episode 1 and Episode 2</p></li><li><p><code>(Bob, Payments Integration)</code> appears in Episode 2 and Episode 3</p></li><li><p>Episode 1 and Episode 3 share nothing</p></li></ul><p>Alice never mentions Bob, Clara, the payments integration, or the checkout flow. Clara never mentions Alice, the auth service, or the backend team.</p><h5>Building the episode graph</h5><p>Here, Zep flips the perspective.</p><p>Instead of looking at entities connected by facts, it builds an <strong>episode graph</strong> where conversations are the nodes and shared signatures are the edges.</p><ul><li><p>Episode 1 links to Episode 2 through <code>(Auth Service, Backend Team)</code></p></li><li><p>Episode 2 links to Episode 3 through <code>(Bob, Payments Integration)</code></p></li><li><p>Episode 1 and Episode 3 don&#8217;t share a signature</p></li></ul><p>But all three end up in the same <strong>connected component</strong> because Episode 2 bridges them.</p><p>Alice&#8217;s update and Clara&#8217;s update join the same cluster despite having no entity in common, because Bob&#8217;s update touches both sides and acts as the bridge between the two.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-02_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-02_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 424w, https://substackcdn.com/image/fetch/$s_!-02_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 848w, https://substackcdn.com/image/fetch/$s_!-02_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 1272w, https://substackcdn.com/image/fetch/$s_!-02_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-02_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png" width="1456" height="750" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe428802-3983-45d6-9c56-6dc487638595_2673x1377.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:750,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:47480,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.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_!-02_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 424w, https://substackcdn.com/image/fetch/$s_!-02_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 848w, https://substackcdn.com/image/fetch/$s_!-02_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 1272w, https://substackcdn.com/image/fetch/$s_!-02_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe428802-3983-45d6-9c56-6dc487638595_2673x1377.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Worth noticing that the chain the algorithm follows, and the dependency chain in the project are the same structure. Zep finds the root blocker by following exactly the kind of transitive link it was built to follow.</p><p>This does not use embeddings, semantic similarity, and no ML model. It&#8217;s pure graph topology: which conversations share facts about the same entity pairs, and how those shared pairs chain them into connected groups.</p><p>The distinction matters because embedding-based clustering groups content that discusses similar topics. All three status updates would cluster together under that approach simply because they&#8217;re all about engineering work, along with every other status update that week. </p><p>Signature-based clustering groups episodes that reference the same relationships between the same entities, which is what makes the specific chain detectable.</p><h5>Summarizing the cluster</h5><p>Once the algorithm identifies the connected component, an LLM writes the summary.</p><p>A single, constrained LLM call receives the cluster&#8217;s key entities, the supporting conversations in chronological order, and the relationship types. </p><p>It then returns a name and summary steered toward durable signals like decisions, constraints, dependencies, and state changes, and restricted to facts the evidence explicitly supports.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bSwb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bSwb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 424w, https://substackcdn.com/image/fetch/$s_!bSwb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 848w, https://substackcdn.com/image/fetch/$s_!bSwb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 1272w, https://substackcdn.com/image/fetch/$s_!bSwb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bSwb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png" width="1456" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66586,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.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_!bSwb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 424w, https://substackcdn.com/image/fetch/$s_!bSwb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 848w, https://substackcdn.com/image/fetch/$s_!bSwb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 1272w, https://substackcdn.com/image/fetch/$s_!bSwb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa818bb-9dc7-4ac3-84f8-48b8f6df4c95_2836x1402.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Every structural property of the observation (which entities, which conversations, the time window) is decided by the algorithm. The LLM only turns that structure into readable prose.</p><p>This is why observations are read-only. They&#8217;re structural properties of the graph, described in natural language. When the evidence changes:</p><ul><li><p>New conversations that fit an existing observation cause it to be regenerated with the new evidence</p></li><li><p>Contradicting evidence causes the old observation to be retired</p></li><li><p>The graph always reflects the current state of what is known&#8217;</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_!AqE1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AqE1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 424w, https://substackcdn.com/image/fetch/$s_!AqE1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 848w, https://substackcdn.com/image/fetch/$s_!AqE1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 1272w, https://substackcdn.com/image/fetch/$s_!AqE1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AqE1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png" width="1456" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:818801,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.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_!AqE1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 424w, https://substackcdn.com/image/fetch/$s_!AqE1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 848w, https://substackcdn.com/image/fetch/$s_!AqE1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 1272w, https://substackcdn.com/image/fetch/$s_!AqE1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F006a1759-ef21-419a-8a6c-17119ba06b1d_2428x1198.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>If the backend team ships the auth service refactor next week, the observation updates. Alice and Bob unblock, Clara&#8217;s dependency shifts, and the pattern reforms around whatever is actually blocking work now.</p><div><hr></div><h4>How does this help the agent</h4><p>Retrieving observations through the SDK:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;c3ab27a3-bb80-4772-b067-7f1d0a45d603&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python"># List all observations for a project graph
observations = client.graph.observation.get_by_graph_id(graph_id="project-atlas&#8221;)

# Search observations by relevance
results = client.graph.search(
    graph_id="project-atlas&#8221;,
    query="blocked workstreams&#8221;,
    scope="observations&#8221;,
)</code></pre></div><p>Now consider the PM asking the agent what the team should prioritize this week.</p><p><strong>Without observations,</strong> the agent retrieves the blocker facts and lists them. Three people are blocked. Two mention the auth service. One mentions the payment integration. The PM gets an accurate summary and still has to work out the ordering.</p><p><strong>With observations,</strong> the agent&#8217;s context includes the dependency chain. It reports that the auth service refactor is the root blocker, that unblocking it clears Alice and Bob directly and Clara downstream, and that the single highest-leverage action this week is getting the backend team the resources to finish it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1Ldi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1Ldi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 424w, https://substackcdn.com/image/fetch/$s_!1Ldi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 848w, https://substackcdn.com/image/fetch/$s_!1Ldi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 1272w, https://substackcdn.com/image/fetch/$s_!1Ldi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1Ldi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png" width="1456" height="834" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:834,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1010052,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.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_!1Ldi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 424w, https://substackcdn.com/image/fetch/$s_!1Ldi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 848w, https://substackcdn.com/image/fetch/$s_!1Ldi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 1272w, https://substackcdn.com/image/fetch/$s_!1Ldi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d51f993-db82-406b-8401-b73cff0caa5d_2461x1410.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Same query, same data. One response describes the situation. The other identifies the action.</p><div><hr></div><p>The progression of context in Zep:</p><ul><li><p><strong>Episodes</strong> store raw conversation data</p></li><li><p><strong>Facts</strong> structure it into timestamped claims</p></li><li><p><strong>Entity summaries</strong> narrate the history of individual nodes</p></li><li><p><strong>Observations</strong> synthesize patterns across the cluster</p></li></ul><p>Each layer answers a different type of question. Together, they move agents from recall toward understanding.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OpSU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OpSU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 424w, https://substackcdn.com/image/fetch/$s_!OpSU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 848w, https://substackcdn.com/image/fetch/$s_!OpSU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 1272w, https://substackcdn.com/image/fetch/$s_!OpSU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OpSU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png" width="1456" height="679" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:679,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:650016,&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.dailydoseofds.com/i/208177138?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.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_!OpSU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 424w, https://substackcdn.com/image/fetch/$s_!OpSU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 848w, https://substackcdn.com/image/fetch/$s_!OpSU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 1272w, https://substackcdn.com/image/fetch/$s_!OpSU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa66cdd-5b7e-4474-91a8-350df47adfcb_2352x1097.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Alice, Bob, and Clara each filed an accurate status update. Every fact went into the graph correctly, and every one was retrievable. </p><p>What none of them could report, because none of them could see it, was the chain running underneath all three.</p><p>That&#8217;s the gap Observations closes. Not better retrieval of what people said, but structural analysis of what their combined data shows.</p><p><strong>Resources:</strong></p><ul><li><p><strong><a href="https://github.com/getzep/graphiti">Zep Graphiti GitHub repo &#8594;</a></strong></p></li><li><p><strong><a href="https://help.getzep.com/observations">Zep Observations docs &#8594;</a></strong></p></li></ul><p>&#128073; Over to you: have you built an agent where the memory system returned the right facts but still missed the structure connecting them?</p><div><hr></div><h3><a href="https://github.com/katanemo/plano"><span>&#8203;</span></a><strong><a href="https://github.com/katanemo/plano">Automatic LLM routing in two lines of code!</a></strong><a href="https://github.com/katanemo/plano"><span>&#8203;</span></a></h3><p>Teams usually hardcode the model directly into every LLM call, which means every task gets the same model regardless of what it actually needs.</p><p>But the prompt intent is already the signal you need to route differently.</p><p>A smart approach is actually implemented in <a href="https://github.com/katanemo/plano"><span>&#8203;</span></a><strong><a href="https://github.com/katanemo/plano">Plano (open-source)</a></strong>, which lets you do that with just one config change.</p><p>See the code snippet below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H_PQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H_PQ!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 424w, https://substackcdn.com/image/fetch/$s_!H_PQ!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 848w, https://substackcdn.com/image/fetch/$s_!H_PQ!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 1272w, https://substackcdn.com/image/fetch/$s_!H_PQ!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H_PQ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif" width="993" height="738" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:738,&quot;width&quot;:993,&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_!H_PQ!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 424w, https://substackcdn.com/image/fetch/$s_!H_PQ!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 848w, https://substackcdn.com/image/fetch/$s_!H_PQ!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 1272w, https://substackcdn.com/image/fetch/$s_!H_PQ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bca485d-c73f-44b1-8089-8ae9d2bcfe38_993x738.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Point <code>base_url</code> to Plano&#8217;s local endpoint, and your client starts routing based on prompt intent.</p><p>For instance:</p><ul><li><p>&#8220;Write a binary search&#8221; routes to `claude-sonnet-4.5` for code generation.</p></li><li><p>&#8220;Capital of France?&#8221; routes to `gpt-4o-mini` for general tasks.</p></li></ul><p>You don&#8217;t need to touch a single line of your agent code.</p><p><code>planoai obs</code> is Plano&#8217;s observability command.</p><p>It gives you a live view of every routing decision, the model picked, the route taken, and the cost per request.</p><p>Plano is fully open-source, and you can self-host it natively or via Docker.</p><p>GitHub repo: <a href="https://github.com/katanemo/plano"><span>&#8203;</span></a><strong><a href="https://github.com/katanemo/plano">https://github.com/katanemo/plano &#8594;</a></strong><a href="https://github.com/katanemo/plano"><span>&#8203;</span></a></p><p>(don&#8217;t forget to star it &#11088; )</p><p>To see this in practice, we put this exact pipeline in front of my Hermes agent, and the bill dropped 2x, without changing a line of agent code. I have also written an article with the complete walkthrough about it.</p><p><a href="https://www.dailydoseofds.com/p/how-to-reduce-llm-costs-by-50-60-using-model-routing/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/p/how-to-reduce-llm-costs-by-50-60-using-model-routing/">Read it here &#8594;</a></strong><a href="https://www.dailydoseofds.com/p/how-to-reduce-llm-costs-by-50-60-using-model-routing/"><span>&#8203;</span></a></p>]]></content:encoded></item><item><title><![CDATA[The Hands-on AI Engineer Playbook to Build RAG Apps for Production]]></title><description><![CDATA[Why RAG latency is a prefill problem, not a retrieval problem.]]></description><link>https://blog.dailydoseofds.com/p/the-hands-on-ai-engineer-playbook</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/the-hands-on-ai-engineer-playbook</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Mon, 03 Aug 2026 20:04:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!92mc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">The Hands-on AI Engineer Playbook to Build RAG Apps for Production</a></strong></h3><p>We have published a new deep dive in the <strong><a href="https://www.dailydoseofds.com/a-crash-course-on-building-rag-systems-part-1-with-implementations/">RAG Systems course</a></strong>.</p><p>In a typical RAG request, embedding the query takes milliseconds, vector search takes tens of milliseconds, and reranking takes maybe a hundred milliseconds. </p><p>Then the model reads the retrieved chunks, and that step alone can take seconds. This deep dive is about that step.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!92mc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!92mc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 424w, https://substackcdn.com/image/fetch/$s_!92mc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 848w, https://substackcdn.com/image/fetch/$s_!92mc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 1272w, https://substackcdn.com/image/fetch/$s_!92mc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!92mc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png" width="1086" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1086,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:122232,&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.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.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_!92mc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 424w, https://substackcdn.com/image/fetch/$s_!92mc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 848w, https://substackcdn.com/image/fetch/$s_!92mc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 1272w, https://substackcdn.com/image/fetch/$s_!92mc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788060f1-1c93-4077-b09a-e8d045a8a0dc_1086x644.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">Read the full deep dive here &#8594;</a></strong></p><p>The full 50 min deep dive covers:</p><ul><li><p>Why prefill dominates RAG latency, not retrieval</p></li><li><p>How the KV cache works and what it costs in memory</p></li><li><p>Why prefix caching approaches zero hit rate for RAG workloads</p></li><li><p>Three independent failures when you try to reuse cached chunks</p></li><li><p>Six published approaches to fix them</p></li><li><p>Hands-on implementation that covers every problem and fixes </p></li><li><p>Best practices for production to assess what applies to your system</p></li></ul><p><strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">Read the full deep dive here &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/&quot;,&quot;text&quot;:&quot;Production RAG Deep Dive&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/"><span>Production RAG Deep Dive</span></a></p><div><hr></div><h4>Why care?</h4><p>Processing 16,000 input tokens with a 14B parameter model on an NVIDIA L20 takes ~5.5 seconds to get the first token.</p><p>And in a RAG system, the vast majority of those tokens are retrieved chunks, not the user&#8217;s question.</p><p>Prefill is the root cause of this, and it scales quadratically with input length because every token must attend to every other token.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yvro!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yvro!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 424w, https://substackcdn.com/image/fetch/$s_!Yvro!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 848w, https://substackcdn.com/image/fetch/$s_!Yvro!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 1272w, https://substackcdn.com/image/fetch/$s_!Yvro!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yvro!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png" width="1124" height="359" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:359,&quot;width&quot;:1124,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:36471,&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.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.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_!Yvro!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 424w, https://substackcdn.com/image/fetch/$s_!Yvro!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 848w, https://substackcdn.com/image/fetch/$s_!Yvro!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 1272w, https://substackcdn.com/image/fetch/$s_!Yvro!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764ebd2c-93a0-4cf4-b227-d3ba616d47bd_1124x359.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 production RAG systems serving thousands of requests per hour, this is the dominant line item on the inference bill.</p><p>The techniques covered in <strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">this deep dive</a></strong> (KV cache reuse, selective recomputation, prompt reordering, and more) directly solve that cost.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cTGO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cTGO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cTGO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cTGO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cTGO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cTGO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg" width="1136" height="694" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:694,&quot;width&quot;:1136,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:110847,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.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_!cTGO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cTGO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cTGO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cTGO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee721016-f70f-43e6-834d-f29a3e77f956_1136x694.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>CacheBlend, for instance, reuses precomputed chunk caches and recomputes only 10 to 15 percent of tokens, cutting time to first token by 2 to 3x while keeping answer quality within 0.01 to 0.03 F1 of a full recompute.</p></li><li><p>TurboRAG reports up to 9.4x TTFT reduction by moving the entire prefill offline.</p></li></ul><p>This is also an area the industry is actively investing in.</p><p>LMCache, the open-source package that implements CacheBlend, ships as a production integration on top of vLLM.</p><p>Serving engines are adding non-prefix cache reuse as a first-class feature.</p><p>The engineering teams working on inference optimization at scale are treating this as one of the highest-leverage problems to solve right now, because every percentage point of cache reuse translates directly into GPU cost saved.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lD5N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lD5N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 424w, https://substackcdn.com/image/fetch/$s_!lD5N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 848w, https://substackcdn.com/image/fetch/$s_!lD5N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 1272w, https://substackcdn.com/image/fetch/$s_!lD5N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lD5N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp" width="1116" height="674" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:674,&quot;width&quot;:1116,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34866,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lD5N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 424w, https://substackcdn.com/image/fetch/$s_!lD5N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 848w, https://substackcdn.com/image/fetch/$s_!lD5N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 1272w, https://substackcdn.com/image/fetch/$s_!lD5N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbb55db4-44cf-4446-a8a8-1e4462029021_1116x674.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Understanding how the KV cache works, why prefix caching fails for RAG, and what the three failure modes of naive cache reuse are is becoming essential knowledge for anyone building or operating a RAG system at any meaningful scale.</p><p><strong><a href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/">You can learn how to build such systems here &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/&quot;,&quot;text&quot;:&quot;Production RAG Deep Dive&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/building-rag-systems-course-part-12-with-implementation/"><span>Production RAG Deep Dive</span></a></p><p>&#128073; Over to you: Have you measured where your RAG latency actually sits?</p><div><hr></div><h3><a href="https://www.dailydoseofds.com/rl-course-part-1/">ORM vs PRM: How LLMs verify their reasoning?</a></h3><p>When a model solves a problem in steps, something has to score that work so the model can learn from it.</p><p>There are two ways to do it, and they differ based on what they assign credit to.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JIG3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JIG3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 424w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 848w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1272w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JIG3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp" width="960" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/128bea64-0852-43a1-a343-71085559cca5_960x608.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:608,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:702690,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JIG3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 424w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 848w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1272w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>An outcome reward model reads only the final answer and returns one number for the whole solution.</p></li><li><p>A process reward model reads every step and returns a score after each one.</p></li></ul><p>The process model wins as a judge because sometimes a model can land on the right answer through faulty reasoning.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GytX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GytX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GytX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GytX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GytX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GytX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71609,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.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_!GytX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GytX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GytX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GytX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F428eeb79-bc70-4365-9260-1a7b3ccaadd3_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>An outcome model cannot tell the difference because it sees the right answer and approves the whole solution, broken steps included.</p></li><li><p>A process model catches the bad step, and a correct final answer does not save it.</p></li></ul><p>OpenAI actually measured this difference.</p><p>The model&#8217;s weights stayed frozen while it generated many solutions per problem, and each scorer picked the one it rated highest.</p><p>The process scorer solved 78.2% of a math test set, the outcome scorer solved 72.4%, and taking the most common answer got 69.6%.</p><p>That is the ranking job, and step-level scoring done by process reward model is clearly better at it.</p><p>Using that signal to train the model is a different job.</p><p>The score stops being a verdict on finished work and becomes the objective the model is pushed toward.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vzgd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vzgd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Vzgd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Vzgd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Vzgd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vzgd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/db3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78166,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.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_!Vzgd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Vzgd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Vzgd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Vzgd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3c4988-49e6-461c-be53-64260e7ca2e5_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 ranking, a wrong rating picks one bad solution and the model never learns anything from it.</p></li><li><p>In training, a wrong rating comes back as a weight update, and the model produces more of whatever earned it.</p></li></ul><p>Which is why the two jobs need different scorers.</p><p>A process scorer has to be a model. It reads a step written in natural language and predicts whether that step was sound, so it carries the usual model gaps and misjudges some steps.</p><p>Ranking absorbs those gaps because nothing adapts to them. Training turns them into a target, since gradient descent will find whatever the scorer rates highly and push toward it, correct or not.</p><p>An outcome check on a math or code problem is not a model at all. It runs the test or compares the answer to ground truth.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o0p0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o0p0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!o0p0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!o0p0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!o0p0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o0p0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73837,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.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_!o0p0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!o0p0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!o0p0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!o0p0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F014a3186-d828-4064-a99d-4acee71e9ee2_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>There is no direction to push a rule like that. The answer is right or it is not.</p><p>So the choice comes down to what the scorer is made of, not how much it sees. A process scorer sees more and can be fooled by the model it is teaching. An outcome rule sees almost nothing and cannot be.</p><p>DeepSeek-R1 used exactly this. They tested process scoring during development and shipped a rule that checks the final answer and the output format.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JIG3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JIG3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 424w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 848w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1272w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JIG3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp" width="960" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/128bea64-0852-43a1-a343-71085559cca5_960x608.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:608,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:702690,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209633494?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp&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_!JIG3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 424w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 848w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1272w, https://substackcdn.com/image/fetch/$s_!JIG3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F128bea64-0852-43a1-a343-71085559cca5_960x608.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 a practical takeaway:</p><ul><li><p>Use outcome scoring when the answer is checkable and the scorer sits inside the training loop.</p></li><li><p>Use process scoring when the reasoning itself has to be correct, or when ranking finished candidates and guiding search across them.</p></li></ul><p>To dive deeper, we covered all of this in depth across 13 parts of our RL series:</p><ul><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-1/">Part 1 covers the foundations, the agent-environment loop, and the reward hypothesis &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-2/">Part 2 covers MDPs and value functions &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-3/">Part 3 covers Bellman equations and dynamic programming &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-4/">Part 4 covers model-free learning, Q-learning, and SARSA &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-5/">Part 5 covers function approximation and what breaks when states stop being enumerable &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-6/">Part 6 covers deep RL and DQN &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-7/">Part 7 covers policy gradients and actor-critic &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-8/">Part 8 covers PPO and why it became the default for LLM post-training &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-9/">Part 9 covers RLHF, preference data, and reward model training &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-10/">Part 10 covers verifiable rewards and GRPO, which is the rule-based path R1 took &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-11">Part 11 covers the reward signal problem for agents &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-12">Part 12 covers environments, trajectories, and the training loop &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-13">Part 13 covers how AI teams use RL in production, including Cursor&#8217;s five-hour checkpoint loop &#8594;</a></strong></p></li></ul><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[Build a Stock Market Research Agentic Workflow​]]></title><description><![CDATA[...using a no-code drag-and-drop builder.]]></description><link>https://blog.dailydoseofds.com/p/build-a-stock-market-research-agentic-015</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/build-a-stock-market-research-agentic-015</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Sat, 01 Aug 2026 19:38:10 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/209411518/f77ba8df307047c6218dfd069a6044f3.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p>&#8203;Free Observability Engineering Masterclass with Liz Fong-Jones &amp; Honeycomb.</p></li><li><p>&#8203;&#8203;Build a stock market research Agentic workflow.</p></li><li><p>Double Descent vs. Bias-Variance Trade-off.</p></li><li><p>[Hands-on] Data version control to build reproducible ML systems.</p></li></ul><div><hr></div><h3><strong><a href="https://fandf.co/4yOpyVh">Free Observability Engineering Masterclass with Liz Fong-Jones &amp; Honeycomb</a></strong></h3><p>Honeycomb is running a six-session live masterclass, turning theories from Observability Engineering (2nd Ed.) into practice. This masterclass series is ideal for individual contributors and senior leaders.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://fandf.co/4yOpyVh" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CnMs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!CnMs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!CnMs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!CnMs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CnMs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbb884a6-db2d-48ab-9f79-8dd54e7b4875_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;:94604,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://fandf.co/4yOpyVh&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209151864?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_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_!CnMs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!CnMs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!CnMs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!CnMs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbb884a6-db2d-48ab-9f79-8dd54e7b4875_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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It&#8217;s taught by Liz Fong-Jones, who co-wrote the O&#8217;Reilly book Observability Engineering.</p><p>Each session covers one chapter and turns it into something you can use that same week in production:</p><ul><li><p>Aug 3 &#8594; Instrument with OpenTelemetry so you capture important bits.</p></li><li><p>Aug 19 &#8594; Learn to wire observability into CI/CD and catch regressions.</p></li><li><p>Sept 2 &#8594; Get your AI work funded when leadership keeps pushing it back</p></li><li><p>Sept 16 &#8594; Set reliability targets that reflect what users actually feel</p></li><li><p>Sept 30 &#8594; Cut your observability bill without losing the data</p></li><li><p>Oct 14  &#8594; Learn Observability in every domain (mobile, data pipelines, ML systems, and IoT)</p></li></ul><p>Live sessions include Q&amp;A with Liz. Recordings and hands-on labs will also be made available after each one.</p><p>The first session is this Monday (3rd August).</p><p><strong><a href="https://fandf.co/4yOpyVh">Register here for free now so that you don&#8217;t miss out &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://fandf.co/4yOpyVh&quot;,&quot;text&quot;:&quot;Learn AI observability for free.&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://fandf.co/4yOpyVh"><span>Learn AI observability for free.</span></a></p><p><em>Thanks to Honeycomb for partnering today!</em></p><div><hr></div><h3><strong><a href="https://github.com/simstudioai/sim">&#8203;Build a stock market research Agentic workflow&#8203;</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZpGF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZpGF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ZpGF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ZpGF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ZpGF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZpGF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png" width="450" height="409.23623445825933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1126,&quot;resizeWidth&quot;:450,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ZpGF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ZpGF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ZpGF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ZpGF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25189d53-b14a-4e5a-b747-8251d71881f6_1126x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Recently, we talked about <a href="https://github.com/simstudioai/sim">&#8203;</a><strong><a href="https://github.com/simstudioai/sim">Sim</a></strong>, a lightweight, user-friendly framework to build AI agent workflows in minutes.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/simstudioai/sim&quot;,&quot;text&quot;:&quot;&#8203;Sim GitHub repo&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://github.com/simstudioai/sim"><span>&#8203;Sim GitHub repo</span></a></p><p>Key features:</p><ul><li><p>Real-time workflow execution</p></li><li><p>Connects with your favorite tools</p></li><li><p>Works with local models via Ollama</p></li><li><p>Intuitive drag-and-drop interface using ReactFlow</p></li><li><p>Multiple deployment options (NPM, Docker, Dev Containers)</p></li></ul><p>Based on our testing, Sim is a better alternative to n8n with:</p><ul><li><p>An intuitive interface</p></li><li><p>A much better copilot for faster builds</p></li><li><p>AI-native workflows for intelligent agents</p></li></ul><p>We used it to build a stock market research agent &amp; connected it to Telegram in minutes.</p><p>Tech stack:</p><ul><li><p><a href="https://github.com/simstudioai/sim">&#8203;</a><strong><a href="https://github.com/simstudioai/sim">Sim</a></strong><a href="https://github.com/simstudioai/sim">&#8203;</a> to build the workflow</p></li><li><p>Alpha-Vantage MCP to access stock market data</p></li><li><p>Docker to locally host everything</p></li></ul><p>The video at the top provides a step-by-step guide along with all the setup instructions.</p><p>You can also find all the details in Sim&#8217;s GitHub repository.</p><p><a href="https://github.com/simstudioai/sim">&#8203;</a><strong><a href="https://github.com/simstudioai/sim">GitHub repo &#8594;</a></strong><a href="https://github.com/simstudioai/sim">&#8203;</a><strong> (don&#8217;t forget to star)</strong></p><div><hr></div><h3><strong>Double Descent vs. Bias-Variance Trade-off</strong></h3><p>It is well-known that as the number of model parameters increases, the model gradually overfits the data.</p><p>For instance, consider fitting a polynomial regression model trained on this dummy dataset below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q9WH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q9WH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 424w, https://substackcdn.com/image/fetch/$s_!Q9WH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 848w, https://substackcdn.com/image/fetch/$s_!Q9WH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 1272w, https://substackcdn.com/image/fetch/$s_!Q9WH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q9WH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png" width="1332" height="676" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:676,&quot;width&quot;:1332,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Q9WH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 424w, https://substackcdn.com/image/fetch/$s_!Q9WH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 848w, https://substackcdn.com/image/fetch/$s_!Q9WH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 1272w, https://substackcdn.com/image/fetch/$s_!Q9WH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36f1c853-be3c-44a0-aebd-46feee2fb33a_1332x676.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 case you don&#8217;t know, this is called a polynomial regression model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zcWU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zcWU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 424w, https://substackcdn.com/image/fetch/$s_!zcWU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 848w, https://substackcdn.com/image/fetch/$s_!zcWU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 1272w, https://substackcdn.com/image/fetch/$s_!zcWU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zcWU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png" width="1456" height="371" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dddae24e-d5ac-4da8-9173-599a92968871_2656x676.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:371,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!zcWU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 424w, https://substackcdn.com/image/fetch/$s_!zcWU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 848w, https://substackcdn.com/image/fetch/$s_!zcWU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 1272w, https://substackcdn.com/image/fetch/$s_!zcWU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddae24e-d5ac-4da8-9173-599a92968871_2656x676.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Here, as we&#8217;ll increase the degree (<code>m</code>):</p><ul><li><p>The training loss will get closer to zero.</p></li><li><p>The test (or validation) loss will first decrease and then increase.</p></li></ul><p>This is also evident from the following loss plot:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_gaF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_gaF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 424w, https://substackcdn.com/image/fetch/$s_!_gaF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 848w, https://substackcdn.com/image/fetch/$s_!_gaF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 1272w, https://substackcdn.com/image/fetch/$s_!_gaF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_gaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png" width="1456" height="693" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:693,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!_gaF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 424w, https://substackcdn.com/image/fetch/$s_!_gaF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 848w, https://substackcdn.com/image/fetch/$s_!_gaF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 1272w, https://substackcdn.com/image/fetch/$s_!_gaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1576320a-f8dd-4405-a677-0f94e09b2c57_1724x820.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But notice what happens when you continue increasing the degree (<code>m</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_!sloX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sloX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 424w, https://substackcdn.com/image/fetch/$s_!sloX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 848w, https://substackcdn.com/image/fetch/$s_!sloX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 1272w, https://substackcdn.com/image/fetch/$s_!sloX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sloX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png" width="1456" height="745" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:745,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sloX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 424w, https://substackcdn.com/image/fetch/$s_!sloX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 848w, https://substackcdn.com/image/fetch/$s_!sloX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 1272w, https://substackcdn.com/image/fetch/$s_!sloX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F129ff991-6c05-43b3-a100-88e6eaab16a6_1884x964.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Why does the test loss increase to a certain point but then decrease again?</p><p>What you see here is called the &#8220;double descent phenomenon,&#8221; and it is commonly observed in many deep learning models.</p><p>It depicts that increasing the model complexity beyond the point of interpolation can improve generalization performance.</p><p>And it&#8217;s hard to fathom since it challenges the traditional bias-variance trade-off:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ne4P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ne4P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 424w, https://substackcdn.com/image/fetch/$s_!ne4P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 848w, https://substackcdn.com/image/fetch/$s_!ne4P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 1272w, https://substackcdn.com/image/fetch/$s_!ne4P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ne4P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png" width="1456" height="706" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:706,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ne4P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 424w, https://substackcdn.com/image/fetch/$s_!ne4P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 848w, https://substackcdn.com/image/fetch/$s_!ne4P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 1272w, https://substackcdn.com/image/fetch/$s_!ne4P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93d53257-e78b-4d4d-8c59-060097efc60b_1684x816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 the best of our knowledge, this is still an open question, and it isn&#8217;t entirely clear why neural networks exhibit this behavior.</p><p>Some theories suggest that the model applies an implicit regularization that allows it to precisely focus on an apt number of parameters for generalization.</p><p>You can actually try it yourself:</p><ul><li><p>Create a small dummy dataset of size n.</p></li><li><p>Train a polynomial regression of degree m, starting from 1 to a value greater than n.</p></li><li><p>Plot the test loss and training loss for each m.</p></li></ul><p>&#128073; Over to you: What do you think about the possible causes?</p><div><hr></div><h3><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/">Data Version Control</a></strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/"><span>&#8203;</span></a></h3><p>Versioning GBs of datasets is practically impossible with GitHub because it imposes an upper limit on the file size we can push to its remote repositories.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rLlh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rLlh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 424w, https://substackcdn.com/image/fetch/$s_!rLlh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 848w, https://substackcdn.com/image/fetch/$s_!rLlh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 1272w, https://substackcdn.com/image/fetch/$s_!rLlh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rLlh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png" width="1456" height="517" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:517,&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_!rLlh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 424w, https://substackcdn.com/image/fetch/$s_!rLlh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 848w, https://substackcdn.com/image/fetch/$s_!rLlh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 1272w, https://substackcdn.com/image/fetch/$s_!rLlh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ec2e8da-c801-45a2-9116-a09ce4ec3f2e_1456x517.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>That is why Git is best suited for versioning a codebase, which is primarily composed of lightweight files.</p><p>However, ML projects are not solely driven by code.</p><p><strong>Instead, they also involve large data files, and across experiments, these datasets can vastly vary.</strong></p><p>To ensure proper reproducibility and experiment traceability, it is also necessary to&nbsp;<strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/">version datasets</a></strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R3Q_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R3Q_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 424w, https://substackcdn.com/image/fetch/$s_!R3Q_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 848w, https://substackcdn.com/image/fetch/$s_!R3Q_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 1272w, https://substackcdn.com/image/fetch/$s_!R3Q_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R3Q_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png" width="1456" height="609" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:609,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!R3Q_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 424w, https://substackcdn.com/image/fetch/$s_!R3Q_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 848w, https://substackcdn.com/image/fetch/$s_!R3Q_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 1272w, https://substackcdn.com/image/fetch/$s_!R3Q_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9be96ff2-25c6-4be3-8304-9fc56e1275a9_2086x873.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Data version control (DVC) solves this problem.</p><p>The core idea is to integrate another version controlling system with Git, specifically used for large files.</p><p><strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/">Here&#8217;s everything you need to know </a></strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/"><span>&#8203;&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/">(with implementation)</a></strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/"><span>&#8203;&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/"> about building 100% reproducible ML projects &#8594;&#8203;</a></strong></p><p>Good day!</p><p><a href="https://www.dailydoseofds.com/you-cannot-build-large-data-projects-until-you-learn-data-version-control/"><span>&#8203;</span></a></p>]]></content:encoded></item><item><title><![CDATA[6 Automatic Optimization Methods for LLM Systems]]></title><description><![CDATA[...explained visually and with practical tradeoffs.]]></description><link>https://blog.dailydoseofds.com/p/6-automatic-optimization-methods</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/6-automatic-optimization-methods</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Fri, 31 Jul 2026 20:48:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!kmTD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://www.getzep.com/">Agent memory, at enterprise scale!</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A120!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A120!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 424w, https://substackcdn.com/image/fetch/$s_!A120!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 848w, https://substackcdn.com/image/fetch/$s_!A120!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!A120!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A120!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png" width="1456" height="631" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:631,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:41390,&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.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.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_!A120!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 424w, https://substackcdn.com/image/fetch/$s_!A120!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 848w, https://substackcdn.com/image/fetch/$s_!A120!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!A120!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37b45c14-dfad-4cb1-9a3c-8275e7e4bc72_2400x1040.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://www.getzep.com/">Zep</a></strong> is an agent memory at enterprise scale.</p><p>Its Context Lake manages, governs, and serves everything your agents need to know about users, accounts, and your business, providing a prompt-ready Context Block in under 200ms for custom agents or any MCP client.</p><p><strong><a href="https://www.getzep.com/">Learn more here &#8594;</a></strong></p><p><em>Thanks to Zep for partnering today!</em></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">6 automatic optimization methods for LLM systems</a></h3><p>Tuning an AI system no longer means training it.</p><p>Several methods now improve a system by editing its text, the prompt, the code, sometimes the training loop itself, and all of it runs automatically.</p><p>The visual below depicts several such methods:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kmTD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kmTD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 424w, https://substackcdn.com/image/fetch/$s_!kmTD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 848w, https://substackcdn.com/image/fetch/$s_!kmTD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!kmTD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kmTD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png" width="1418" height="1350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1350,&quot;width&quot;:1418,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:161987,&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.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.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_!kmTD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 424w, https://substackcdn.com/image/fetch/$s_!kmTD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 848w, https://substackcdn.com/image/fetch/$s_!kmTD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!kmTD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6843dd89-55c0-40bd-9603-6058f1c4c674_1418x1350.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>They share one skeleton:</p><ul><li><p>An LLM proposes a change</p></li><li><p>An evaluator scores it</p></li><li><p>And the best changes are kept while the rest are dropped.</p></li></ul><p>What separates them is what they edit and what feedback they get to read.</p><p>Let&#8217;s understand each of these techniques below.</p><div><hr></div><p>1) OPRO, from Google DeepMind, treats the language model itself as the optimizer.</p><p>It hands the model a running leaderboard of past prompts and their scores, then asks it to write a stronger instruction each round, which gets scored and added back to the board.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6gEx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6gEx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!6gEx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!6gEx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!6gEx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6gEx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif" width="1396" height="209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:209,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:260782,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6gEx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!6gEx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!6gEx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!6gEx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611fb811-1b39-42e2-9c89-7755fdc3cdc6_1396x209.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>This method typically surfaces instructions like asking a model to do deep research or think before it solves a problem.</p><p>It needs no gradients and labels beyond a score, which makes it the simplest of the six.</p><p>But it plateaus on hard tasks, reacts strongly to how the meta-prompt is phrased, and was never built to beat specialized solvers on large problems.</p><blockquote><p><em>A meta-prompt is the prompt handed to the optimizer model, not the one being optimized. It holds the task description, the leaderboard of past instructions and their scores, and the request to write a better one.</em></p></blockquote><div><hr></div><p>2) MIPROv2, from DSPy, tunes two things at once:</p><ul><li><p>One is the wording of the instruction.</p></li><li><p>The other is the set of a few-shot examples, the solved cases shown inside the prompt to demonstrate the task.</p></li></ul><p>Those examples are not something a person hand-picks. MIPROv2 generates them by running the program over a batch of labeled data and keeping the runs that reached the correct answer, so the demonstrations come from what already works.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CRxN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CRxN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 424w, https://substackcdn.com/image/fetch/$s_!CRxN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 848w, https://substackcdn.com/image/fetch/$s_!CRxN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 1272w, https://substackcdn.com/image/fetch/$s_!CRxN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CRxN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp" width="1396" height="209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:209,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:343996,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CRxN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 424w, https://substackcdn.com/image/fetch/$s_!CRxN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 848w, https://substackcdn.com/image/fetch/$s_!CRxN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 1272w, https://substackcdn.com/image/fetch/$s_!CRxN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1fc1f35-d662-4326-9570-c22b216a53f6_1396x209.webp 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Alongside that, it writes candidate instructions informed by the data and the program, then runs a Bayesian search, which tries the promising combinations rather than every one, to find which instruction and example set score best together.</p><p>Pairing them in one search is a critical improvement, since an instruction written to fit the examples it ships with reads more cohesively than tuning either half alone.</p><p>It works well once a few hundred labeled examples are on hand. The catch is that it locks in its pool of candidate instructions and examples up front, so it cannot react to a specific failure the way a trace-reading method can, and running all the scoring trials gets expensive.</p><div><hr></div><p>3) TextGrad, from Stanford, borrows backpropagation almost directly.</p><p>It turns a system into a graph where each node is a piece of text and each edge is an LLM call, then passes natural-language criticism backward through that graph so every component learns what it specifically got wrong.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9Crv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9Crv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!9Crv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!9Crv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!9Crv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9Crv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif" width="1396" height="209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:209,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:267066,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9Crv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!9Crv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!9Crv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!9Crv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f87ec76-ad2b-4151-b5ae-d4f2b470b604_1396x209.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>That design lets it optimize whole multi-step pipelines, and even non-text artifacts like candidate drug molecules, through the same loop.</p><p>The interface mirrors PyTorch, so anyone who has written a training loop can pick it up. But the feedback grows unstable once the graph runs more than three or four nodes deep, and each step costs several LLM calls, which adds up fast.</p><div><hr></div><p>4) <strong><a href="https://www.dailydoseofds.com/p/how-to-beat-grpo-without-touching-model-weights/">GEPA</a></strong>, from Berkeley, reads the full execution trace of a run instead of collapsing it into a single score.</p><p>It diagnoses why the attempt failed, proposes a targeted fix, and keeps a Pareto set of candidates so a variant that is best at one slice of the task survives even when its overall average is worse.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_lRL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_lRL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!_lRL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!_lRL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!_lRL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_lRL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif" width="1396" height="209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:209,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:218828,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_lRL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!_lRL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!_lRL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!_lRL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff016e016-dfff-4591-b0dc-eb8732317e08_1396x209.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Reading the trace, rather than a bare reward, lets it reach a working prompt in a fraction of the rollouts that <strong><a href="https://www.dailydoseofds.com/rl-course-part-1/">reinforcement learning</a></strong> needs, with no weight updates at all.</p><p>Keeping the specialists on the frontier also stops a strong but narrow candidate from being averaged away too early. Its main dependency is that the traces have to be rich enough to diagnose, which not every task provides.</p><p><strong><a href="https://www.dailydoseofds.com/p/how-to-beat-grpo-without-touching-model-weights/">We covered GEPA in detail here if you want to learn more &#8594;</a></strong></p><div><hr></div><p>5) AlphaEvolve, from DeepMind, points the same loop at code.</p><p>Two Gemini models, one tuned for breadth and one for depth, propose diffs to a program, automated evaluators score each candidate, and the best survive into a database that seeds the next generation.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K-4z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K-4z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!K-4z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!K-4z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!K-4z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K-4z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif" width="1396" height="209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:209,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:258062,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!K-4z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!K-4z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!K-4z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!K-4z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e36373-43ae-4448-9fcf-fa979d888d43_1396x209.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Surprisingly, this has produced results humans had not found, including a way to multiply 4x4 matrices with fewer multiplications than a method that stood for 56 years, and a data center scheduler now running in Google&#8217;s production fleet.</p><p>It even sped up a kernel used to train the Gemini models behind it. The limit is that every candidate has to be checked by an automatic evaluator, so it only fits problems where correctness can be measured by a machine (like it happened in the matrix multiplication case), and the evolutionary search burns a lot of compute.</p><div><hr></div><p>6) AutoResearch, Andrej Karpathy&#8217;s method, runs the loop on a machine learning training script and lets it work autonomously.</p><p>A coding agent reads the code, edits it, runs a fixed five-minute experiment, commits the change if the metric improved, and reverts it with a git reset if it did not.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nayP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nayP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!nayP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!nayP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!nayP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nayP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif" width="1396" height="209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:209,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:266836,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209299548?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nayP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 424w, https://substackcdn.com/image/fetch/$s_!nayP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 848w, https://substackcdn.com/image/fetch/$s_!nayP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 1272w, https://substackcdn.com/image/fetch/$s_!nayP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ef54430-ff81-4637-929d-c9c1952d35c1_1396x209.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Because only improvements are ever committed, the codebase moves in one direction and never regresses, and the git history doubles as a readable log of what worked.</p><p>On his own training code, the agent found around 20 improvements in two days, including a bug in the attention implementation he had missed.</p><p>The tradeoff is that it cannot step backward to set up a bigger gain later, so it can get stuck in a local optimum, and it only works when experiments are deterministic and comparable.</p><div><hr></div><p>The pattern underneath all six is similar. Turn a system into text, define a way to measure it, and let a language model improve it in a loop.</p><p>They differ mostly in what they edit and how much feedback they read, and no single one wins everywhere. The choice comes down to what is being optimized and what can be measured cleanly.</p><p>&#128073; Over to you: Have you used automatic optimization methods before?</p><p>Good day!</p><div><hr></div><h3><strong>P.S. For those wanting to develop &#8220;Industry ML&#8221; expertise:</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cn8y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>At the end of the day, all businesses care about </span><em>impact</em><span>. That&#8217;s it!</span></p><ul><li><p>Can you reduce costs?</p></li><li><p>Drive revenue?</p></li><li><p>Can you scale ML models?</p></li><li><p>Predict trends before they happen?</p></li></ul><p>We have discussed several other topics (with implementations) that align with such topics.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/membership&quot;,&quot;text&quot;:&quot;Develop \&quot;Industry ML\&quot; Skills&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/membership"><span>Develop "Industry ML" Skills</span></a></p><p>Here are some of them:</p><ul><li><p><span>Learn everything about MCPs in this </span><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">crash course with 9 parts &#8594;</a></strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a></p></li><li><p><span>Learn how to build Agentic systems in </span><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-1-with-implementation/">a crash course with 14 parts</a></strong><span>.</span></p></li><li><p><span>Learn how to build real-world RAG apps and evaluate and scale them in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-building-rag-systems-part-1-with-implementations/">this crash course</a></strong><span>.</span></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_!bv9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" width="1456" height="1128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1128,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Learn sophisticated graph architectures and how to train them on graph data.</p></li><li><p><span>So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches </span><strong><a href="https://www.dailydoseofds.com/bi-encoders-and-cross-encoders-for-sentence-pair-similarity-scoring-part-1/">here</a></strong><span>.</span></p></li><li><p><span>Learn how to run large models on small devices using </span><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">Quantization techniques</a></strong><span>.</span></p></li><li><p><span>Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using </span><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">Conformal Predictions</a></strong><span>.</span></p></li><li><p><span>Learn how to identify causal relationships and answer business questions using causal inference in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-causality-part-1/">this crash course</a></strong><span>.</span></p></li><li><p><span>Learn how to scale and implement ML model training in this </span><strong><a href="https://www.dailydoseofds.com/how-to-scale-model-training/">practical guide</a></strong><span>.</span></p></li><li><p><span>Learn techniques to reliably </span><strong><a href="https://www.dailydoseofds.com/5-must-know-ways-to-test-ml-models-in-production-implementation-included/">test new models in production</a></strong><span>.</span></p></li><li><p><span>Learn how to build privacy-first ML systems using </span><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">Federated Learning</a></strong><span>.</span></p></li><li><p><span>Learn 6 techniques with implementation to </span><strong><a href="https://www.dailydoseofds.com/model-compression-a-critical-step-towards-efficient-machine-learning/">compress ML models</a></strong><span>.</span></p></li></ul><p>All these resources will help you cultivate key skills that businesses and companies care about the most.</p>]]></content:encoded></item><item><title><![CDATA[Why 86% of Claude Code Bill Has Nothing to Do With Your Prompts]]></title><description><![CDATA[...and a solution to fix Claude bills.]]></description><link>https://blog.dailydoseofds.com/p/why-86-of-claude-code-bill-has-nothing</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/why-86-of-claude-code-bill-has-nothing</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Thu, 30 Jul 2026 22:46:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hhq-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><strong><a href="https://fandf.co/4wTvQ4r">Catalog every AI asset type in one scan</a></strong></h2><p>AI enters a codebase as at least five distinct asset types.</p><p>External LLM APIs, MCP servers, agents, tool plugins, and datasets are each pulled in through a different mechanism.</p><p>A lockfile catches none of them. The API call lives in application code, the MCP server in a config, the dataset behind a loader script, so no single scan surface exists, and security teams end up tracking fragments.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://fandf.co/4wTvQ4r" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h4wn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 424w, https://substackcdn.com/image/fetch/$s_!h4wn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 848w, https://substackcdn.com/image/fetch/$s_!h4wn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!h4wn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h4wn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:205298,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://fandf.co/4wTvQ4r&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207170505?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.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_!h4wn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 424w, https://substackcdn.com/image/fetch/$s_!h4wn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 848w, https://substackcdn.com/image/fetch/$s_!h4wn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!h4wn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a34c169-859c-4f89-b308-de5b2409c47a_2400x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://fandf.co/4wTvQ4r">Checkmarx AI Inventory</a></strong> (part of Checkmarx One) scans for all five in one pass and lists each with its provider, version, and exact file and line, exported as an AI-BOM for audits.</p><p>Gartner named Checkmarx a Leader in its inaugural Magic Quadrant for Software Supply Chain Security.</p><p><strong><a href="https://fandf.co/4wTvQ4r">Learn more about Checkmarx AI Inventory here &#8594;</a></strong></p><p><em>Thanks to Checkmarx for partnering today!</em></p><div><hr></div><h2><a href="https://www.comet.com/site/products/opik/features/ai-spend-tracker/">Why 86% of Claude Code bill has nothing to do with your prompts</a></h2><p>You run a Claude Code session and ask it to build a simple Python utility. The session burns through millions of tokens. The Anthropic console shows the total, but it doesn&#8217;t show you where those tokens went.</p><p>You assume the cost is your prompts and the generated code. That assumption is wrong.</p><p>We traced a real Claude Code deployment across a 45-person engineering team over 30 days and broke down every token. Only 14% of input tokens were actual user prompts.</p><p>The rest was context that the developer never explicitly shared. Prior assistant context alone consumed 30-45% of the total input spend.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W5tc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W5tc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!W5tc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!W5tc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!W5tc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W5tc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67825,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.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_!W5tc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!W5tc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!W5tc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!W5tc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7649a37a-2331-4fcf-a9ef-c6cd062b051a_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 scale of this problem is already visible in the industry right now.</p><p>Uber rolled Claude Code out to roughly 5,000 engineers and watched per-person bills climb to $500-$2,000 per month.</p><p>Another report of one developer on a $200 Max plan consumed $50,000 worth of tokens in a single month just by using the features as offered.</p><p>Claude Code has already crossed $1 billion in annualized revenue. The spend is real, but the visibility into what&#8217;s driving it is almost nonexistent for most teams.</p><div><hr></div><h3>The anatomy of a Claude Code session</h3><p>Every Claude Code turn is a fresh API request.</p><p>The model doesn&#8217;t carry state between turns. Each message includes the full conversation history, the full tool schema, and every piece of context that&#8217;s been loaded into the session.</p><blockquote><p><strong>One thing to address upfront</strong>: Anthropic&#8217;s prompt caching does reduce the per-token price of replayed context to roughly 10% of the standard input rate. Claude Code is architecturally built around caching, and the cost figures throughout this article already account for it. Without caching, the picture would be dramatically worse. But caching reduces the price per token, not the volume of tokens being replayed. A bloated configuration still burns tokens on every turn, just at a discounted rate. The overhead is cheaper than it could be. It&#8217;s still overhead.</p></blockquote><p>Here&#8217;s what that context stack looks like, broken down by where the tokens land.</p><h4><strong>Static overhead</strong></h4><p>Static overhead is the base system prompt, tool definitions, and behavioral instructions. It loads on every single turn, and you can&#8217;t configure it away. </p><p>In most individual setups without active cost management, it balloons significantly because the system prompt carries the weight of every tool definition, every MCP schema, and every behavioral instruction Claude Code needs to function.</p><p>These are fixed costs per turn that you pay regardless of what you&#8217;re working on.</p><h4><strong>Skills and CLAUDE.md</strong> </h4><p>These are text files that give Claude Code domain-specific knowledge. They load into context based on glob patterns or always-on settings. </p><p>Most developers add them over time and rarely remove them. Skills that were useful for one project persist into the next, consuming tokens on every turn without contributing anything.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t2Ub!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t2Ub!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t2Ub!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t2Ub!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t2Ub!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t2Ub!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103909,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.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_!t2Ub!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t2Ub!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t2Ub!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t2Ub!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7612a06a-1b3d-4e9f-a0eb-d3d887d9ac6a_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><code>CLAUDE.md</code> in particular is read at the start of every session, and every word in it costs tokens every time you send a message. Developers commonly accumulate <code>CLAUDE.md</code> files that grow to 5,000 or even 10,000 tokens. </p><p>There&#8217;s roughly a 10x cost difference between placing <code>CLAUDE.md</code> at the project root (where it gets injected into every tool call) versus in <code>.claude/rules/</code> where it loads more selectively.</p><h4><strong>MCP server schemas</strong> </h4><p>MCP server schemas are the tool definitions for every connected MCP server. Each server&#8217;s tools get serialized into a JSON blob describing every available tool, its purpose, and the shape of its inputs and outputs. That schema gets prepended to your context on every turn, not just once at session start.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!euXJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!euXJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 424w, https://substackcdn.com/image/fetch/$s_!euXJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 848w, https://substackcdn.com/image/fetch/$s_!euXJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 1272w, https://substackcdn.com/image/fetch/$s_!euXJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!euXJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png" width="1456" height="833" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:833,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:325360,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.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_!euXJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 424w, https://substackcdn.com/image/fetch/$s_!euXJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 848w, https://substackcdn.com/image/fetch/$s_!euXJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 1272w, https://substackcdn.com/image/fetch/$s_!euXJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4b4ce81-21b8-4546-8cb0-acca8b945652_1456x833.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 developer with 10 MCP servers and 50 tools between them can pay up to 16,000 tokens per turn just in schema definitions. Every MCP you connect stays connected until you remove it manually. Most developers never do.</p><h4><strong>Tool results and built-in tool calls</strong> </h4><p>These sit on both sides of the token ledger. On the input side, tool results (outputs from file reads, bash commands, grep operations) account for 23% of input spend at enterprise scale. Every time Claude reads a file or runs a command, that output gets captured in the conversation history and replayed on subsequent turns. </p><p>On the output side, built-in tool calls (file writes, bash commands, code edits) consume 24% of output spend. These are the tokens Claude spends invoking tools rather than generating text you see. </p><p>Together, tool-related tokens make up the largest combined category in a typical session.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jvB3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jvB3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 424w, https://substackcdn.com/image/fetch/$s_!jvB3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 848w, https://substackcdn.com/image/fetch/$s_!jvB3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 1272w, https://substackcdn.com/image/fetch/$s_!jvB3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jvB3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png" width="1456" height="721" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:721,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:252745,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.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_!jvB3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 424w, https://substackcdn.com/image/fetch/$s_!jvB3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 848w, https://substackcdn.com/image/fetch/$s_!jvB3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 1272w, https://substackcdn.com/image/fetch/$s_!jvB3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12d6fa81-dd4b-4ae9-b192-86f19d2fbe81_1456x721.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h4><strong>Prior assistant context</strong></h4><p>Simply put, this is the conversation history carried forward. Long sessions replay Claude&#8217;s own earlier thinking, text, and tool call results on every turn. </p><p>In a detailed breakdown of this category, 78% of prior assistant context cost came from replayed tool_use results, not the conversation text itself. </p><p>Previous tool outputs (file reads, grep results, bash commands) are the biggest replay tax, and they compound with every turn.</p><h4><strong>Thinking tokens</strong> </h4><p>These are output tokens consumed by Claude&#8217;s reasoning process. </p><p>Until recently, Claude Code defaulted to &#8220;high&#8221; thinking effort on Opus. Developers on Reddit reported burning through Max limits 10x faster than on the previous model version. </p><p>Anthropic changed the default to &#8220;medium&#8221; after SWE-bench data showed 76% fewer output tokens at medium versus high with the same task completion rate.</p><p>At enterprise scale, Thinking can consume up to ~40% of total output spend.</p><h4><strong>Model selection </strong></h4><p>This is the silent multiplier behind all of this. Sonnet models cost roughly 0.6x what Opus costs per tier and performs comparably on most development 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_!HB9g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HB9g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 424w, https://substackcdn.com/image/fetch/$s_!HB9g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 848w, https://substackcdn.com/image/fetch/$s_!HB9g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 1272w, https://substackcdn.com/image/fetch/$s_!HB9g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HB9g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png" width="1456" height="1049" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1049,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:221229,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.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_!HB9g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 424w, https://substackcdn.com/image/fetch/$s_!HB9g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 848w, https://substackcdn.com/image/fetch/$s_!HB9g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 1272w, https://substackcdn.com/image/fetch/$s_!HB9g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc426a023-1fd4-4522-b976-4dc7d10c6aca_1456x1049.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Running Opus by default for every task, including formatting, linting, and boilerplate generation, is one of the most expensive configuration choices a team can leave unexamined.</p><div><hr></div><h3>The visibility gap</h3><p>Developers currently have a limited number of options for understanding their Claude Code costs, and each one stops short.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A2KZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A2KZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 424w, https://substackcdn.com/image/fetch/$s_!A2KZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 848w, https://substackcdn.com/image/fetch/$s_!A2KZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 1272w, https://substackcdn.com/image/fetch/$s_!A2KZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A2KZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png" width="1456" height="699" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:699,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:250285,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.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_!A2KZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 424w, https://substackcdn.com/image/fetch/$s_!A2KZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 848w, https://substackcdn.com/image/fetch/$s_!A2KZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 1272w, https://substackcdn.com/image/fetch/$s_!A2KZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11a450e2-53f6-425e-a7bc-478c774c54c5_1456x699.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>The <code>/cost</code> command shows session-level totals. It tells you how much a session costs in aggregate, but it doesn&#8217;t tell you that 45% of your input spend was built into tool replays or that your MCP servers are adding thousands of tokens every turn.</p></li><li><p>The Anthropic Console shows organization-level usage over time. It tells you the total tokens consumed across your workspace. If one team is burning tokens on MCPs they don&#8217;t need, the console shows a line going up. It doesn&#8217;t show why.</p></li><li><p>Claude Code&#8217;s <code>/context</code> command shows a snapshot of your current context window usage. It breaks down how much of the window is consumed by the system prompt, conversation history, and tool definitions. It doesn&#8217;t track patterns over time, compare across developers, or tell you which configuration elements are costing the most money. Worth noting that <code>/context</code> also has known calculation bugs and doesn&#8217;t always return accurate token counts, so even at the individual level the numbers aren&#8217;t always reliable.</p></li><li><p>Manual auditing works for one person. You can check your system prompt size or inspect <code>.claude.json</code> to count registered MCPs. But for an org with 50 or 100 developers, each with their own configurations, manual auditing breaks down. Configurations drift, MCPs accumulate and nobody removes anything because nobody knows what&#8217;s safe to remove.</p></li></ul><p>The gap across all four is the same. None of them connect token attribution (which categories are eating tokens) to configuration policy (what should change) to implementation (applying changes across the team). </p><p>Those are three separate problems, and none of the built-in tools solves more than the first one partially.</p><div><hr></div><h3>What token-level observability looks like</h3><p>Comet built Cost Intelligence inside Opik to close that gap.</p><p>They built a proxy plugin that intercepts API traffic between Claude Code and the Anthropic API. It hashes content for privacy (your prompts and code are never stored or sent to Comet&#8217;s servers), extracts structural metadata like category, character count, and model, and sends only the cost metrics to Opik. </p><p>No SDK integration and code changes needed. Data appears after the first traced session.</p><p>The entire setup is a single config block in your Claude Code settings file.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;b20af567-4b7e-4399-a2ca-7d09d99dbfc8&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
  &#8220;enabledPlugins&#8221;: {
    &#8220;opik-cipx@opik-enterprise&#8221;: true
  },
  &#8220;env&#8221;: {
    &#8220;OPIK_CIPX_API_KEY&#8221;: &#8220;&lt;workspace-scoped-api-key&gt;&#8221;,
    &#8220;OPIK_CIPX_BASE_URL&#8221;: &#8220;https://www.comet.com/opik/api&#8221;,
    &#8220;OPIK_CIPX_PROJECT&#8221;: &#8220;claude-code&#8221;
  }
}</code></pre></div><p>Once connected, the Home dashboard shows a Sankey diagram that maps every token from its source category through the coding agent to its output category. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hhq-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hhq-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 424w, https://substackcdn.com/image/fetch/$s_!hhq-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 848w, https://substackcdn.com/image/fetch/$s_!hhq-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 1272w, https://substackcdn.com/image/fetch/$s_!hhq-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hhq-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png" width="1456" height="882" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7a89455-aa40-4857-898e-8281ab388e61_1456x882.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:882,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:117893,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.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_!hhq-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 424w, https://substackcdn.com/image/fetch/$s_!hhq-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 848w, https://substackcdn.com/image/fetch/$s_!hhq-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 1272w, https://substackcdn.com/image/fetch/$s_!hhq-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a89455-aa40-4857-898e-8281ab388e61_1456x882.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 click into any category and see exactly what&#8217;s driving the cost. Clicking on Prior Assistant Context shows the cost split between replayed tool_use (64.5%), text (35.4%), and thinking (0.1%). </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IIHx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IIHx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 424w, https://substackcdn.com/image/fetch/$s_!IIHx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 848w, https://substackcdn.com/image/fetch/$s_!IIHx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 1272w, https://substackcdn.com/image/fetch/$s_!IIHx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IIHx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png" width="1456" height="817" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.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;:131105,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.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_!IIHx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 424w, https://substackcdn.com/image/fetch/$s_!IIHx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 848w, https://substackcdn.com/image/fetch/$s_!IIHx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 1272w, https://substackcdn.com/image/fetch/$s_!IIHx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ad300b-2168-4337-92c0-73fbe173b1e4_1456x817.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Click on MCP Servers, and you get a per-server ranked view showing total spend, call volume, and a &#8220;Waste&#8221; metric that flags servers with zero-call installs still loading their schemas every turn.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f4Nk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f4Nk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 424w, https://substackcdn.com/image/fetch/$s_!f4Nk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 848w, https://substackcdn.com/image/fetch/$s_!f4Nk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 1272w, https://substackcdn.com/image/fetch/$s_!f4Nk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f4Nk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png" width="1456" height="829" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:829,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:186122,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.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_!f4Nk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 424w, https://substackcdn.com/image/fetch/$s_!f4Nk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 848w, https://substackcdn.com/image/fetch/$s_!f4Nk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 1272w, https://substackcdn.com/image/fetch/$s_!f4Nk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6e5247-cc98-4658-a5d5-73c3287e7dc3_1456x829.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 <strong>User Leaderboard</strong> shows per-developer spend alongside their model choice, token consumption, skills count, MCPs count, and MCP call volume. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-fKG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-fKG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 424w, https://substackcdn.com/image/fetch/$s_!-fKG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 848w, https://substackcdn.com/image/fetch/$s_!-fKG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 1272w, https://substackcdn.com/image/fetch/$s_!-fKG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-fKG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png" width="1456" height="835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:835,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:148214,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.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_!-fKG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 424w, https://substackcdn.com/image/fetch/$s_!-fKG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 848w, https://substackcdn.com/image/fetch/$s_!-fKG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 1272w, https://substackcdn.com/image/fetch/$s_!-fKG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32aa4c4-683d-4bd6-9dd6-bb6c2e637296_1456x835.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 &#8220;High spend&#8221; flag marks outlier users. This is the view that lets engineering leaders ask informed questions instead of enforcing blanket restrictions.</p><div><hr></div><h3>From visibility to fixes</h3><p>The part that separates Cost Intelligence from a dashboard is the cost savings engine.</p><p>The Cost Savings page surfaces specific recommendations ranked by estimated savings, each with an explanation and a quality impact warning where relevant.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3hCp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3hCp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 424w, https://substackcdn.com/image/fetch/$s_!3hCp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 848w, https://substackcdn.com/image/fetch/$s_!3hCp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 1272w, https://substackcdn.com/image/fetch/$s_!3hCp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3hCp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png" width="1456" height="700" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:700,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241396,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.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_!3hCp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 424w, https://substackcdn.com/image/fetch/$s_!3hCp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 848w, https://substackcdn.com/image/fetch/$s_!3hCp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 1272w, https://substackcdn.com/image/fetch/$s_!3hCp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c95421b-1fab-4040-8c82-8c985ab3d065_1456x700.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Here&#8217;s what those recommendations look like in practice.</p><ul><li><p><strong>Switch default model to Sonnet: </strong>On development work, moving to Sonnet cuts the main-loop bill by roughly half. Sonnet costs 0.6x Opus per tier and handles the same tier-weighted work. Estimated savings can vary from 22% upto 48% of total spend.</p></li><li><p><strong>Compact context sooner: </strong>Long sessions re-read their whole context every turn at the cache-read rate. Lowering the auto-compaction threshold trims the prefix before each replay. Estimated savings can be 10-15% of spend.</p></li><li><p><strong>Lower thinking effort: </strong>Prior-assistant context replays Claude&#8217;s earlier thinking, so it compounds across turns. Disabling always-on thinking and capping thinking tokens shrinks both the current turn and every replay after it. Estimated saving of 6-7%.</p></li><li><p><strong>Block specific MCP servers.</strong> Cost Intelligence identifies servers with high inactive user counts, flags zero-call installs that still load schemas every session, and calculates recoverable spend per server.</p></li><li><p><strong>Cap output tokens.</strong> Bounds the maximum response length so long generations can&#8217;t run away on cost. This prevents those sessions where Claude produces thousands of lines of code you didn&#8217;t ask for, each of which gets replayed on subsequent turns.</p></li><li><p><strong>Disable auto memory.</strong> Auto memory reloads accumulated notes into context each session. Turning it off removes that recurring overhead while keeping project CLAUDE.md and rules unaffected.</p></li><li><p><strong>Drop git instructions: </strong>Git workflow instructions sit in the system prompt on every turn. Remove them where teams don&#8217;t rely on them.</p></li></ul><p>Each recommendation comes with an &#8220;Apply&#8221; button that implements the configuration change 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_!2TwC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2TwC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 424w, https://substackcdn.com/image/fetch/$s_!2TwC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 848w, https://substackcdn.com/image/fetch/$s_!2TwC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 1272w, https://substackcdn.com/image/fetch/$s_!2TwC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2TwC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png" width="1456" height="935" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ec89335-2535-454d-af96-d44773abd940_1456x935.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:935,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:191391,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.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_!2TwC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 424w, https://substackcdn.com/image/fetch/$s_!2TwC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 848w, https://substackcdn.com/image/fetch/$s_!2TwC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 1272w, https://substackcdn.com/image/fetch/$s_!2TwC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ec89335-2535-454d-af96-d44773abd940_1456x935.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 org-wide deployment, the settings export generates a <code>managed-settings.json</code> that enforces all enabled policies across the team.</p><p>Comet&#8217;s internal engineering team ran this same exercise on their own Claude Code usage before building it into a product. They traced cost patterns back to specific prompt structures, context buildup, and workflow behaviors using Opik.</p><p>After refactoring their configuration (centralizing rules, migrating always-on skills to on-demand, adopting short session loops), their median output cost dropped from $229 to $181 per million output tokens. That&#8217;s a 21% reduction with zero change in development velocity.</p><h3>A 15-minute audit you can run today</h3><p>You can audit your own setup right now. Here&#8217;s where to look.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TiDV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TiDV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 424w, https://substackcdn.com/image/fetch/$s_!TiDV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 848w, https://substackcdn.com/image/fetch/$s_!TiDV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 1272w, https://substackcdn.com/image/fetch/$s_!TiDV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TiDV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png" width="1456" height="733" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:733,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:302372,&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.dailydoseofds.com/i/209176714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.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_!TiDV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 424w, https://substackcdn.com/image/fetch/$s_!TiDV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 848w, https://substackcdn.com/image/fetch/$s_!TiDV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 1272w, https://substackcdn.com/image/fetch/$s_!TiDV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F993a3f29-99fd-4477-bc06-1c70c49d3d31_1456x733.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong>Audit your MCP servers: </strong>Open <code>~/.claude.json</code> and your workspace <code>.mcp.json</code>. Disable any server you haven&#8217;t used in the past two weeks. The token savings from removing even two or three unused servers compound across every turn of every session.</p></li><li><p><strong>Shrink your CLAUDE.md: </strong>Keep it under 200 lines. Move domain knowledge, workflow guidance, and one-off fixes into on-demand skills that load only when relevant. The global file should contain only true invariants such as build commands, project architecture, and hard constraints.</p></li><li><p><strong>Set thinking effort to medium: </strong>Same task completion rate, 76% fewer output tokens. This is the single highest-leverage setting change available.</p></li><li><p><strong>Keep sessions short: </strong>Do one task, commit, compact or start a fresh session. Long sessions are where prior assistant context balloons and stale tool results keep getting replayed on every turn.</p></li><li><p><strong>Review your default model: </strong>If Opus is your org default, check whether each task type needs it. Switching to Sonnet for routine development work cuts costs by roughly 40% with comparable output quality for most coding tasks.</p></li></ul><p>For individual developers, the Opik Claude Code plugin is free and open source. </p><p>Install it via a single command:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;b1c178ff-a977-486d-89cf-bd8b8fa5b71d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">/plugin marketplace add comet-ml/opik-claude-code-plugin </code></pre></div><p>You&#8217;ll get session-level tracing with full span breakdowns. </p><p>For teams that need org-level attribution, configuration policies, and one-click optimization across every developer, Cost Intelligence turns what would take hours of manual auditing into a single dashboard and is the single best optimization you can opt for. </p><p><a href="https://www.comet.com/site/products/opik/features/ai-spend-tracker/"><span>&#8203;</span></a><strong><a href="https://www.comet.com/site/products/opik/features/ai-spend-tracker/">Learn more about Opik Cost Intelligence here &#8594;</a></strong><a href="https://www.comet.com/site/products/opik/features/ai-spend-tracker/"><span>&#8203;</span></a></p><p><strong><a href="https://github.com/comet-ml/opik">Here&#8217;s the Comet ML Opik GitHub Repo &#8594;</a></strong></p><p>(don&#8217;t forget to star &#127775;)</p><p>&#128073; Over to you: Have you audited your Claude Code configuration for token waste, and what was the biggest surprise when you looked at where your tokens were going?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[6 LLM Deployment Formats in Production]]></title><description><![CDATA[...explained visually.]]></description><link>https://blog.dailydoseofds.com/p/6-llm-deployment-formats-in-production</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/6-llm-deployment-formats-in-production</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Wed, 29 Jul 2026 20:38:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GT55!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p>Your agents are doing web search wrong.</p></li><li><p>6 LLM deployment formats in production.</p></li><li><p>&#8203;Prevent data leakage in ML pipelines&#8203;.</p></li></ul><div><hr></div><h3><strong><a href="https://console.seltz.ai/?utm_source=ddods&amp;utm_medium=newsletter&amp;utm_campaign=ddods-newsletter-2026-07-28">Your agents are doing web search wrong</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XS5k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XS5k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 424w, https://substackcdn.com/image/fetch/$s_!XS5k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 848w, https://substackcdn.com/image/fetch/$s_!XS5k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 1272w, https://substackcdn.com/image/fetch/$s_!XS5k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XS5k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png" width="900" height="789" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:789,&quot;width&quot;:900,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:199711,&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.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.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_!XS5k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 424w, https://substackcdn.com/image/fetch/$s_!XS5k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 848w, https://substackcdn.com/image/fetch/$s_!XS5k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 1272w, https://substackcdn.com/image/fetch/$s_!XS5k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e1912c1-9466-46f5-8c69-9c9518c98c46_900x789.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 agent isn't searching badly. It gets handed a table of contents and is left to go read the web itself.</p><p>A search call returns links and thirty-word snippets, so the agent fetches each page, strips the markup, and cleans the text before any reasoning starts, and that work repeats on every hop of the loop.</p><p>The same question runs above 28,000 tokens through a three-hop search loop and under 7,000 through an owned index that already holds the processed page.</p><p>Seltz is that index. It crawls and processes pages ahead of the query, so one call returns a finished document across its people, news, and wiki scopes.</p><p><strong><a href="https://console.seltz.ai/?utm_source=ddods&amp;utm_medium=newsletter&amp;utm_campaign=ddods-newsletter-2026-07-28">Try Seltz here &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://console.seltz.ai/?utm_source=ddods&amp;utm_medium=newsletter&amp;utm_campaign=ddods-newsletter-2026-07-28&quot;,&quot;text&quot;:&quot;Get Seltz API key&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://console.seltz.ai/?utm_source=ddods&amp;utm_medium=newsletter&amp;utm_campaign=ddods-newsletter-2026-07-28"><span>Get Seltz API key</span></a></p><p><em>Thanks to Seltz for partnering today!</em></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">6 LLM deployment formats in production</a></h3><p>Google and Anthropic agree on one thing about LLM inference:</p><p>The faster a model runs, the fewer machines can run it.</p><p>This sounds counterintuitive, but a model file gets faster by locking in hardware-specific choices into the file.</p><p>And those choices only fit the hardware they were made for.</p><p>That is why they build the same model more than once, one version per chip or runtime it has to run on.</p><p>The visual below covers the six formats used to run LLMs in production:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GT55!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GT55!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 424w, https://substackcdn.com/image/fetch/$s_!GT55!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 848w, https://substackcdn.com/image/fetch/$s_!GT55!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!GT55!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GT55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png" width="1418" height="1350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1350,&quot;width&quot;:1418,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:171458,&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.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.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_!GT55!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 424w, https://substackcdn.com/image/fetch/$s_!GT55!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 848w, https://substackcdn.com/image/fetch/$s_!GT55!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!GT55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5d9157f-a52d-45dd-9e0c-cb7a6e88c4bd_1418x1350.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>1-2) Pickle and safetensors hold raw weights. Both run anywhere Python runs, so neither is faster than the framework around it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QLDU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QLDU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 424w, https://substackcdn.com/image/fetch/$s_!QLDU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 848w, https://substackcdn.com/image/fetch/$s_!QLDU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 1272w, https://substackcdn.com/image/fetch/$s_!QLDU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QLDU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif" width="1412" height="414" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:414,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:629615,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QLDU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 424w, https://substackcdn.com/image/fetch/$s_!QLDU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 848w, https://substackcdn.com/image/fetch/$s_!QLDU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 1272w, https://substackcdn.com/image/fetch/$s_!QLDU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60c7adad-7a59-4f1e-ba4d-4b2e0abc36d9_1412x414.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 <code>.pt</code> file is a list of instructions that <code>torch.load</code> executes and loading a checkpoint can also run a payload (possibly malicious).</p><p>Safetensors holds plain numbers instead, laid out the way memory needs them, so there is nothing to rebuild when the file opens.</p><p>Both still need Python, the model code, and a tokenizer alongside.</p><p>3) GGUF is llama.cpp&#8217;s format, built so a model can run on a machine with no ML framework installed.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6I4q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6I4q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 424w, https://substackcdn.com/image/fetch/$s_!6I4q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 848w, https://substackcdn.com/image/fetch/$s_!6I4q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 1272w, https://substackcdn.com/image/fetch/$s_!6I4q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6I4q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif" width="1412" height="206" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:206,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:205498,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6I4q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 424w, https://substackcdn.com/image/fetch/$s_!6I4q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 848w, https://substackcdn.com/image/fetch/$s_!6I4q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 1272w, https://substackcdn.com/image/fetch/$s_!6I4q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F168490da-875c-40fc-bc59-a31c28b32df8_1412x206.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>To achieve this, weights, tokenizer, and chat template ship in one file, and llama.cpp or Ollama runs it directly.</p><p>4) ONNX is an interchange format, built so a model trained in one framework can run somewhere that framework was never installed.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!msDm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!msDm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 424w, https://substackcdn.com/image/fetch/$s_!msDm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 848w, https://substackcdn.com/image/fetch/$s_!msDm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 1272w, https://substackcdn.com/image/fetch/$s_!msDm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!msDm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif" width="1412" height="206" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:206,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:296086,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!msDm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 424w, https://substackcdn.com/image/fetch/$s_!msDm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 848w, https://substackcdn.com/image/fetch/$s_!msDm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 1272w, https://substackcdn.com/image/fetch/$s_!msDm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faee0b127-3913-43a7-9dfe-d15d88a22994_1412x206.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It decides the operations and the order they run in, but leaves the hardware open, so the runtime picks CPU, CUDA, or an NPU when the file loads.</p><p>5) MLX is Apple&#8217;s framework for its own silicon, where the CPU and GPU share a single pool of memory.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FkdI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FkdI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 424w, https://substackcdn.com/image/fetch/$s_!FkdI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 848w, https://substackcdn.com/image/fetch/$s_!FkdI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 1272w, https://substackcdn.com/image/fetch/$s_!FkdI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FkdI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif" width="1412" height="206" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:206,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:305683,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FkdI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 424w, https://substackcdn.com/image/fetch/$s_!FkdI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 848w, https://substackcdn.com/image/fetch/$s_!FkdI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 1272w, https://substackcdn.com/image/fetch/$s_!FkdI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d6b48eb-410d-4cc3-bfc9-16787c5ca3c2_1412x206.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It decides where the weights live, so they are never copied between the two, and that advantage does not help on any other machine.</p><p>6) TensorRT is NVIDIA&#8217;s compiler, which turns a model into machine code for one specific GPU.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JnLO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JnLO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 424w, https://substackcdn.com/image/fetch/$s_!JnLO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 848w, https://substackcdn.com/image/fetch/$s_!JnLO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 1272w, https://substackcdn.com/image/fetch/$s_!JnLO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JnLO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif" width="1413" height="210" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2226426-4204-48f3-9546-1542a14dd243_1413x210.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:210,&quot;width&quot;:1413,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:243828,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208948126?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JnLO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 424w, https://substackcdn.com/image/fetch/$s_!JnLO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 848w, https://substackcdn.com/image/fetch/$s_!JnLO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 1272w, https://substackcdn.com/image/fetch/$s_!JnLO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2226426-4204-48f3-9546-1542a14dd243_1413x210.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Everything is settled at build time, down to instructions tested on the exact card it compiles for, which is why the file will not load on a different GPU architecture.</p><p>The safe default is to stop as high on the chart as the latency budget allows, because every row down trades speed with the types of hardware it can run on.</p><div><hr></div><p>To dive deeper into the full LLMOps lifecycle, we have covered every bit of it in the LLMOps course, starting from fundamentals to production:</p><ul><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">Read Part 1 on fundamentals of LLMOps here &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-2">Read Part 2 on understanding the core building blocks of LLMs &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-3">Read Part 3 on the key components of LLMs, focusing on the attention mechanism, architectures like transformers and mixture-of-experts, and the fundamentals of pretraining and fine-tuning &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-4">Read Part 4 on decoding strategies, generation parameters, best practices, and the broader lifecycle of LLM-based applications &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-5">Read Part 5 on context + prompt engineering from a system perspective, in-context learning, types of prompts, and different prompting techniques &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-6">Read Part 6 on prompt versioning, defensive prompting, and techniques like verbalized sampling, role prompting, and more &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-7">Read Part 7 on context engineering, covering context types, context construction principles, and retrieval-centric techniques for building high-signal inputs &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-8">Read Part 8 on memory, dynamic, and temporal context in LLM systems, covering short and long-term memory, dynamic context injection, and common failure modes in agentic applications &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-9">Read Part 9 on evaluation methods and approaches for LLM-based applications, primarily focusing on building a strong understanding of the fundamental concepts &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-10">Read Part 10 on evaluation benchmarks in LLM applications, with task-specific methodologies, and the core tooling for evaluation of LLM apps &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-11">Read Part 11 on evaluation of multi-turn systems, tool use evaluations, tracing, and red teaming &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-12/">Read Part 12 on LLM fine-tuning, parameter-efficient methods like LoRA and QLoRA, and alignment techniques such as RLHF, DPO, and GRPO &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-13/">Read Part 13 on LLM inference optimization, KV caching, PagedAttention, FlashAttention, speculative decoding, and model parallelism &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-14">Read Part 14 on the fundamentals of LLM serving, including API-based access, inference with vLLM, and practical decisions.</a></strong></p></li></ul><div><hr></div><h3><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage">Prevent data leakage in ML pipelines</a></strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a></h3><p><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage">Data leakage</a></strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a> happens when your model accidentally gets access to information during training that it won&#8217;t have during inference.</p><p>And the scary part is that it can be incredibly subtle.</p><p>Let us walk you through the most common ways it sneaks in.</p><p><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span>To specifically explore data leakage in greater depth with code, we covered it in Part 6 of the MLOps course here &#8594;</a></strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a></p><h4><strong>Why is data leakage dangerous?</strong></h4><p>A leaked feature can make a model seem extremely accurate during training/validation, because it&#8217;s indirectly using the answer!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lhk0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lhk0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 424w, https://substackcdn.com/image/fetch/$s_!Lhk0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 848w, https://substackcdn.com/image/fetch/$s_!Lhk0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 1272w, https://substackcdn.com/image/fetch/$s_!Lhk0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lhk0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png" width="648" height="474" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:474,&quot;width&quot;:648,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Lhk0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 424w, https://substackcdn.com/image/fetch/$s_!Lhk0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 848w, https://substackcdn.com/image/fetch/$s_!Lhk0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 1272w, https://substackcdn.com/image/fetch/$s_!Lhk0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b61a94f-5ef2-4ce7-9695-7ee9532ea6aa_648x474.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But when deployed, that info isn&#8217;t available, so the model fails unexpectedly.</p><p>Leakage can be subtle and is often discovered only after deployment, when the model behaves too well on historical data but poorly on new data.</p><h4><strong>Common causes of data leakage</strong></h4><h5><strong>Train/test contamination</strong></h5><p>This is the most straightforward but pernicious case. Training data somehow bleeds into the test set. For example, random shuffling might break temporal integrity in time-series data, accidentally leaking future information into the model&#8217;s eyes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9VOP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9VOP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 424w, https://substackcdn.com/image/fetch/$s_!9VOP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 848w, https://substackcdn.com/image/fetch/$s_!9VOP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 1272w, https://substackcdn.com/image/fetch/$s_!9VOP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9VOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png" width="1024" height="509" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d71c8199-7bf9-4332-9f75-961387adad84_1024x509.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:509,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!9VOP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 424w, https://substackcdn.com/image/fetch/$s_!9VOP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 848w, https://substackcdn.com/image/fetch/$s_!9VOP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 1272w, https://substackcdn.com/image/fetch/$s_!9VOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd71c8199-7bf9-4332-9f75-961387adad84_1024x509.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h5><strong>Leaking through preprocessing</strong></h5><p>Do not scale or transform using the combined statistics of your dataset. This subtle form of leakage creeps in when the test data informs transformations like scaling.</p><p>For example, scaling features to 0-1 using the min and max of the entire dataset (including test) leaks knowledge of the test distribution into the train.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!50Xj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!50Xj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 424w, https://substackcdn.com/image/fetch/$s_!50Xj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 848w, https://substackcdn.com/image/fetch/$s_!50Xj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 1272w, https://substackcdn.com/image/fetch/$s_!50Xj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!50Xj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png" width="734" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:734,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!50Xj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 424w, https://substackcdn.com/image/fetch/$s_!50Xj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 848w, https://substackcdn.com/image/fetch/$s_!50Xj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 1272w, https://substackcdn.com/image/fetch/$s_!50Xj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff8344ce-1c1e-465e-ab4d-3caf02964a6f_734x501.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 prevent this type of leakage, always fit preprocessing only on the training set, then apply it to the validation/test sets.</p><h5><strong>Using target-derived features</strong></h5><p>This is a common mistake in feature engineering. For instance, say you&#8217;re predicting whether a user will churn next month, and you accidentally include a feature like &#8220;number of logins in next month,&#8221; which obviously references the outcome.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-756!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-756!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 424w, https://substackcdn.com/image/fetch/$s_!-756!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 848w, https://substackcdn.com/image/fetch/$s_!-756!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 1272w, https://substackcdn.com/image/fetch/$s_!-756!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-756!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png" width="1024" height="468" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:468,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!-756!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 424w, https://substackcdn.com/image/fetch/$s_!-756!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 848w, https://substackcdn.com/image/fetch/$s_!-756!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 1272w, https://substackcdn.com/image/fetch/$s_!-756!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F031a2d34-8a53-4d58-a12c-0953d1273c6a_1024x468.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Sometimes this happens less obviously: e.g., you include a summary that was computed including the target period.</p><p>How to prevent this? Think carefully. Any feature that wouldn&#8217;t be available at prediction time (or that uses information from the future relative to prediction) is a leakage risk.</p><h4><strong>How to prevent leakage</strong></h4><h5><strong>Holdout validation</strong></h5><p>Always assess your models on a truly independent dataset. Steep drops in performance from training to evaluation signal potential leakage.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tBAK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tBAK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 424w, https://substackcdn.com/image/fetch/$s_!tBAK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 848w, https://substackcdn.com/image/fetch/$s_!tBAK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 1272w, https://substackcdn.com/image/fetch/$s_!tBAK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tBAK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png" width="824" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:824,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!tBAK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 424w, https://substackcdn.com/image/fetch/$s_!tBAK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 848w, https://substackcdn.com/image/fetch/$s_!tBAK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 1272w, https://substackcdn.com/image/fetch/$s_!tBAK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b9f6bea-2fb3-4661-ac91-a9b247905482_824x718.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h5><strong>Feature importance analysis</strong></h5><p>Calculating feature importance reveals suspicious features masquerading as informative only due to leakage. If a particular feature is overwhelmingly important, inspect it; could it be leaking info?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Hev-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Hev-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 424w, https://substackcdn.com/image/fetch/$s_!Hev-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 848w, https://substackcdn.com/image/fetch/$s_!Hev-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 1272w, https://substackcdn.com/image/fetch/$s_!Hev-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Hev-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png" width="777" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:546,&quot;width&quot;:777,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Hev-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 424w, https://substackcdn.com/image/fetch/$s_!Hev-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 848w, https://substackcdn.com/image/fetch/$s_!Hev-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 1272w, https://substackcdn.com/image/fetch/$s_!Hev-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a28f9ab-a5bd-432f-b61e-e1699b4ea613_777x546.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h5><strong>Null model testing</strong></h5><p>In deliberately nonsensical setups (e.g., predicting 2019 with a 2020 model), leakage causes even ill-formed models to perform inexplicably well.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-o0I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-o0I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 424w, https://substackcdn.com/image/fetch/$s_!-o0I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 848w, https://substackcdn.com/image/fetch/$s_!-o0I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 1272w, https://substackcdn.com/image/fetch/$s_!-o0I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-o0I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png" width="747" height="559" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:559,&quot;width&quot;:747,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!-o0I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 424w, https://substackcdn.com/image/fetch/$s_!-o0I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 848w, https://substackcdn.com/image/fetch/$s_!-o0I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 1272w, https://substackcdn.com/image/fetch/$s_!-o0I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab74dd79-bfda-41b3-9319-ca6ee835380d_747x559.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h4><strong>A leak-safe approach</strong></h4><ol><li><p>Perform train/validation/test splits before peeking or processing.</p></li><li><p>Use stats from only the training data for things like scaling and encoding.</p></li><li><p>In time-dependent data, keep the chronological order for validation.</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_!M_Dj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M_Dj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 424w, https://substackcdn.com/image/fetch/$s_!M_Dj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 848w, https://substackcdn.com/image/fetch/$s_!M_Dj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 1272w, https://substackcdn.com/image/fetch/$s_!M_Dj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M_Dj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png" width="1044" height="509" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:509,&quot;width&quot;:1044,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!M_Dj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 424w, https://substackcdn.com/image/fetch/$s_!M_Dj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 848w, https://substackcdn.com/image/fetch/$s_!M_Dj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 1272w, https://substackcdn.com/image/fetch/$s_!M_Dj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F539f6843-0fad-4e9e-9c15-0da7121c4299_1044x509.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Understanding leaks and vigilantly safeguarding against them ensures your ML pipeline runs smoothly and reliably in the real world.</p><p>If you want to learn more about these real-world ML practices and start your journey with MLOps, we have already covered MLOps from an engineering perspective in our 18-part crash course.</p><p>It covers foundations, ML system lifecycle, reproducibility, versioning, data and pipeline engineering, model compression, deployment, Docker and Kubernetes, cloud fundamentals, virtualization, a deep dive into AWS EKS, monitoring, and CI/CD in production.</p><p><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/">Start with MLOps Part 1 here &#8594;</a></strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-1/"><span>&#8203;</span></a></p><p><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage">To specifically explore data leakage in greater depth with code, we covered it in Part 6 of the MLOps course here &#8594;</a></strong></p><p>Good day!<a href="https://www.dailydoseofds.com/mlops-crash-course-part-6/#data-leakage"><span>&#8203;</span></a></p>]]></content:encoded></item><item><title><![CDATA[Serverless vs. On-prem vs. Edge Deployment]]></title><description><![CDATA[...explained visually.]]></description><link>https://blog.dailydoseofds.com/p/serverless-vs-on-prem-vs-edge-deployment</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/serverless-vs-on-prem-vs-edge-deployment</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Tue, 28 Jul 2026 21:22:12 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tlEw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://arxiv.org/pdf/2604.00356"><span>&#8203;</span></a><strong><a href="https://arxiv.org/pdf/2604.00356">Technical LLM interview question!</a></strong><a href="https://arxiv.org/pdf/2604.00356"><span>&#8203;</span></a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NGct!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NGct!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!NGct!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!NGct!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!NGct!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NGct!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif" width="476" height="476" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:476,&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;: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_!NGct!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!NGct!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!NGct!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!NGct!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3cdde38-98f4-41e4-9530-79512c208343_1080x1080.gif 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 have 80,000 agent trajectories from production. You need to find top 100 worth reviewing to improve your agent.</p><p>No LLM allowed to evaluate trajectories. How will you do this?</p><p>Let&#8217;s look at some approaches.</p><p>The simplest solution one could start with is random sampling. Pick 100 random trajectories and 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_!phFL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!phFL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!phFL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!phFL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!phFL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!phFL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:112614,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208882153?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.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_!phFL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!phFL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!phFL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!phFL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d90c11c-b26d-4d94-9556-819f99cbb152_1376x768.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But most production agents handle routine requests just fine, so you end up wasting a big chunk of your annotation budget.</p><p>Another approach can filter for longer conversations since 10+ user messages means more complexity.</p><p>But longer conversations skew heavily toward outright failures. You&#8217;ll surface obvious breakdowns but miss subtle issues hiding in conversations where the agent technically succeeded.</p><p>A <a href="https://arxiv.org/pdf/2604.00356"><span>&#8203;</span></a><strong><a href="https://arxiv.org/pdf/2604.00356">recent paper from DigitalOcean</a></strong><span>&nbsp;</span>takes a new approach.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RO6D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RO6D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 424w, https://substackcdn.com/image/fetch/$s_!RO6D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 848w, https://substackcdn.com/image/fetch/$s_!RO6D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 1272w, https://substackcdn.com/image/fetch/$s_!RO6D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RO6D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png" width="1061" height="1015" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1015,&quot;width&quot;:1061,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RO6D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 424w, https://substackcdn.com/image/fetch/$s_!RO6D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 848w, https://substackcdn.com/image/fetch/$s_!RO6D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 1272w, https://substackcdn.com/image/fetch/$s_!RO6D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F348b55cc-2e33-45b0-8a80-f31681a7ce21_1061x1015.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It computes lightweight behavioral signals directly from the trajectory data using deterministic rules.</p><p>The signals fall into three groups:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7pYl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7pYl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 424w, https://substackcdn.com/image/fetch/$s_!7pYl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 848w, https://substackcdn.com/image/fetch/$s_!7pYl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 1272w, https://substackcdn.com/image/fetch/$s_!7pYl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7pYl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png" width="1108" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:1108,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!7pYl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 424w, https://substackcdn.com/image/fetch/$s_!7pYl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 848w, https://substackcdn.com/image/fetch/$s_!7pYl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 1272w, https://substackcdn.com/image/fetch/$s_!7pYl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1908fc0-67d9-4c76-9b4a-ad7f2f9d6019_1108x552.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>1) Interaction signals:</p><ul><li><p>If a user rephrases the request or corrects the agent, that&#8217;s misalignment.</p></li><li><p>Agent repeating itself is stagnation.</p></li><li><p>User abandoning the agent is disengagement.</p></li><li><p>User confirming something worked is satisfaction.</p></li></ul><p>All are detected through normalized phrase matching and similarity checks.</p><p>2) Execution signals:</p><ul><li><p>A tool call that doesn&#8217;t advance the task is a failure signal.</p></li><li><p>Repeated calls with identical or drifting inputs indicate a loop.</p></li></ul><p>These are straightforward to extract from execution logs.</p><p>3) Environment signals, like rate limits, context overflow, and API errors.</p><ul><li><p>Useful to diagnose but not for training since they reflect system constraints, not agent decisions.</p></li></ul><p>Each trajectory gets scored based on which signals fire, and you sample the highest-signal ones for review.</p><p>On &#964;-bench, they compared all three approaches on 100 trajectories:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3a47!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3a47!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 424w, https://substackcdn.com/image/fetch/$s_!3a47!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 848w, https://substackcdn.com/image/fetch/$s_!3a47!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 1272w, https://substackcdn.com/image/fetch/$s_!3a47!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3a47!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png" width="1246" height="385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:385,&quot;width&quot;:1246,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3a47!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 424w, https://substackcdn.com/image/fetch/$s_!3a47!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 848w, https://substackcdn.com/image/fetch/$s_!3a47!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 1272w, https://substackcdn.com/image/fetch/$s_!3a47!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe193608f-e5a1-4416-b1b4-c77bed82d7c6_1246x385.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Random sampling hit a 54% informativeness rate.</p></li><li><p>The length-based heuristic reached 74%.</p></li><li><p>Signal-based sampling reached 82%.</p></li></ul><p>This means roughly 4 out of every 5 trajectories are genuinely useful to improve the agent.</p><p>In fact, among conversations where the agent completed the task correctly, signal sampling still identified useful patterns in 66.7% of cases vs. 41.3% for random.</p><p>These are the subtle issues like policy violations, inefficient tool use, and unnecessary steps that don&#8217;t break the task but still matter for optimization.</p><p>The whole framework runs without any LLM overhead and can sit always-on in a production pipeline.</p><p>If you want to see this in practice, this signal-based approach is already integrated into <a href="https://github.com/katanemo/plano"><span>&#8203;</span></a><strong><a href="https://github.com/katanemo/plano">Plano</a></strong><a href="https://github.com/katanemo/plano"><span>&#8203;</span></a>, an open-source AI-native proxy that handles routing, orchestration, guardrails, and observability in one place.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b9Bw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b9Bw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 424w, https://substackcdn.com/image/fetch/$s_!b9Bw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 848w, https://substackcdn.com/image/fetch/$s_!b9Bw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 1272w, https://substackcdn.com/image/fetch/$s_!b9Bw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b9Bw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png" width="1456" height="902" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.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;: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_!b9Bw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 424w, https://substackcdn.com/image/fetch/$s_!b9Bw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 848w, https://substackcdn.com/image/fetch/$s_!b9Bw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 1272w, https://substackcdn.com/image/fetch/$s_!b9Bw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97164b14-e9ff-4676-9b9a-31e325a91d6e_1456x902.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 href="https://github.com/katanemo/plano"><span>&#8203;</span></a><strong><a href="https://github.com/katanemo/plano">Here&#8217;s the Plano GitHub repo &#8594;</a></strong><a href="https://github.com/katanemo/plano"><span>&#8203;</span></a></p><p><a href="https://arxiv.org/pdf/2604.00356"><span>&#8203;</span></a><strong><a href="https://arxiv.org/pdf/2604.00356">Here&#8217;s the paper on arxiv &#8594;</a></strong><a href="https://arxiv.org/pdf/2604.00356"><span>&#8203;</span></a></p><p>&#128073; Over to you: What is your approach to solve this?</p><div><hr></div><h3><a href="https://github.com/superlinked/sie">Serverless vs on-prem vs edge deployment</a></h3><p>Serverless, on-prem, and edge deployment are three different answers to the same question of where your model actually runs, and each one costs you something different.</p><p>The visual below depicts them:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tlEw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tlEw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 424w, https://substackcdn.com/image/fetch/$s_!tlEw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 848w, https://substackcdn.com/image/fetch/$s_!tlEw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 1272w, https://substackcdn.com/image/fetch/$s_!tlEw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tlEw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif" width="960" height="616" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:616,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:763802,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208882153?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tlEw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 424w, https://substackcdn.com/image/fetch/$s_!tlEw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 848w, https://substackcdn.com/image/fetch/$s_!tlEw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 1272w, https://substackcdn.com/image/fetch/$s_!tlEw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42c7a461-376f-4aa9-86ae-b28193f5d49f_960x616.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Serverless means you hand your model to a provider that only turns on a machine when a request arrives. Between requests the container shuts down, so you pay nothing while idle. The weights get unloaded along with it, so the next call has to pull gigabytes back into memory before it can answer, which adds up to 90 seconds. A reranker sitting in the middle of a search cannot spend that long waking up, so you keep instances warm, and you are back to paying for idle GPUs.</p></li><li><p>On-premise means you rent or own the GPU yourself and keep the server running inside your own network. Nothing leaves your walls, there is no cold start because the engine already holds the weights, and you pay a flat hourly rate instead of a per-token meter. The card runs whether traffic arrives or not.</p></li><li><p>Edge means the model runs on the user&#8217;s own device, on its NPU or CPU, through a small local runtime. The model has to be shrunk down to fit, so it works offline with nothing ever leaving the hardware, but it handles one narrow task rather than a full pipeline.</p></li></ul><p>On-premise is where serious teams land, and it only pays off if several models share one card.</p><p>In reality, this rarely happens because vLLM pre-allocates 90% of the GPU at startup and ignores every other vLLM instance on it, while HuggingFace TEI (Text Embeddings Inference) takes one <code>model-id</code> per process. Neither one knows the other is there.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7ovH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7ovH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7ovH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg" width="1376" height="555" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:555,&quot;width&quot;:1376,&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;:&quot;https://blog.dailydoseofds.com/i/208882153?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%217ovH%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.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_!7ovH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>So four small models end up on four separate cards. You switched to small models to spend less, and you are now renting four GPUs to run what one could hold.</p><p>The serving engine box in on-prem decides whether on-prem is cheap or just differently expensive.</p><p>The card is not the constraint. Instead, the missing piece is one server that holds all the models and shifts memory between them as traffic moves, instead of four servers each convinced they own the whole 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_!OwPZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OwPZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 424w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 848w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png" width="1456" height="919" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:919,&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;:&quot;https://blog.dailydoseofds.com/i/208882153?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21OwPZ%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.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_!OwPZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 424w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 848w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!OwPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a63c04f-c721-437c-9ddb-018b1370efe8_2444x1542.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 <strong><a href="https://github.com/superlinked/sie">Superlinked Inference Engine (SIE)</a></strong> is the open-source project built for that slot. One server handles embeddings, reranking, extraction, and generation, loads a model the first time a request needs it, and drops the least recently used one when memory runs short.</p><p>GitHub repo: <strong><a href="https://github.com/superlinked/sie">https://github.com/superlinked/sie</a></strong></p><p>(don&#8217;t forget to star &#127775;)</p><p>We also wrote a detailed breakdown on what SIE is and how to get started with it.</p><p><strong><a href="https://www.dailydoseofds.com/p/why-small-models-alone-dont-reduce-inference-costs/">Read it here &#8594;</a></strong></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/implementing-massively-parallelized-cuda-programs-from-scratch-using-cuda-programming"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/implementing-massively-parallelized-cuda-programs-from-scratch-using-cuda-programming">CPU vs. GPU vs. TPU vs. NPU vs. LPU</a></strong><a href="https://www.dailydoseofds.com/implementing-massively-parallelized-cuda-programs-from-scratch-using-cuda-programming"><span>&#8203;</span></a></h3><p>5 hardware architectures power AI today.</p><p>Each one makes a fundamentally different tradeoff between flexibility, parallelism, and memory access.</p><p>The visual below maps the internal architecture of all five 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_!UFKM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UFKM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 424w, https://substackcdn.com/image/fetch/$s_!UFKM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 848w, https://substackcdn.com/image/fetch/$s_!UFKM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!UFKM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UFKM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg" width="1250" height="1250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1250,&quot;width&quot;:1250,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!UFKM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 424w, https://substackcdn.com/image/fetch/$s_!UFKM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 848w, https://substackcdn.com/image/fetch/$s_!UFKM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!UFKM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a2fea20-6b3c-49d7-9fe8-1326f8b1d21e_1250x1250.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><h4><strong>CPU</strong></h4><p>It is built for general-purpose computing. A few powerful cores handle complex logic, branching, and system-level tasks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZsDc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZsDc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ZsDc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ZsDc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ZsDc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZsDc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&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_!ZsDc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ZsDc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ZsDc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ZsDc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc97021-6940-4f0c-be64-91b3d3075057_1024x1024.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It has deep cache hierarchies and off-chip main memory (DRAM). It&#8217;s great for operating systems, databases, and decision-heavy code, but not that great for repetitive math like matrix multiplications.</p><h4><strong>GPU</strong></h4><p>Instead of a few powerful cores, GPUs spread work across thousands of smaller cores that all execute the same instruction on different 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_!zxy0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zxy0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zxy0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zxy0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zxy0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zxy0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&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_!zxy0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zxy0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zxy0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zxy0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b99fa00-f66c-4185-858b-f6600e4f9773_1024x1024.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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"></figcaption></figure></div><p>This is why GPUs dominate AI training. The parallelism maps directly to the kind of math neural networks need.</p><h4><strong>TPU</strong></h4><p>They go one step further with specialization.</p><p>The core compute unit is a grid of multiply-accumulate (MAC) units where data flows through in a wave pattern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q6e-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q6e-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!q6e-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!q6e-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!q6e-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q6e-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&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_!q6e-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!q6e-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!q6e-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!q6e-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22bcbdc0-5adf-447b-baa7-57ef37cb9f34_1024x1024.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Weights enter from one side, activations from the other, and partial results propagate without going back to memory each time.</p><p>The entire execution is compiler-controlled, not hardware-scheduled. Google designed TPUs specifically for neural network workloads.</p><h4><strong>NPU</strong></h4><p>This is an edge-optimized variant.</p><p>The architecture is built around a Neural Compute Engine packed with MAC arrays and on-chip SRAM, but instead of high-bandwidth memory (HBM), NPUs use low-power system memory</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d9t2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d9t2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!d9t2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!d9t2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!d9t2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d9t2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&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_!d9t2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!d9t2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!d9t2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!d9t2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523f77-4234-46b9-8183-27237a82c2a6_1024x1024.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 design goal is to run inference at single-digit watt power budgets, like smartphones, wearables, and IoT devices.</p><p>Apple Neural Engine and Intel&#8217;s NPU follow this pattern.</p><h4><strong>LPU (Language Processing Unit)</strong></h4><p>This is the newest entrant, by Groq.</p><p>The architecture removes off-chip memory from the critical path entirely. All weight storage lives in on-chip SRAM.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yr32!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yr32!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yr32!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yr32!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yr32!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yr32!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&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_!yr32!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yr32!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yr32!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yr32!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F964ac52e-16e4-41a4-804c-efcb0423fa36_1024x1024.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Execution is fully deterministic and compiler-scheduled, which means zero cache misses and zero runtime scheduling overhead.</p><p>The tradeoff is that it provides limited memory per chip, which means you need hundreds of chips linked together to serve a single large model. But the latency advantage is real.</p><div><hr></div><p>AI compute has evolved from general-purpose flexibility (CPU) to extreme specialization (LPU). Each step trades some level of generality for efficiency.</p><p>The visual below maps the internal architecture of all five side by side, and it was inspired by ByteByteGo&#8217;s post on CPU vs GPU vs TPU. We expanded it to include two more architectures that are becoming central to AI inference today.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!M4eb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M4eb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 424w, https://substackcdn.com/image/fetch/$s_!M4eb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 848w, https://substackcdn.com/image/fetch/$s_!M4eb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!M4eb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M4eb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg" width="1250" height="1250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1250,&quot;width&quot;:1250,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!M4eb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 424w, https://substackcdn.com/image/fetch/$s_!M4eb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 848w, https://substackcdn.com/image/fetch/$s_!M4eb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!M4eb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa59656-7f14-4c9b-970f-14645fae90cf_1250x1250.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>That said, if you want to get hands-on with actual GPU programming using CUDA, learn about how CUDA operates GPU&#8217;s threads, blocks, grids (with visuals), etc., we covered it here: <a href="https://substack.com/redirect/a0920b58-ce89-448a-8fc2-92294847fba4?j=eyJ1IjoicDByaTIifQ.QlrArn4v6_orNRfkeMR7JdwVGRr4Hf3bOwZKjOT7yqg"><span>&#8203;</span>&#8203;<span>&#8203;</span></a><a href="https://www.dailydoseofds.com/implementing-massively-parallelized-cuda-programs-from-scratch-using-cuda-programming"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/implementing-massively-parallelized-cuda-programs-from-scratch-using-cuda-programming">Implementing (Massively) Parallelized CUDA Programs From Scratch Using CUDA Programming</a></strong>.</p><p>&#128073; Over to you: Which of these 5 have you actually worked with or deployed on?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[Graph Engineering Clearly Explained!]]></title><description><![CDATA[Covered with best practices from the industry.]]></description><link>https://blog.dailydoseofds.com/p/graph-engineering-clearly-explained</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/graph-engineering-clearly-explained</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Mon, 27 Jul 2026 21:21:31 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!IvOP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In today&#8217;s newsletter:</strong></p><ul><li><p>Agent memory and state are not the same thing!</p></li><li><p>Graph engineering, clearly explained.</p></li><li><p>&#8203;The anatomy of diffusion LLMs.</p></li></ul><div><hr></div><h3><a href="https://github.com/crewAIInc/crewAI">Agent memory and state are not the same thing!</a></h3><p>If an agent forgets something it has already learned, that&#8217;s a memory problem. If it forgets where it was in the middle of a task and starts over, that&#8217;s a state problem.</p><p>We once killed one of our agents mid-task to test something else, and it started over like the execution so far never happened.</p><p>That&#8217;s when it clicked that we&#8217;d been treating two different problems as one.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lzo1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lzo1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&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;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21Lzo1%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.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_!Lzo1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>State is tied to the current run as to what task the agent is working on and what it&#8217;s already found.</p><p>None of that exists unless something writes it down.</p><p>The fix was to add a checkpoint after every completed step that records the agent&#8217;s progress, so if the process dies, it resumes from that exact point instead of starting from scratch.</p><p>Memory is a different thing entirely. It&#8217;s what survives across runs as facts, lessons, and findings that are worth retaining.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ikeR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ikeR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ikeR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&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;:&quot;https://blog.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21ikeR%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.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_!ikeR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>At first, we had one shared memory for all our agents and assumed that was enough. But it wasn&#8217;t until our agents started reading each other&#8217;s findings and treating them as their own.</p><p>That&#8217;s why giving each agent its own memory scope is important with <code>memory = memory.scope(&#8221;/agent&#8221;)</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_!QU09!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QU09!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 424w, https://substackcdn.com/image/fetch/$s_!QU09!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 848w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1272w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QU09!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif" width="1312" height="1034" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1034,&quot;width&quot;:1312,&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;:&quot;https://blog.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21QU09%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QU09!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 424w, https://substackcdn.com/image/fetch/$s_!QU09!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 848w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1272w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Once we separated state from memory, everything became much easier to reason about.</p><p>Here&#8217;s what the final Agent Harness looks like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Sgx8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Sgx8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png" width="460" height="460" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3efbbc7-24b4-4c59-965d-6c3d3fc3c694_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;:460,&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;:&quot;https://blog.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21Sgx8%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_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_!Sgx8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>separate memory from state as two different problems</p></li><li><p>scope memory per agent when findings shouldn&#8217;t be shared</p></li><li><p>write a checkpoint after every completed task</p></li><li><p>resume interrupted runs from the last checkpoint</p></li><li><p>fork a checkpoint into a new branch without redoing previous work</p></li></ul><p>This is the harness baseline to build any agent. It&#8217;s enough for general-purpose workflows, but coding agents and long-running systems need other layers along.</p><p>We wrote an article that builds that next layer from scratch. It walks through planning, the agent loop, subagents, sandboxing, memory, and checkpointing, one layer at a time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h9iO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h9iO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h9iO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&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;:&quot;https://blog.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21h9iO%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.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_!h9iO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 whole thing is built with <strong><a href="https://github.com/crewAIInc/crewAI">CrewAI</a></strong>, a 100% open-source framework.</p><p><strong><a href="https://www.dailydoseofds.com/p/hands-on-rebuilding-claude-codes-harness/">You can read the article here &#8594;</a></strong></p><div><hr></div><h3>Graph engineering clearly explained</h3><p>The moment you have several loops that need to work together, you have a coordination problem, and graphs are how engineers have always described coordination.</p><p><span>That&#8217;s the whole idea behind graph engineering that Peter Steinberger mentioned a few days back.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q7v_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q7v_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 424w, https://substackcdn.com/image/fetch/$s_!q7v_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 848w, https://substackcdn.com/image/fetch/$s_!q7v_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 1272w, https://substackcdn.com/image/fetch/$s_!q7v_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q7v_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png" width="680" height="351" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:351,&quot;width&quot;:680,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45641,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.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_!q7v_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 424w, https://substackcdn.com/image/fetch/$s_!q7v_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 848w, https://substackcdn.com/image/fetch/$s_!q7v_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 1272w, https://substackcdn.com/image/fetch/$s_!q7v_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc0aa84-7847-46ff-86bf-d415cdc4d7ef_680x351.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>Today, let&#8217;s understand what exactly graph engineering is!</span></p><h4><strong><span>First, the graph itself</span></strong></h4><p><span>A graph is three things.</span></p><ul><li><p><strong><span>Nodes</span></strong><span> are units of work, whether that&#8217;s an agent, a plain model call, a deterministic function, a tool, or a human approving something.</span></p></li><li><p><strong><span>Edges</span></strong><span> decide what runs next, either in sequence, in parallel, or conditionally based on what the last node produced.</span></p></li><li><p><strong><span>State</span></strong><span> is a shared object that flows along the edges. Every node reads from it and writes to it.</span></p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">graph.add_node("research", research_agent)
graph.add_node("write", writer_agent)
graph.add_node("review", reviewer_agent)

graph.add_edge("research", "write")
graph.add_edge("write", "review")

graph.add_conditional_edge("review",
    lambda state: "done" if state.approved else "write")</code></pre></div><p><span>This is the starter graph almost every example uses. A researcher gathers material, a writer drafts, and a reviewer judges. If the review passes, the run ends. If it fails, an edge sends the draft back to the writer.</span></p><p><span>There are three nodes and four edges, and one of those edges forms a loop.</span></p><p><span>But here&#8217;s what reframes everything. A single agent loop is just a one-node graph with an edge pointing back to itself.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!98QA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!98QA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 424w, https://substackcdn.com/image/fetch/$s_!98QA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 848w, https://substackcdn.com/image/fetch/$s_!98QA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 1272w, https://substackcdn.com/image/fetch/$s_!98QA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!98QA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png" width="680" height="406" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:406,&quot;width&quot;:680,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:38897,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.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_!98QA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 424w, https://substackcdn.com/image/fetch/$s_!98QA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 848w, https://substackcdn.com/image/fetch/$s_!98QA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 1272w, https://substackcdn.com/image/fetch/$s_!98QA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe589e33c-f0d4-485c-ba4e-bc6af73817bc_680x406.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>Graphs don&#8217;t replace loops but rather connect and govern them.</span></p><h4><strong><span>The stack kept growing</span></strong></h4><p><span>The center of gravity in AI keeps drifting away from the model, and each shift picked up a name.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IvOP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IvOP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 424w, https://substackcdn.com/image/fetch/$s_!IvOP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 848w, https://substackcdn.com/image/fetch/$s_!IvOP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!IvOP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IvOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png" width="574" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1294,&quot;width&quot;:1294,&quot;resizeWidth&quot;:574,&quot;bytes&quot;:331144,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.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_!IvOP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 424w, https://substackcdn.com/image/fetch/$s_!IvOP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 848w, https://substackcdn.com/image/fetch/$s_!IvOP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!IvOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F918bb549-8ca4-40ba-b9eb-99a6f0609033_1294x1294.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><span>Prompt engineering </span></strong>&#8594; <span>The words you send.</span></p></li><li><p><strong><span>Context engineering </span></strong>&#8594; <span>Everything the model sees, not just your instructions.</span></p></li><li><p><strong><span>Harness engineering </span></strong>&#8594; <span>The code around the model that runs tools, tracks state, and handles errors.</span></p></li><li><p><strong><span>Loop engineering </span></strong>&#8594; <span>The autonomous cycle that drives one agent toward a goal.</span></p></li><li><p><strong><span>Graph engineering </span></strong>&#8594; <span>The coordination layer across many loops, covering what runs when, in what order, and who checks whom.</span></p></li></ul><p><span>Each layer wraps the one before it:</span></p><p><span>A graph is made of loops, each loop needs a good harness, each harness call is a context problem, and every context contains prompts.</span></p><p><span>If you skip a lower layer, the graph just fails in a more elaborate way.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZDtU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZDtU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 424w, https://substackcdn.com/image/fetch/$s_!ZDtU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 848w, https://substackcdn.com/image/fetch/$s_!ZDtU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 1272w, https://substackcdn.com/image/fetch/$s_!ZDtU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZDtU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png" width="679" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:679,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:42686,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.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_!ZDtU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 424w, https://substackcdn.com/image/fetch/$s_!ZDtU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 848w, https://substackcdn.com/image/fetch/$s_!ZDtU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 1272w, https://substackcdn.com/image/fetch/$s_!ZDtU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F164cbf4f-3e7e-4fab-9aeb-117f6253e01c_679x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>Of course, none of this is new technology.</span></p><p><span>LangGraph shipped this exact model involving nodes and edges over shared state back in January 2024.</span></p><p><span>Microsoft&#8217;s AutoGen has GraphFlow, and Google built ADK 2.0&#8217;s entire workflow runtime on the same idea.</span></p><p><span>So while the name is new, the practice isn&#8217;t. In fact, the discipline isn&#8217;t inventing graphs but rather knowing when to use one, and how to keep it from rotting.</span></p><p><span>That part has four hard problems.</span></p><h4><strong><span>Hard part 1: knowing when a node deserves to exist</span></strong></h4><p><span>The most common failure is turning &#8220;summarize this PDF&#8221; into a five-node graph with a fetcher, a chunker, a summarizer, a reviewer, and a formatter.</span></p><p><span>A node earns its place only if it represents a real specialty, meaning a different model, a different toolset, or a genuinely separate role like a read-only reviewer. Steps you could inline into an existing loop are not nodes.</span></p><p><span>A useful filter is that if you can&#8217;t draw the graph on a napkin, it&#8217;s too complex. And if collapsing two nodes into one loses nothing, they were never two nodes.</span></p><h4><strong><span>Hard part 2: keeping shared state clean</span></strong></h4><p><span>In a loop, the failure mode is context rot.</span></p><p><span>In a graph, the same problem moves into a shared state.</span></p><p><span>Every node writes to the state object, so an uninformed write in node two will become a confident input for node five.</span></p><p><span>Nobody notices until the output is wrong, and by then, the bad data has flowed through half the system.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2o-f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2o-f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 424w, https://substackcdn.com/image/fetch/$s_!2o-f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 848w, https://substackcdn.com/image/fetch/$s_!2o-f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 1272w, https://substackcdn.com/image/fetch/$s_!2o-f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2o-f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png" width="679" height="374" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:374,&quot;width&quot;:679,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37415,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.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_!2o-f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 424w, https://substackcdn.com/image/fetch/$s_!2o-f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 848w, https://substackcdn.com/image/fetch/$s_!2o-f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 1272w, https://substackcdn.com/image/fetch/$s_!2o-f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F137efd9c-5304-4ca6-a332-1a0456e80e7e_679x374.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>The solutions are simple and boring, yet effective:</span></p><ul><li><p><span>Give the state a typed schema.</span></p></li><li><p><span>Decide explicitly which nodes may write to which fields.</span></p></li><li><p><span>Checkpoint state between nodes so you can replay a run and see exactly where it went bad.</span></p></li></ul><p><span>One caution applies to replays though.</span></p><p><span>Nodes after a checkpoint execute again, so any node with external side effects, like sending an email or creating a record, must be safe to run twice.</span></p><h4><strong><span>Hard part 3: routing you can trust</span></strong></h4><p><span>An edge is a decision, and the question is who makes it.</span></p><p><span>If a model decides the route, you get flexibility and instability together.</span></p><p><span>The same state can take different paths on different runs, which makes debugging miserable.</span></p><blockquote><p><em><span>Google&#8217;s design rule for ADK 2.0 is the cleanest position in the discourse. Deterministic code should control predictable routing, and models should only handle the steps that need actual judgment.</span></em></p></blockquote><p><span>Route with code wherever the condition is checkable, and spend model calls only where interpretation is genuinely required.</span></p><h4><strong><span>Hard part 4: agents agreeing with each other</span></strong></h4><p><span>Loop engineering&#8217;s sharpest rule was to never let an agent grade its own homework.</span></p><p><span>Graphs raise these stakes.</span></p><p><span>If you have 20 agents built on the same base model and all are reading the same flawed context, then they will happily agree with each other, and models measurably prefer their own outputs. </span></p><p><span>You can fix this with a reviewer node that runs on a different model, give it fresh context instead of the full conversation, and anchor its verdict to evidence the graph can&#8217;t fabricate, like tests that actually ran or code that actually compiled.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IqPs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IqPs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 424w, https://substackcdn.com/image/fetch/$s_!IqPs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 848w, https://substackcdn.com/image/fetch/$s_!IqPs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 1272w, https://substackcdn.com/image/fetch/$s_!IqPs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IqPs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png" width="679" height="410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:410,&quot;width&quot;:679,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52926,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.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_!IqPs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 424w, https://substackcdn.com/image/fetch/$s_!IqPs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 848w, https://substackcdn.com/image/fetch/$s_!IqPs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 1272w, https://substackcdn.com/image/fetch/$s_!IqPs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F963892de-133d-4774-a859-4d3c77a1a2eb_679x410.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><blockquote><p><em><span>Note: Cognition landed in the same place after a year of running Devin, their coding agent. Their working setup lets several agents read the work and weigh in, but only one agent is ever allowed to change anything.</span></em></p></blockquote><p><span>Reading is safe to do in parallel, because a bad opinion costs you nothing until someone acts on it. Writing is where the damage happens, so you keep it in one place where you can see it.</span></p><h4><strong><span>Where the graph is an overkill</span></strong></h4><p><span>Most of the time.</span></p><p><span>Anthropic&#8217;s own numbers suggest this.</span></p><p><span>A single agent burns roughly 4x the tokens of a chat interaction, and multi-agent systems burn roughly 15x.</span></p><p><span>Every node you add multiplies that.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8C8B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8C8B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 424w, https://substackcdn.com/image/fetch/$s_!8C8B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 848w, https://substackcdn.com/image/fetch/$s_!8C8B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 1272w, https://substackcdn.com/image/fetch/$s_!8C8B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8C8B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png" width="679" height="481" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/be6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:481,&quot;width&quot;:679,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54510,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.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_!8C8B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 424w, https://substackcdn.com/image/fetch/$s_!8C8B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 848w, https://substackcdn.com/image/fetch/$s_!8C8B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 1272w, https://substackcdn.com/image/fetch/$s_!8C8B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe6cd162-18c4-4c3e-bbe5-e8e2656938e9_679x481.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>Anthropic&#8217;s multi-agent research system outperformed a single Opus agent by 90.2% on their internal research eval, because research fans out into independent searches naturally.</span></p><p><span>But their standing advice from Building Effective Agents hasn&#8217;t changed. Find the simplest solution possible, and only add complexity when the task demands it.</span></p><blockquote><p><em><span>Even LangGraph&#8217;s own guidance says that if your agent is a straightforward loop with tools, LangGraph is overkill.</span></em></p></blockquote><p><span>The decision rule is pretty straightforward:  Reach for a graph when the work splits into genuine specialties, needs parallel fan-out and join, needs different models per step, or needs failure isolation and auditable routing. Otherwise, stay in the loop.</span></p><h4><strong><span>Where to start</span></strong></h4><p><span>You don&#8217;t need an org chart of agents on day one. Build up to it.</span></p><ul><li><p><span>Master a single loop first, with brakes, a real completion check, and a critic. A graph of weak loops is just distributed failure.</span></p></li><li><p><span>Draw the graph on paper before writing code, and challenge every node to justify its existence.</span></p></li><li><p><span>Define the state schema and write access up front. State drift is the main way graphs rot.</span></p></li><li><p><span>Make the reviewer node a different model with fresh context, and anchor it to external evidence.</span></p></li><li><p><span>Put budget caps on every node. A graph has many loops spending tokens in parallel, and a weak verifier now burns money concurrently.</span></p></li></ul><h4><strong><span>Key takeaway</span></strong></h4><p><span>Graph engineering isn&#8217;t a new discipline replacing loop engineering. It&#8217;s the name that stuck for a decision every agent builder eventually faces. When one loop stops being enough, coordination becomes the engineering.</span></p><p><span>The word may not survive the year. The design question will.</span></p><p><span>Here&#8217;s a summary of key takeaways in graph engineering.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yS0D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yS0D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 424w, https://substackcdn.com/image/fetch/$s_!yS0D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 848w, https://substackcdn.com/image/fetch/$s_!yS0D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 1272w, https://substackcdn.com/image/fetch/$s_!yS0D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yS0D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png" width="680" height="428" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:428,&quot;width&quot;:680,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:63155,&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.dailydoseofds.com/i/208605129?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.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_!yS0D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 424w, https://substackcdn.com/image/fetch/$s_!yS0D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 848w, https://substackcdn.com/image/fetch/$s_!yS0D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 1272w, https://substackcdn.com/image/fetch/$s_!yS0D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42aac678-f4e2-459f-a8c2-223f8a2db6a2_680x428.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><h3><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/">The anatomy of diffusion LLMs</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a></h3><p>We recently published a deep dive that covers one of the most important architectural shifts happening in language modeling right now: diffusion LLMs.</p><p><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/">Read the full Part 1 deep dive here &#8594;</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a></p><p><a href="https://www.dailydoseofds.com/diffusion-models-part-2"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-2">Read the full Part 2 deep dive here &#8594;</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-2"><span>&#8203;</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g9CL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g9CL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 424w, https://substackcdn.com/image/fetch/$s_!g9CL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 848w, https://substackcdn.com/image/fetch/$s_!g9CL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 1272w, https://substackcdn.com/image/fetch/$s_!g9CL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g9CL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png" width="1257" height="633" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:633,&quot;width&quot;:1257,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!g9CL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 424w, https://substackcdn.com/image/fetch/$s_!g9CL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 848w, https://substackcdn.com/image/fetch/$s_!g9CL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 1272w, https://substackcdn.com/image/fetch/$s_!g9CL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09768bd8-8e5e-43da-802b-85ebdef29965_1257x633.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It builds a complete understanding from first principles:</p><ul><li><p>how autoregressive generation is structurally memory-bandwidth bound)</p></li><li><p>why Gaussian noise can&#8217;t work on discrete tokens</p></li><li><p>how masked diffusion solves this with an ELBO-derived training objective</p></li><li><p>the math behind the forward and reverse processes</p></li><li><p>unmasking strategies</p></li><li><p>block diffusion for KV cache compatibility</p></li><li><p>a detailed engineering comparison between the two paradigms.</p></li><li><p>the training techniques that scaled dLLMs from 8B to 100B parameters (including converting pre-trained autoregressive models like LLaMA into diffusion models via attention mask annealing)</p></li><li><p>the inference acceleration stack (block-wise KV caching with Fast-dLLM, confidence-aware parallel decoding, token editing with LLaDA 2.1),</p></li><li><p>production serving with SGLang</p></li><li><p>hands-on code for running Dream 7B and serving LLaDA 2.0,</p></li><li><p>and a decision framework for when dLLMs actually make sense over autoregressive models.</p></li></ul><p><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/">Read the full Part 1 deep dive here &#8594;</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a></p><p><a href="https://www.dailydoseofds.com/diffusion-models-part-2"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-2">Read the full Part 2 deep dive here &#8594;</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-2"><span>&#8203;</span></a></p><div><hr></div><h4><strong>Why care?</strong></h4><p>Every production LLM today, GPT-4, Claude, Gemini, LLaMA, generates text the same way: one token at a time, left to right.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OWAB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OWAB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 424w, https://substackcdn.com/image/fetch/$s_!OWAB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 848w, https://substackcdn.com/image/fetch/$s_!OWAB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 1272w, https://substackcdn.com/image/fetch/$s_!OWAB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OWAB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png" width="807" height="400" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:400,&quot;width&quot;:807,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!OWAB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 424w, https://substackcdn.com/image/fetch/$s_!OWAB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 848w, https://substackcdn.com/image/fetch/$s_!OWAB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 1272w, https://substackcdn.com/image/fetch/$s_!OWAB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9afd2f9-892b-4640-8a57-4da5d4ca6bcd_807x400.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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"></figcaption></figure></div><p>Each token requires loading the full model weights through GPU memory, performing a tiny computation, and then loading all the weights again for the next token. On an A100, this means roughly 1 FLOP per byte of data moved, while the GPU is designed for 100+ FLOPs per byte.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2Lbi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2Lbi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 424w, https://substackcdn.com/image/fetch/$s_!2Lbi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 848w, https://substackcdn.com/image/fetch/$s_!2Lbi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 1272w, https://substackcdn.com/image/fetch/$s_!2Lbi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2Lbi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png" width="1069" height="427" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:427,&quot;width&quot;:1069,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!2Lbi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 424w, https://substackcdn.com/image/fetch/$s_!2Lbi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 848w, https://substackcdn.com/image/fetch/$s_!2Lbi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 1272w, https://substackcdn.com/image/fetch/$s_!2Lbi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3585f1a2-20c1-4b93-b76f-860e253af000_1069x427.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/">Diffusion LLMs</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a> take a completely different approach. They start with a fully masked sequence and iteratively unmask all tokens in parallel, using bidirectional attention at every step. This shifts inference from memory-bandwidth bound to compute-bound, which is exactly where modern GPUs are efficient.</p><p>The results are catching up fast. Block diffusion (BD3-LM) is within 0.5 perplexity points of autoregressive on LM1B. LLaDA at 8B parameters matches LLaMA 3 on MMLU and exceeds it on TruthfulQA and HumanEval. And models like Dream 7B are already being served in production with SGLang.</p><p>Understanding how it works at a mathematical level, from the forward masking process to the ELBO objective to block-level KV caching, is going to be increasingly valuable as these models scale.</p><p><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/">You can read Part 1 here &#8594;</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-1/"><span>&#8203;</span></a></p><p><a href="https://www.dailydoseofds.com/diffusion-models-part-2"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/diffusion-models-part-2">You can read Part 2 here &#8594;</a></strong><a href="https://www.dailydoseofds.com/diffusion-models-part-2"><span>&#8203;</span></a></p><p>&#128073; Over to you: Do you think the future of LLM generation is pure diffusion, pure autoregressive, or some hybrid of the two?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[11 LLM Evaluation Methods]]></title><description><![CDATA[Must-know for AI engineers (explained visually).]]></description><link>https://blog.dailydoseofds.com/p/11-llm-evaluation-methods</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/11-llm-evaluation-methods</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Fri, 24 Jul 2026 22:04:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!M5lI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://kimi.com/blog/kimi-k3">Delta attention in Kimi K3 to fix growing KV cache</a></h3><p>Kimi K3 leans on a new mechanism called delta attention that does not keep a growing KV cache.</p><p>That is how it holds a million tokens of context without the memory blowing up.</p><p>Before we can understand delta attention, we need to understand attention itself.</p><p>It is a lookup. Every token stores a key, which works like an address, and a value, which is the content at that address.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ab3R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ab3R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ab3R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ab3R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ab3R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ab3R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg" width="1268" height="569" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:569,&quot;width&quot;:1268,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103306,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6767f9d-643e-462b-af2e-870fc200aaaf_1376x768.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_!ab3R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ab3R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ab3R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ab3R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a11973-6572-4b28-b2a2-d30f4127f66c_1268x569.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 build its output, a token sends out a query, matches it against every key in the sequence, and pulls back a blend of the values whose keys matched.</p><p>Standard attention keeps every one of those key and value pairs as a list, one entry per token.</p><p>That list is the KV cache, and it grows with the sequence, so each new token has to scan the whole thing to build its output.</p><p>Delta attention keeps the lookup process but throws away the list.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x4qz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x4qz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 424w, https://substackcdn.com/image/fetch/$s_!x4qz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 848w, https://substackcdn.com/image/fetch/$s_!x4qz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!x4qz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x4qz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg" width="1237" height="516" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:516,&quot;width&quot;:1237,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108179,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53337265-2209-4fa2-a6fb-7d756d0698da_1376x768.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_!x4qz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 424w, https://substackcdn.com/image/fetch/$s_!x4qz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 848w, https://substackcdn.com/image/fetch/$s_!x4qz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!x4qz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c16b109-ac40-4b6a-bed3-0a553382b4d2_1237x516.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 entire past collapses into one fixed-size matrix that still behaves like the lookup table.</p><p>When you hand it a key, it returns the value vector, blended from everything the past tokens wrote, and it&#8217;s weighted by how closely each stored key matches the one you handed in.</p><p>Writing is a constrained operation. A fixed matrix has no free slot to append to, so every write lands in a direction that earlier writes already occupy and merges the two associations together.</p><p>The delta rule handles this in two moves per token, depicted below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yGpl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yGpl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yGpl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yGpl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yGpl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yGpl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77145,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.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_!yGpl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yGpl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yGpl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yGpl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c1b69e7-4fc8-441b-bab8-175db61a7f6f_1376x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>&#8594; It reads before it writes. It hands the matrix the new token&#8217;s key and sees what value the memory currently returns, its existing guess for that address.</p><p>&#8594; It writes the difference, not the value. It compares that guess against the value it actually wants stored and writes only the gap. That gap is the delta, and it corrects the old association instead of stacking a new one on top.</p><p>The matrix also lets old entries fade over time, so a fixed size can keep absorbing a long sequence without filling up.</p><p>Standard attention remembers by keeping everything and pays a quadratic cost to re-scan it.</p><p>Delta attention remembers by rewriting one matrix and pays a linear cost.</p><p>Of course, a compressed matrix cannot store every token exactly, so recall of any single token becomes approximate. That is why production models interleave the two, i.e., a few full-attention layers for exact lookup and the rest running linear.</p><p><strong><a href="https://kimi.com/blog/kimi-k3">Read more in the official announcement blog here &#8594;</a></strong></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">11 LLM evaluation methods</a></h3><p>A model can answer a question correctly and still score close to zero on BLEU.</p><p>That happens whenever the model says the right thing in different words than the reference. BLEU compares n-gram overlap, so a clean paraphrase reads as a total miss.</p><p>This one failure is why LLM evaluation is fragmented into several methods, depicted below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!M5lI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M5lI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 424w, https://substackcdn.com/image/fetch/$s_!M5lI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 848w, https://substackcdn.com/image/fetch/$s_!M5lI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!M5lI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M5lI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg" width="1456" height="1401" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1401,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:223372,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.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_!M5lI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 424w, https://substackcdn.com/image/fetch/$s_!M5lI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 848w, https://substackcdn.com/image/fetch/$s_!M5lI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!M5lI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85ad3122-1a70-4308-9e1d-53f7af1c7d7f_1500x1443.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Each method encodes a different assumption about what a correct output looks like, and different metrics are useful in different use cases.</p><p>Let&#8217;s understand the 11 must-know LLM evaluation metrics below </p><div><hr></div><p><strong>1) BLEU</strong></p><p>Splits output and reference into n-grams and measures how much of the output is supported by the reference, with a brevity penalty so short outputs cannot win by omission.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_B7a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_B7a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!_B7a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!_B7a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!_B7a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_B7a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png" width="747" height="239" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:239,&quot;width&quot;:747,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114732,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.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_!_B7a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!_B7a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!_B7a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!_B7a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0b92db-a176-419a-98d9-082d7c9c2c4b_747x239.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It works for translation and constrained generation where the reference wording is close to the only acceptable wording. Report corpus-level BLEU instead of averaging sentence scores, and supply multiple references when more than one phrasing is correct.</p><p><strong>2) ROUGE</strong></p><p>Flips the direction of BLUE and measures recall, meaning how much of the reference is covered by the output.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xr9e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xr9e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!Xr9e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!Xr9e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!Xr9e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xr9e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png" width="744" height="235" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:235,&quot;width&quot;:744,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113436,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.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_!Xr9e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!Xr9e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!Xr9e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!Xr9e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfca0cdb-b97b-419a-a090-d105dd10f31b_744x235.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It is the default for summarization and extraction, where missing content hurts more than extra content. ROUGE-L uses longest common subsequence and tolerates reordering better than ROUGE-2. Recall alone rewards verbosity, so it needs a precision-side metric next to it.</p><p><strong>3) BERTScore</strong></p><p>Embeds both texts, matches each output token to its most similar reference token, and reports precision, recall, and F1 over those similarities.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QUtT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QUtT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!QUtT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!QUtT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!QUtT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QUtT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png" width="747" height="239" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:239,&quot;width&quot;:747,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139014,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.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_!QUtT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!QUtT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!QUtT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!QUtT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71138504-6ef5-40b9-b497-fc2a04eac4a0_747x239.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It handles the paraphrase case that causes problems in BLEU and ROUGE. Absolute values lie within a narrow high band, so scores are only meaningful when compared across systems, not read as accuracy. Rescaling the baseline helps, and the embedding model has to match the domain and language.</p><p><strong>4) G-Eval</strong></p><p>It hands a task description and criteria to a judge model to generate chain-of-thought evaluation steps, then scores against those steps with the result weighted by token probabilities.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LA0p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LA0p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!LA0p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!LA0p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!LA0p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LA0p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png" width="744" height="235" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:235,&quot;width&quot;:744,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:111509,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.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_!LA0p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!LA0p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!LA0p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!LA0p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F785c590d-561b-4e3f-b7f1-37b4fe93ba2e_744x235.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It fits subjective criteria with no reference answer, like tone, instruction following, or domain correctness. Criteria written as a concrete checklist score far more consistently than criteria written as adjectives.</p><p>Ideally, it is recommended to run the judge at a low <strong><a href="https://www.dailydoseofds.com/p/what-is-temperature-in-llms/">temperature</a></strong> and calibrate against a small human-labeled set before trusting it.</p><p><strong>5) LLM-as-Judge</strong></p><p>The pairwise form feeds two or more outputs to a judge with a rubric, the judge picks the better one:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!opfe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!opfe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!opfe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!opfe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!opfe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!opfe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png" width="747" height="239" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:239,&quot;width&quot;:747,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137932,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.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_!opfe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!opfe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!opfe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!opfe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b17be9-aca9-4659-9237-336f5f960dc1_747x239.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It is the practical way to compare two models, two prompts, or two retrieval configs when absolute scores drift between runs.</p><p>Make sure to randomize which output appears first, because judges might favor a position. You also need to control for length, since judges reliably prefer longer answers regardless of quality.</p><p><strong>6) Human eval</strong></p><p>Annotators score outputs across defined dimensions, and the aggregate becomes the reference that every automated metric gets calibrated against.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B6Aj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B6Aj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!B6Aj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!B6Aj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!B6Aj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B6Aj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png" width="744" height="235" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ee282a4-db22-4bda-a205-f1638836d221_744x235.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:235,&quot;width&quot;:744,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132579,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.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_!B6Aj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!B6Aj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!B6Aj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!B6Aj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ee282a4-db22-4bda-a205-f1638836d221_744x235.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It belongs in two places, building the calibration set that validates a judge, and the final gate before release.</p><p>You must define the rubric before annotation starts and measure inter-annotator agreement. Low agreement means the rubric is ambiguous, not that the annotators are wrong.</p><p><strong>7) LLM juries</strong></p><p>Runs several judges independently over the same output and averages their scores into one verdict.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BE8l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BE8l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!BE8l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!BE8l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!BE8l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BE8l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png" width="747" height="239" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:239,&quot;width&quot;:747,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:136695,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.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_!BE8l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 424w, https://substackcdn.com/image/fetch/$s_!BE8l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 848w, https://substackcdn.com/image/fetch/$s_!BE8l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 1272w, https://substackcdn.com/image/fetch/$s_!BE8l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6996a813-9b4d-4c6f-b568-abc74d6d1195_747x239.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It exists because a single judge carries a stable bias, including a preference for outputs from its own model family.</p><p>Use different model families rather than the same model three times, since correlated judges average away noise but not bias. Several small models in a jury often beat one large judge at a lower cost.</p><p><strong>8) DAG</strong></p><p>Scores through a decision tree where each node asks one narrow question and the answer routes to the next node, with the final leaf carrying the score.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1S-0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1S-0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 424w, https://substackcdn.com/image/fetch/$s_!1S-0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 848w, https://substackcdn.com/image/fetch/$s_!1S-0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 1272w, https://substackcdn.com/image/fetch/$s_!1S-0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1S-0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png" width="745" height="234" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:234,&quot;width&quot;:745,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113920,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.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_!1S-0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 424w, https://substackcdn.com/image/fetch/$s_!1S-0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 848w, https://substackcdn.com/image/fetch/$s_!1S-0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 1272w, https://substackcdn.com/image/fetch/$s_!1S-0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b3e70a-70c7-41da-8301-ffc61fc66173_745x234.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It fits rubrics with hard requirements and ordering, like format compliance, required sections, or a mandatory disclaimer.</p><p>Because branching is deterministic, the same output always gets the same score. Always put cheap deterministic checks near the root so failing outputs exit before any model call.</p><p><strong>9) Trajectory accuracy</strong></p><p>Captures the agent&#8217;s full sequence of thoughts, tool calls and observations, then scores that path against the expected one.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TLR0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TLR0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!TLR0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!TLR0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!TLR0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TLR0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png" width="744" height="235" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:235,&quot;width&quot;:744,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:128575,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.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_!TLR0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!TLR0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!TLR0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!TLR0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc35e124a-3b01-4d25-80db-93a0bf77d534_744x235.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It matters because an agent can reach the right answer through the wrong path, burning tokens on redundant calls or touching a tool it should not have.</p><p>Score path and outcome separately, otherwise a lucky correct answer hides a broken execution path. This needs tracing in place first, since there is no trajectory to score without it.</p><p><strong>10) Multi-turn eval</strong></p><p>Treats the whole conversation as the unit and scores role adherence, knowledge retention across turns, and coherence.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4747!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4747!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 424w, https://substackcdn.com/image/fetch/$s_!4747!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 848w, https://substackcdn.com/image/fetch/$s_!4747!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 1272w, https://substackcdn.com/image/fetch/$s_!4747!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4747!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png" width="745" height="234" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:234,&quot;width&quot;:745,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130375,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.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_!4747!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 424w, https://substackcdn.com/image/fetch/$s_!4747!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 848w, https://substackcdn.com/image/fetch/$s_!4747!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 1272w, https://substackcdn.com/image/fetch/$s_!4747!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba2c243-29be-4f26-a9e9-57b8363c57b9_745x234.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Per-turn scoring misses the failures that only appear over time, like contradicting an earlier answer or dropping a constraint set five turns ago.</p><p>Run it on real conversation logs rather than synthetic two-turn exchanges, because rule retention failures show up at depth.</p><p><strong>11) Safety eval</strong></p><p>Runs bias, toxicity and PII classifiers in parallel over the output and flags violations instead of producing a quality score.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wFzU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wFzU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!wFzU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!wFzU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!wFzU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wFzU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png" width="744" height="235" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:235,&quot;width&quot;:744,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:131855,&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.dailydoseofds.com/i/208385066?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.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_!wFzU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 424w, https://substackcdn.com/image/fetch/$s_!wFzU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 848w, https://substackcdn.com/image/fetch/$s_!wFzU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 1272w, https://substackcdn.com/image/fetch/$s_!wFzU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f81ce9-d3e8-4b5f-b268-980b512b6282_744x235.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It belongs as a gate, not as a term inside an average. A single PII leak matters regardless of how good the mean quality score looks, which is how folding safety into an aggregate ends up shipping violations.</p><div><hr></div><p>To use them in practice, most of these already ship as built-in metrics in Comet Opik, an open-source LLM evaluation and observability platform, including BLEU, ROUGE, BERTScore, G-Eval, LLM juries, trajectory accuracy, conversation-level metrics, and moderation, all running over traced production data.</p><p>Here&#8217;s the repo &#8594; <strong><a href="https://github.com/comet-ml/opik">https://github.com/comet-ml/opik</a></strong></p><p>(don&#8217;t forget to star it &#11088;&#65039;)</p><p>Also, to dive deeper in the full LLMOps lifecycle, we have covered every bit of it in the LLMOps course, starting from fundamentals to productions:</p><ul><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">Read Part 1 on fundamentals of LLMOps here &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-2">Read Part 2 on understanding the core building blocks of LLMs &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-3">Read Part 3 on the key components of LLMs, focusing on the attention mechanism, architectures like transformers and mixture-of-experts, and the fundamentals of pretraining and fine-tuning &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-4">Read Part 4 on decoding strategies, generation parameters, best practices, and the broader lifecycle of LLM-based applications &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-5">Read Part 5 on context + prompt engineering from a system perspective, in-context learning, types of prompts, and different prompting techniques &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-6">Read Part 6 on prompt versioning, defensive prompting, and techniques like verbalized sampling, role prompting, and more &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-7">Read Part 7 on context engineering, covering context types, context construction principles, and retrieval-centric techniques for building high-signal inputs &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-8">Read Part 8 on memory, dynamic, and temporal context in LLM systems, covering short and long-term memory, dynamic context injection, and common failure modes in agentic applications &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-9">Read Part 9 on evaluation methods and approaches for LLM-based applications, primarily focusing on building a strong understanding of the fundamental concepts &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-10">Read Part 10 on evaluation benchmarks in LLM applications, with task-specific methodologies, and the core tooling for evaluation of LLM apps &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-11">Read Part 11 on evaluation of multi-turn systems, tool use evaluations, tracing, and red teaming &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-12/">Read Part 12 on LLM fine-tuning, parameter-efficient methods like LoRA and QLoRA, and alignment techniques such as RLHF, DPO, and GRPO &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-13/">Read Part 13 on LLM inference optimization, KV caching, PagedAttention, FlashAttention, speculative decoding, and model parallelism &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-14">Read Part 14 on the fundamentals of LLM serving, including API-based access, inference with vLLM, and practical decisions.</a></strong></p></li></ul><p>&#128073; Over to you: What else would you add to the master tree?</p><p>Good day!</p>]]></content:encoded></item><item><title><![CDATA[5 Techniques to Optimize LLMs in Production]]></title><description><![CDATA[...explained visually.]]></description><link>https://blog.dailydoseofds.com/p/5-techniques-to-optimize-llms-in</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/5-techniques-to-optimize-llms-in</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Thu, 23 Jul 2026 13:59:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wKhw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://github.com/crewAIInc/crewAI"><span>&#8203;</span></a><strong><a href="https://github.com/crewAIInc/crewAI">Checkpoint any method automatically using CrewAI</a></strong><a href="https://github.com/crewAIInc/crewAI"><span>&#8203;</span></a></h3><p>Long-running agent flows fail mid-run, and in most frameworks, that means restarting from zero and burning the tokens again.</p><p><a href="https://github.com/crewAIInc/crewAI"><span>&#8203;</span></a><strong><a href="https://github.com/crewAIInc/crewAI">CrewAI</a></strong><span>&nbsp;</span>just shipped checkpointing in v1.14. Every flow method becomes a recovery point, written automatically when an event you specify fires (e.g., <code>method_execution_finished</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_!QU09!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QU09!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 424w, https://substackcdn.com/image/fetch/$s_!QU09!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 848w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1272w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QU09!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif" width="1312" height="1034" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1034,&quot;width&quot;:1312,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!QU09!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 424w, https://substackcdn.com/image/fetch/$s_!QU09!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 848w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1272w, https://substackcdn.com/image/fetch/$s_!QU09!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aaf3481-1c6f-4f39-80c6-a3ffc4e7ffa0_1312x1034.gif 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 resume in one line and fork from any saved state into a new branch with full lineage tracking. An async TUI lets you browse checkpoints, inspect events, and resume or fork from the UI.</p><p>The pipelines become resumable, inspectable, and branchable processes, with zero extra infra.</p><p><a href="https://github.com/crewAIInc/crewAI"><span>&#8203;</span></a><strong><a href="https://github.com/crewAIInc/crewAI">You can find the CrewAI repo here &#8594;</a></strong><a href="https://github.com/crewAIInc/crewAI"><span>&#8203;</span></a></p><div><hr></div><h3><a href="https://github.com/superlinked/sie">5 techniques to optimize LLMs in production</a></h3><p>A tricky LLM interview question:</p><p>You&#8217;re serving an LLM in FP16 on an A100.</p><p>Token generation is quite slow, so you upgrade to an H100, which has over 3x the FP16 compute.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IBuw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IBuw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 424w, https://substackcdn.com/image/fetch/$s_!IBuw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 848w, https://substackcdn.com/image/fetch/$s_!IBuw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 1272w, https://substackcdn.com/image/fetch/$s_!IBuw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IBuw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png" width="846" height="505" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:846,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:109674,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.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_!IBuw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 424w, https://substackcdn.com/image/fetch/$s_!IBuw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 848w, https://substackcdn.com/image/fetch/$s_!IBuw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 1272w, https://substackcdn.com/image/fetch/$s_!IBuw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474ddce7-ad60-4c5f-98ab-7f7965c8711d_846x505.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But upgrading the GPU didn&#8217;t improve the token generation speed much.</p><p>Why did this happen?</p><p>LLM token generation is a memory bandwidth problem disguised as a compute problem.</p><p>An A100 can do about 300 trillion FP16 operations per second. But it can only move ~2 TB per second between HBM and its compute units.</p><p>During generation, every new token requires reading the model weights and the entire KV cache from memory. While the computation process finishes almost instantly, the chip still has to spend time waiting for 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_!3oCq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3oCq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3oCq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3oCq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3oCq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3oCq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg" width="1264" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1264,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:129588,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d0c0e2e-3b27-414b-a5a4-798aa760d798_1264x848.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_!3oCq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3oCq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3oCq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3oCq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4eb663e-052f-4cdc-83de-f918b154fdec_1264x728.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 is why the highest-impact serving optimizations all try to tackle the same two things:</p><ul><li><p>how much data moves</p></li><li><p>and how often the GPU sits idle</p></li></ul><p>The visual below covers five of them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wKhw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wKhw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 424w, https://substackcdn.com/image/fetch/$s_!wKhw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 848w, https://substackcdn.com/image/fetch/$s_!wKhw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 1272w, https://substackcdn.com/image/fetch/$s_!wKhw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wKhw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png" width="1456" height="1190" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1190,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:198106,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.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_!wKhw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 424w, https://substackcdn.com/image/fetch/$s_!wKhw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 848w, https://substackcdn.com/image/fetch/$s_!wKhw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 1272w, https://substackcdn.com/image/fetch/$s_!wKhw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ca8e408-0330-48ba-bda0-49fbead290a6_1700x1390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong>1) Flash attention:</strong></p><p>Standard attention writes the full attention matrix in HBM, and it grows quadratically with sequence length.</p><p>Flash Attention splits Q, K, and V into tiles, computes attention inside on-chip SRAM, and writes only the final output back.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6QuF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6QuF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 424w, https://substackcdn.com/image/fetch/$s_!6QuF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 848w, https://substackcdn.com/image/fetch/$s_!6QuF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 1272w, https://substackcdn.com/image/fetch/$s_!6QuF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6QuF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png" width="1456" height="224" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:224,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37501,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.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_!6QuF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 424w, https://substackcdn.com/image/fetch/$s_!6QuF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 848w, https://substackcdn.com/image/fetch/$s_!6QuF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 1272w, https://substackcdn.com/image/fetch/$s_!6QuF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfeabfd7-23e1-45b9-bc9e-dd7eba89d74e_1679x258.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The output is mathematically identical, but the quadratic intermediate never exists in memory, so long sequences become relatively manageable.</p><p><strong>2) Paged attention:</strong></p><p>Naive serving reserves one contiguous memory chunk per request, sized for the maximum possible sequence length.</p><p>vLLM paper measured 60-80% of KV cache memory wasted this way.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JigJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JigJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 424w, https://substackcdn.com/image/fetch/$s_!JigJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 848w, https://substackcdn.com/image/fetch/$s_!JigJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 1272w, https://substackcdn.com/image/fetch/$s_!JigJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JigJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png" width="1456" height="221" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:221,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34868,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.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_!JigJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 424w, https://substackcdn.com/image/fetch/$s_!JigJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 848w, https://substackcdn.com/image/fetch/$s_!JigJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 1272w, https://substackcdn.com/image/fetch/$s_!JigJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf6a4da0-5656-4b86-9f7a-a1d7f89418f4_1679x255.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Paged attention is inspired by virtual memory from OS concepts.</p><p>The cache stays in small fixed-size blocks mapped through a block table, allocated as generation proceeds and freed on completion, which reduces waste to under 4%.</p><p><strong>3) Continuous batching:</strong></p><p>Static batching waits for the slowest request in a batch before admitting anything new. So one long generation keeps every finished slot idle until it completes.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B8cm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B8cm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 424w, https://substackcdn.com/image/fetch/$s_!B8cm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 848w, https://substackcdn.com/image/fetch/$s_!B8cm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 1272w, https://substackcdn.com/image/fetch/$s_!B8cm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B8cm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png" width="1456" height="219" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/def949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:219,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31487,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.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_!B8cm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 424w, https://substackcdn.com/image/fetch/$s_!B8cm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 848w, https://substackcdn.com/image/fetch/$s_!B8cm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 1272w, https://substackcdn.com/image/fetch/$s_!B8cm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdef949bf-9a7f-468d-a874-05fc3dc122d0_1679x253.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Continuous batching makes scheduling decisions after every decode step instead of after every batch.</p><p>When a request finishes, a queued request takes its slot at the next decode step, and the GPU stays saturated.</p><p><strong>4) Speculative decoding:</strong></p><p>A small draft model proposes K tokens cheaply, then the large target model verifies all K in a single forward pass, accepting matches and correcting the first mismatch.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FQuH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FQuH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 424w, https://substackcdn.com/image/fetch/$s_!FQuH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 848w, https://substackcdn.com/image/fetch/$s_!FQuH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 1272w, https://substackcdn.com/image/fetch/$s_!FQuH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FQuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png" width="1456" height="219" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:219,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37113,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.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_!FQuH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 424w, https://substackcdn.com/image/fetch/$s_!FQuH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 848w, https://substackcdn.com/image/fetch/$s_!FQuH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 1272w, https://substackcdn.com/image/fetch/$s_!FQuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be4473a-91ce-45bc-8988-2fb88940345f_1679x253.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The rejection sampling scheme guarantees an output distribution identical to running the large model alone, so the speedup costs zero quality.</p><p><strong>5) Kernel fusion:</strong></p><p>Every GPU operation runs as its own kernel by default, and each one writes its result to HBM for the next kernel to read back.</p><p>Kernel fusion merges LayerNorm, MatMul, and activations into one kernel that keeps intermediates in registers and SRAM.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U8Z-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U8Z-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 424w, https://substackcdn.com/image/fetch/$s_!U8Z-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 848w, https://substackcdn.com/image/fetch/$s_!U8Z-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 1272w, https://substackcdn.com/image/fetch/$s_!U8Z-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U8Z-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png" width="1456" height="219" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:219,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35121,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.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_!U8Z-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 424w, https://substackcdn.com/image/fetch/$s_!U8Z-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 848w, https://substackcdn.com/image/fetch/$s_!U8Z-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 1272w, https://substackcdn.com/image/fetch/$s_!U8Z-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f57b57-6d49-4c5d-8e11-ef12aa88ac3e_1679x253.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Compilers like TensorRT-LLM and <code>torch.compile</code> do this automatically from the model graph.</p><div><hr></div><p>That said, all five techniques above are built for one model owning the whole GPU.</p><p>Paged attention and continuous batching fit more concurrent requests when more memory is available for KV cache blocks.</p><p>So vLLM pre-allocates nearly all GPU memory at startup and turns it into one big block pool.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tbyG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tbyG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tbyG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tbyG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tbyG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tbyG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg" width="1376" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:1376,&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_!tbyG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tbyG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tbyG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tbyG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3380b0d-7dfc-4c82-bf57-4418f3762ba7_1376x659.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But production stacks rarely run just one model.</p><p>A typical pipeline also runs several small specialized models like embedders, rerankers, and extractors alongside the LLM.</p><p>Serving each one the standard way requires a separate vLLM or TEI process, and every process claims its memory upfront with no visibility into the others.</p><p>So a 600M-parameter embedder reserves a GPU it will never fully use, and models that could comfortably share one card end up spread across many.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7ovH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7ovH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7ovH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg" width="1376" height="555" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:555,&quot;width&quot;:1376,&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_!7ovH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7ovH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e0fd718-1d84-49b9-abf5-620377afe0df_1376x555.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 is also why moving to small yet better models does not lead to substantial cost savings alone.</p><p>Superlinked&#8217;s open-source inference engine (SIE) solves this by running all of those models behind one API with shared GPU memory and on-demand model loading, so the card is actually shared instead of claimed.</p><p>GitHub repo &#8594; <strong><a href="https://github.com/superlinked/sie">https://github.com/superlinked/sie</a></strong></p><p>(don&#8217;t forget to star it &#11088; )</p><p>We wrote a <strong><a href="https://www.dailydoseofds.com/p/why-small-models-alone-dont-reduce-inference-costs/">full breakdown</a></strong> of this small-model serving problem and how SIE solves it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CoH3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CoH3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 424w, https://substackcdn.com/image/fetch/$s_!CoH3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 848w, https://substackcdn.com/image/fetch/$s_!CoH3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 1272w, https://substackcdn.com/image/fetch/$s_!CoH3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CoH3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png" width="591" height="357.7269841269841" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:945,&quot;resizeWidth&quot;:591,&quot;bytes&quot;:42092,&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.dailydoseofds.com/i/208125928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.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_!CoH3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 424w, https://substackcdn.com/image/fetch/$s_!CoH3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 848w, https://substackcdn.com/image/fetch/$s_!CoH3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 1272w, https://substackcdn.com/image/fetch/$s_!CoH3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5ed3db-a488-4659-89bb-36bb0519165b_945x572.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It covers why switching to small specialized models doesn&#8217;t reduce inference costs unless those models share GPUs, and why vLLM&#8217;s design makes that impossible.</p><p><strong><a href="https://www.dailydoseofds.com/p/why-small-models-alone-dont-reduce-inference-costs/">You can read it here &#8594;</a></strong></p><p>Good day!</p><div><hr></div><h3><strong>P.S. For those wanting to develop &#8220;Industry ML&#8221; expertise:</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cn8y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>At the end of the day, all businesses care about </span><em>impact</em><span>. That&#8217;s it!</span></p><ul><li><p>Can you reduce costs?</p></li><li><p>Drive revenue?</p></li><li><p>Can you scale ML models?</p></li><li><p>Predict trends before they happen?</p></li></ul><p>We have discussed several other topics (with implementations) that align with such topics.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/membership&quot;,&quot;text&quot;:&quot;Develop \&quot;Industry ML\&quot; Skills&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/membership"><span>Develop "Industry ML" Skills</span></a></p><p>Here are some of them:</p><ul><li><p><span>Learn everything about MCPs in this </span><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">crash course with 9 parts &#8594;</a></strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a></p></li><li><p><span>Learn how to build Agentic systems in </span><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-1-with-implementation/">a crash course with 14 parts</a></strong><span>.</span></p></li><li><p><span>Learn how to build real-world RAG apps and evaluate and scale them in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-building-rag-systems-part-1-with-implementations/">this crash course</a></strong><span>.</span></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_!bv9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" width="1456" height="1128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1128,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Learn sophisticated graph architectures and how to train them on graph data.</p></li><li><p><span>So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches </span><strong><a href="https://www.dailydoseofds.com/bi-encoders-and-cross-encoders-for-sentence-pair-similarity-scoring-part-1/">here</a></strong><span>.</span></p></li><li><p><span>Learn how to run large models on small devices using </span><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">Quantization techniques</a></strong><span>.</span></p></li><li><p><span>Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using </span><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">Conformal Predictions</a></strong><span>.</span></p></li><li><p><span>Learn how to identify causal relationships and answer business questions using causal inference in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-causality-part-1/">this crash course</a></strong><span>.</span></p></li><li><p><span>Learn how to scale and implement ML model training in this </span><strong><a href="https://www.dailydoseofds.com/how-to-scale-model-training/">practical guide</a></strong><span>.</span></p></li><li><p><span>Learn techniques to reliably </span><strong><a href="https://www.dailydoseofds.com/5-must-know-ways-to-test-ml-models-in-production-implementation-included/">test new models in production</a></strong><span>.</span></p></li><li><p><span>Learn how to build privacy-first ML systems using </span><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">Federated Learning</a></strong><span>.</span></p></li><li><p><span>Learn 6 techniques with implementation to </span><strong><a href="https://www.dailydoseofds.com/model-compression-a-critical-step-towards-efficient-machine-learning/">compress ML models</a></strong><span>.</span></p></li></ul><p>All these resources will help you cultivate key skills that businesses and companies care about the most.</p>]]></content:encoded></item><item><title><![CDATA[Karpathy Said Something You’ll Regret Ignoring]]></title><description><![CDATA[Karpathy said something you&#8217;ll regret ignoring]]></description><link>https://blog.dailydoseofds.com/p/karpathy-said-something-youll-regret</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/karpathy-said-something-youll-regret</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Wed, 22 Jul 2026 22:24:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!DoKq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://fandf.co/3R5lW0t">Karpathy said something you&#8217;ll regret ignoring</a></h3><p>&#8220;You are still responsible for your software, just as before. You are not allowed to introduce vulnerabilities because of vibe coding. &#8220;</p><p>He said it while drawing the line between vibe coding and agentic engineering. Agents write more of the code now, but none of that takes the responsibility off you.</p><p>The assumption underneath that is that a careful enough reader catches the problem. But some failures don&#8217;t show up in anything there is to read.</p><p>For instance, a common fear with a RAG agent is that it could hallucinate when a question asks something outside its corpus.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7LP6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7LP6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7LP6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7LP6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7LP6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7LP6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg" width="1376" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:512,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:89489,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207478409?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82eee31-8571-4502-94a4-e7b7c107f4e0_1376x768.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_!7LP6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7LP6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7LP6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7LP6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b3359cf-4684-4ff5-8c83-5828fb41b43a_1376x512.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But such cases are actually well handled by any competent model now. If nothing in the retrieved context looks relevant, there&#8217;s no material to build an answer on.</p><p>Instead, the majority of failures originate when the retrieved context has partial coverage.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gYRc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gYRc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gYRc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gYRc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gYRc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gYRc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg" width="1376" height="441" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:441,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78515,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207478409?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e3886ab-e613-4aa7-bf64-16898800db68_1376x768.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_!gYRc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gYRc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gYRc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gYRc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35f180bf-2e7c-4bfe-8085-07544f11ef5c_1376x441.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 retrieval pipeline returns context that&#8217;s topically correct but doesn&#8217;t cover the full question, and the model completes the remainder from parametric knowledge.</p><p>There are no token-level labels in the output to tell what was generated using retrieved context and what came from weights.</p><p>Both are streamed the same way.</p><p>Detecting this for production-grade apps needs a metric written for it, one that&#8217;s also aligned with principles of agentic engineering.</p><p>And the solution is actually implemented in the eval skill that comes with <strong><a href="https://fandf.co/3R5lW0t">Google&#8217;s Agents CLI</a></strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DoKq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DoKq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 424w, https://substackcdn.com/image/fetch/$s_!DoKq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 848w, https://substackcdn.com/image/fetch/$s_!DoKq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 1272w, https://substackcdn.com/image/fetch/$s_!DoKq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DoKq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png" width="1190" height="740" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:740,&quot;width&quot;:1190,&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_!DoKq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 424w, https://substackcdn.com/image/fetch/$s_!DoKq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 848w, https://substackcdn.com/image/fetch/$s_!DoKq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 1272w, https://substackcdn.com/image/fetch/$s_!DoKq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc602df15-278f-48d1-8cda-9d3c82ea596b_1190x740.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>We described the concern to Claude Code in plain English. It read the agent&#8217;s code, came back with a plan I approved.</p><p>It then reported that no built-in metric isolates the behaviour and wrote a custom rubric called corpus_abstention.</p><p>It assigned a single categorical verdict per case rather than aggregating everything into one score, since the built-in raters regenerate their rubrics each run and leave no stable number to trend.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P2P_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P2P_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 424w, https://substackcdn.com/image/fetch/$s_!P2P_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 848w, https://substackcdn.com/image/fetch/$s_!P2P_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!P2P_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P2P_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg" width="1376" height="621" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:621,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:150123,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207478409?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10baa404-6ad5-43b5-a12a-772175aaf7da_1376x768.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_!P2P_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 424w, https://substackcdn.com/image/fetch/$s_!P2P_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 848w, https://substackcdn.com/image/fetch/$s_!P2P_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!P2P_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feba5e8d2-de5a-49e7-915a-443b8b7a921a_1376x621.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>GROUNDED_ANSWER</p></li><li><p>CORRECT_ABSTENTION</p></li><li><p>UNGROUNDED_ANSWER (answered entirely from outside knowledge)</p></li><li><p>MIXED_LEAKAGE (grounded, but slips in one unsupported claim)</p></li><li><p>WRONG_ABSTENTION (refused something the docs actually covered)</p></li></ul><p>After this, it automatically generated 33 scenarios partitioned by where the failure could occur, like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R5Bu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R5Bu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 424w, https://substackcdn.com/image/fetch/$s_!R5Bu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 848w, https://substackcdn.com/image/fetch/$s_!R5Bu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!R5Bu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R5Bu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg" width="2752" height="1392" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1392,&quot;width&quot;:2752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:359896,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207478409?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae7b9efc-18b3-4fd5-a6cb-1dda5a7501f6_2752x1536.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_!R5Bu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 424w, https://substackcdn.com/image/fetch/$s_!R5Bu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 848w, https://substackcdn.com/image/fetch/$s_!R5Bu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!R5Bu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7fcbc09-906b-43d2-aabc-6f2f32151d0c_2752x1392.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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-corpus</p></li><li><p>off-domain</p></li><li><p>out-of-corpus but plausibly answerable</p></li><li><p>boundary cases where the topic is covered, but a specific detail isn&#8217;t.</p></li></ul><p>The baseline score was 19 of 33.</p><ul><li><p>Off-domain passed 3 of 3, as expected.</p></li><li><p>But 6 of 15 in-corpus cases retrieved the right document, cited it correctly, answered accurately, and added a claim the source never made.</p></li></ul><p>The root cause was one line in the agent&#8217;s instruction: &#8220;If you already know the answer to a simple question and no document lookup is needed, you may respond directly without citations.&#8221;</p><p>The eval skill helped flag this, and then Claude removed it and forced retrieval on every question.</p><p>This took the suite to 30 of 33, and ungrounded answers went from 6 to 0. The full recording of our run is below, and we worked with the Google Cloud team on this.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;c08222cd-057d-4fbf-ae5d-1b06ca753561&quot;,&quot;duration&quot;:null}"></div><p>Here&#8217;s the Agents CLI GitHub repo &#8594; <strong><a href="https://fandf.co/3R5lW0t"><span>https://github.com/google/agents-cli</span></a></strong></p><p>(don&#8217;t forget to star it &#11088; )</p><div><hr></div><h3><a href="https://github.com/getzep/graphiti">Are we ready for an agent-native memory system?</a></h3><p>First, what does that even mean?</p><p>It&#8217;s memory built for an agent that keeps running, not a store you bolt on at the end. It has to hold facts across sessions, update them when they change, drop the stale ones, and hand back the right piece when the agent asks. A real data system, not a pile of saved chunks.</p><p>A new study checked whether anything out there actually does this, and what decides the answer surprised me.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CMSn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CMSn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 424w, https://substackcdn.com/image/fetch/$s_!CMSn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 848w, https://substackcdn.com/image/fetch/$s_!CMSn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 1272w, https://substackcdn.com/image/fetch/$s_!CMSn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CMSn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png" width="570" height="617.2961373390558" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1514,&quot;width&quot;:1398,&quot;resizeWidth&quot;:570,&quot;bytes&quot;:608608,&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.dailydoseofds.com/i/207478409?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.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_!CMSn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 424w, https://substackcdn.com/image/fetch/$s_!CMSn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 848w, https://substackcdn.com/image/fetch/$s_!CMSn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 1272w, https://substackcdn.com/image/fetch/$s_!CMSn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66a9cdd6-af91-4531-928e-03ea8d0ae799_1398x1514.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It takes 12 agent memory systems and splits each into four stages, covering how memory is represented, extracted, retrieved, and maintained. Then it checks which stage decides whether the agent stays correct.</p><p>Turns out it&#8217;s write time, not query time.</p><p>The systems that stay reliable under fact updates and cross-session reasoning are the ones that add structure as the memory is written. The graph-based methods lead right there.</p><p>The flat stores fail the same way every time. An LLM pulls out entities and relationships with no schema, and the graph fills up with generic nodes that nothing downstream can filter.</p><p>A few things follow from this.</p><ul><li><p>Structure has to be set at extraction. Once the graph is built from untyped nodes, no query can recover a distinction the extractor never made.</p></li><li><p>Updates return stale facts. Append-only and freeform stores keep handing back old versions, which the paper calls hallucinations of the past.</p></li><li><p>A bigger model does not save it. Swapping the backbone moves the scores but rarely changes which pipeline wins, so the memory&#8217;s behavior is set before generation runs.</p></li></ul><p>The paper also weighs the cost. The heavily structured systems pay for it, sometimes orders of magnitude more time per query, and the win only holds when the upkeep stays local instead of rewriting the whole store on every change.</p><p>So the takeaway is less about picking a winner and more about where the structure lives. Decide it at write time, keep the maintenance cheap, and retrieval has something real to rank.</p><p>Retrieval only ranks what extraction chose to keep.</p><p>Link to the paper: <strong><a href="https://arxiv.org/pdf/2606.24775">https://arxiv.org/pdf/2606.24775</a></strong></p><p>If you&#8217;re into agent memory systems, we wrote a <strong><a href="https://www.dailydoseofds.com/p/hands-on-agent-memory-is-only-as-good-as-its-schema/">full article</a></strong> on exactly this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YW2o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YW2o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 424w, https://substackcdn.com/image/fetch/$s_!YW2o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 848w, https://substackcdn.com/image/fetch/$s_!YW2o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 1272w, https://substackcdn.com/image/fetch/$s_!YW2o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YW2o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png" width="576" height="389.53846153846155" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:633,&quot;width&quot;:936,&quot;resizeWidth&quot;:576,&quot;bytes&quot;:48667,&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.dailydoseofds.com/i/207478409?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.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_!YW2o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 424w, https://substackcdn.com/image/fetch/$s_!YW2o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 848w, https://substackcdn.com/image/fetch/$s_!YW2o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 1272w, https://substackcdn.com/image/fetch/$s_!YW2o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f544bc-ebc8-49f2-a1d9-4b8c2370df39_936x633.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>It walks through defining the schema as a Pydantic ontology in <strong><a href="https://github.com/getzep/graphiti">Zep</a></strong>, with custom entity and edge types, source and target constraints, and the extraction pipeline that turns raw conversations into typed, queryable memory.</p><p>This memory system is 100% open-source: <strong><a href="https://github.com/getzep/graphiti">https://github.com/getzep/graphiti</a></strong></p><p><strong><a href="https://www.dailydoseofds.com/p/hands-on-agent-memory-is-only-as-good-as-its-schema/">You can read it here &#8594;</a></strong></p><p>Good day!</p><div><hr></div><h3><strong>P.S. For those wanting to develop &#8220;Industry ML&#8221; expertise:</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cn8y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>At the end of the day, all businesses care about </span><em>impact</em><span>. That&#8217;s it!</span></p><ul><li><p>Can you reduce costs?</p></li><li><p>Drive revenue?</p></li><li><p>Can you scale ML models?</p></li><li><p>Predict trends before they happen?</p></li></ul><p>We have discussed several other topics (with implementations) that align with such topics.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/membership&quot;,&quot;text&quot;:&quot;Develop \&quot;Industry ML\&quot; Skills&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/membership"><span>Develop "Industry ML" Skills</span></a></p><p>Here are some of them:</p><ul><li><p><span>Learn everything about MCPs in this </span><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">crash course with 9 parts &#8594;</a></strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a></p></li><li><p><span>Learn how to build Agentic systems in </span><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-1-with-implementation/">a crash course with 14 parts</a></strong><span>.</span></p></li><li><p><span>Learn how to build real-world RAG apps and evaluate and scale them in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-building-rag-systems-part-1-with-implementations/">this crash course</a></strong><span>.</span></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_!bv9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" width="1456" height="1128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1128,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Learn sophisticated graph architectures and how to train them on graph data.</p></li><li><p><span>So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches </span><strong><a href="https://www.dailydoseofds.com/bi-encoders-and-cross-encoders-for-sentence-pair-similarity-scoring-part-1/">here</a></strong><span>.</span></p></li><li><p><span>Learn how to run large models on small devices using </span><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">Quantization techniques</a></strong><span>.</span></p></li><li><p><span>Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using </span><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">Conformal Predictions</a></strong><span>.</span></p></li><li><p><span>Learn how to identify causal relationships and answer business questions using causal inference in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-causality-part-1/">this crash course</a></strong><span>.</span></p></li><li><p><span>Learn how to scale and implement ML model training in this </span><strong><a href="https://www.dailydoseofds.com/how-to-scale-model-training/">practical guide</a></strong><span>.</span></p></li><li><p><span>Learn techniques to reliably </span><strong><a href="https://www.dailydoseofds.com/5-must-know-ways-to-test-ml-models-in-production-implementation-included/">test new models in production</a></strong><span>.</span></p></li><li><p><span>Learn how to build privacy-first ML systems using </span><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">Federated Learning</a></strong><span>.</span></p></li><li><p><span>Learn 6 techniques with implementation to </span><strong><a href="https://www.dailydoseofds.com/model-compression-a-critical-step-towards-efficient-machine-learning/">compress ML models</a></strong><span>.</span></p></li></ul><p>All these resources will help you cultivate key skills that businesses and companies care about the most.</p><p></p>]]></content:encoded></item><item><title><![CDATA[5 LLM Quantization Techniques]]></title><description><![CDATA[...explained visually.]]></description><link>https://blog.dailydoseofds.com/p/5-llm-quantization-techniques</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/5-llm-quantization-techniques</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Tue, 21 Jul 2026 22:13:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jdZa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><strong><a href="https://fandf.co/4yDUgAH">Trace AI components in production to their exact line</a></strong></h3><p>Every dependency in a modern codebase shows up in a manifest, except the AI ones.</p><p>Open-source models, LLM APIs, MCP servers, and agents enter production through the same pull requests as ordinary packages, but no lockfile lists them and no dependency scanner sees them.</p><p>Checkmarx found that 70% of teams expect AI components in production, while 43% have zero governance over them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gj8x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gj8x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Gj8x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Gj8x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Gj8x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gj8x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:134594,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.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_!Gj8x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Gj8x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Gj8x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Gj8x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f1b1850-4200-4476-b5dd-b86e86ffd7af_2400x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://fandf.co/4yDUgAH">Checkmarx AI Inventory</a></strong> (part of Checkmarx One) catalogs every model, SDK, and MCP server deterministically, traces each one to the exact file and line, and exports an AI-BOM for compliance audits.</p><p>Gartner named Checkmarx a Leader in its inaugural Magic Quadrant for Software Supply Chain Security.</p><p><strong><a href="https://fandf.co/4yDUgAH">Learn more about Checkmarx AI Inventory here &#8594;</a></strong></p><p><em>Thanks to Checkmarx for partnering today!</em></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">5 LLM Quantization Techniques</a></h3><p>A 70B parameter model in FP16 requires 140GB of memory for weights alone.</p><p>That exceeds any single GPU available today:</p><ul><li><p>An H100 carries 80GB</p></li><li><p>An RTX 4090 carries 24GB</p></li></ul><p>So serving the model in half precision means multi-GPU setups and tensor parallelism before the first token is generated.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mcn3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mcn3!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 424w, https://substackcdn.com/image/fetch/$s_!mcn3!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 848w, https://substackcdn.com/image/fetch/$s_!mcn3!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 1272w, https://substackcdn.com/image/fetch/$s_!mcn3!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mcn3!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif" width="1456" height="257" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:257,&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;:&quot;https://blog.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstackcdn.com%2Fimage%2Ffetch%2F%24s_%21mcn3%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep%2Fhttps%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mcn3!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 424w, https://substackcdn.com/image/fetch/$s_!mcn3!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 848w, https://substackcdn.com/image/fetch/$s_!mcn3!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 1272w, https://substackcdn.com/image/fetch/$s_!mcn3!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437225d5-c382-4f8e-9ea3-88bb9b0e78b5_1554x274.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Quantization reduces this footprint by storing weights in lower bits.</p><p>The standard scheme maps each weight from FP16 onto a small integer grid: compute the dynamic range of the tensor, divide it into <code>2^b</code> levels (16 levels at 4-bit), round each weight to the nearest level, and store a scale factor to dequantize during inference.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BYVx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BYVx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 424w, https://substackcdn.com/image/fetch/$s_!BYVx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 848w, https://substackcdn.com/image/fetch/$s_!BYVx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 1272w, https://substackcdn.com/image/fetch/$s_!BYVx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BYVx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png" width="1456" height="498" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:498,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:175491,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.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_!BYVx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 424w, https://substackcdn.com/image/fetch/$s_!BYVx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 848w, https://substackcdn.com/image/fetch/$s_!BYVx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 1272w, https://substackcdn.com/image/fetch/$s_!BYVx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6090d643-2b7b-40be-a391-abd20cbf8d99_2899x991.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>At 4-bit, the weight memory drops 4x. The 140GB model fits in 35GB, within the range of a single 40GB or 48GB card.</p><p>That said, if rounding were lossless in practice, one method would suffice, and the diagram below would have&nbsp;had one row:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jdZa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jdZa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jdZa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jdZa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jdZa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jdZa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg" width="1350" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1200,&quot;width&quot;:1350,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:170205,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.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_!jdZa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jdZa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jdZa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jdZa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82be21c1-7649-4d25-8e4b-b900dda507c0_1350x1200.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>But it has five because weights and activations in large transformers are not uniformly important.</p><p>The <code>LLM.int8()</code> paper quantified this. Beyond roughly 6.7B parameters, every transformer layer develops a handful of hidden dimensions carrying values 20x to 100x larger than the rest.</p><p>These dimensions make up about 0.1% of the model&#8217;s features, but zeroing them out nearly destroys the model&#8217;s ability to predict text.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MCnt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MCnt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 424w, https://substackcdn.com/image/fetch/$s_!MCnt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 848w, https://substackcdn.com/image/fetch/$s_!MCnt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 1272w, https://substackcdn.com/image/fetch/$s_!MCnt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MCnt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png" width="1456" height="342" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:342,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:638526,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.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_!MCnt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 424w, https://substackcdn.com/image/fetch/$s_!MCnt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 848w, https://substackcdn.com/image/fetch/$s_!MCnt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 1272w, https://substackcdn.com/image/fetch/$s_!MCnt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb306f134-0557-4da8-a23d-ad979dd5306c_4707x1105.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>These outliers are also what break naive rounding. The quantization grid spans the range of the tensor, so a single activation of magnitude 60 among values near 1 inflates the scale factor and collapses the remaining values into a few levels, destroying their precision.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Cq7M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cq7M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Cq7M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Cq7M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Cq7M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cq7M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg" width="1200" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103985,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.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_!Cq7M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Cq7M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Cq7M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Cq7M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d5a73e-26e0-4bf9-b48c-48b841ff5b65_1200x896.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Each method in the visual shown earlier solves this saliency problem differently.</p><p>1) <code>RTN</code> (round to nearest) does not handle it at all. It applies the scale-and-round procedure directly with no calibration data, which makes it the cheapest baseline and the weakest at low bit widths, where accumulated rounding error is unrecoverable.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gLDQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gLDQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 424w, https://substackcdn.com/image/fetch/$s_!gLDQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 848w, https://substackcdn.com/image/fetch/$s_!gLDQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 1272w, https://substackcdn.com/image/fetch/$s_!gLDQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gLDQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png" width="1338" height="216" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:216,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:140778,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.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_!gLDQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 424w, https://substackcdn.com/image/fetch/$s_!gLDQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 848w, https://substackcdn.com/image/fetch/$s_!gLDQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 1272w, https://substackcdn.com/image/fetch/$s_!gLDQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1615326b-b912-4c5d-86f3-a89d727141dc_1338x216.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>2) <code>GPTQ</code> corrects rounding damage as it happens. It quantizes the weights of a layer a few at a time, measures how much error the rounding just introduced, and nudges the not-yet-quantized weights to cancel out that error before moving on.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ewpo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ewpo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!Ewpo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!Ewpo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!Ewpo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ewpo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png" width="1338" height="214" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:214,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79405,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.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_!Ewpo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!Ewpo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!Ewpo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!Ewpo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62adc36e-0ca4-4f04-a661-04f1ae9a1ef0_1338x214.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The adjustment is not uniform. GPTQ uses statistics from calibration data to work out which remaining weights can absorb the error with the least effect on the layer&#8217;s output, which is what separates it from blind rounding.</p><p>This runs fast enough to matter in practice. A 175B model quantizes to 4-bit in around four GPU hours. The known weakness is that fitting the calibration data this closely can tune the model to it, and the AWQ authors showed this hurts accuracy on inputs that look different from the calibration set.</p><p>3) <code>AWQ</code> protects the important weights before rounding instead of repairing damage afterward. It runs calibration samples through the model and watches which weights get multiplied by the largest incoming values, because a rounding error on those weights gets amplified the most in the layer&#8217;s output.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c6nX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c6nX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!c6nX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!c6nX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!c6nX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c6nX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png" width="1338" height="214" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:214,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:63287,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.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_!c6nX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!c6nX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!c6nX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!c6nX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dcb2c2d-36cb-429d-b4ec-dc6d6e35837f_1338x214.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Only around 1% of weight channels turn out to matter this much. Rather than storing them at higher precision, AWQ multiplies them by a scaling factor before rounding, so they spread across more levels of the grid and lose less detail, and the math is rearranged so a matching inverse scale elsewhere keeps the layer&#8217;s output unchanged.</p><p>Every weight still ends up in plain INT4, with no special-case handling at inference time. AWQ also depends far less on which calibration samples were used than GPTQ does, which is a big part of why it became the standard choice in serving engines like vLLM.</p><p>4) <code>LLM.int8()</code> isolates the outliers instead of fighting them. When the model is loaded, it finds the dimensions carrying extreme values and splits every matrix multiplication into two:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tej0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tej0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!tej0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!tej0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!tej0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tej0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png" width="1338" height="214" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:214,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75542,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.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_!tej0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 424w, https://substackcdn.com/image/fetch/$s_!tej0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 848w, https://substackcdn.com/image/fetch/$s_!tej0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 1272w, https://substackcdn.com/image/fetch/$s_!tej0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F741c84cf-d58e-4d07-9700-50467aa67772_1338x214.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p>The outliers run in full FP16</p></li><li><p>The other 99.9% of values run in INT8, and the two results are added back together.</p></li></ul><p>Nothing needs to be computed ahead of time. That is why it is also available as the <code>load_in_8bit</code> flag in <code>bitsandbytes</code>.</p><p>The cost is speed. Splitting and merging every matrix multiplication is slower than running one optimized 4-bit kernel, so this path is common for local development and QLoRA fine-tuning, not for serving traffic at scale.</p><p>5) <code>QAT</code> modifies training rather than the quantization procedure. During a short fine-tuning run, every forward pass rounds the weights to INT4 before using them, so the model experiences the exact damage that quantization will cause, and its predictions are scored under that damage.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mfLX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mfLX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 424w, https://substackcdn.com/image/fetch/$s_!mfLX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 848w, https://substackcdn.com/image/fetch/$s_!mfLX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 1272w, https://substackcdn.com/image/fetch/$s_!mfLX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mfLX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png" width="1338" height="231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:231,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80057,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.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_!mfLX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 424w, https://substackcdn.com/image/fetch/$s_!mfLX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 848w, https://substackcdn.com/image/fetch/$s_!mfLX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 1272w, https://substackcdn.com/image/fetch/$s_!mfLX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22678dba-f5c8-458b-95c1-fb07f317ed48_1338x231.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The weight updates still happen in full precision behind the scenes, since rounding itself cannot be trained through directly. Over the fine-tuning run, the weights drift toward values that keep the loss low even after rounding, so when the real quantization is applied at the end, there is almost nothing left to break.</p><p>Google produced its Gemma 3 QAT checkpoints with roughly 5,000 fine-tuning steps guided by the original model&#8217;s outputs, and the int4 versions hold close to full-precision quality at about 3x lower memory.</p><div><hr></div><p>All five methods described above produce the same artifact, i.e., a model at a fraction of its trained precision.</p><p>They differ in where the outlier problem gets addressed, at rounding time, after rounding, before rounding, at inference, or during training itself.</p><p>To dive deeper, we have already written a full <strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">deep dive on Quantization</a></strong>, specifically, which covers several of these methods with their simplified mathematics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fatV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fatV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 424w, https://substackcdn.com/image/fetch/$s_!fatV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 848w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1272w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fatV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png" width="1004" height="442" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:442,&quot;width&quot;:1004,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35848,&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.dailydoseofds.com/i/207166990?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.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_!fatV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 424w, https://substackcdn.com/image/fetch/$s_!fatV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 848w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1272w, https://substackcdn.com/image/fetch/$s_!fatV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c860c15-3e43-4403-9344-dccf0b0e3988_1004x442.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">Learn how Q<span>uantization optimizes LLMs to run them on tiny hardware here </span>&#8594;</a></strong></p><p><strong>Good day!</strong></p><div><hr></div><h3><strong>P.S. For those wanting to develop &#8220;Industry ML&#8221; expertise:</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cn8y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>At the end of the day, all businesses care about </span><em>impact</em><span>. That&#8217;s it!</span></p><ul><li><p>Can you reduce costs?</p></li><li><p>Drive revenue?</p></li><li><p>Can you scale ML models?</p></li><li><p>Predict trends before they happen?</p></li></ul><p>We have discussed several other topics (with implementations) that align with such topics.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/membership&quot;,&quot;text&quot;:&quot;Develop \&quot;Industry ML\&quot; Skills&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/membership"><span>Develop "Industry ML" Skills</span></a></p><p>Here are some of them:</p><ul><li><p><span>Learn everything about MCPs in this </span><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">crash course with 9 parts &#8594;</a></strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a></p></li><li><p><span>Learn how to build Agentic systems in </span><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-1-with-implementation/">a crash course with 14 parts</a></strong><span>.</span></p></li><li><p><span>Learn how to build real-world RAG apps and evaluate and scale them in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-building-rag-systems-part-1-with-implementations/">this crash course</a></strong><span>.</span></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_!bv9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" width="1456" height="1128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1128,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Learn sophisticated graph architectures and how to train them on graph data.</p></li><li><p><span>So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches </span><strong><a href="https://www.dailydoseofds.com/bi-encoders-and-cross-encoders-for-sentence-pair-similarity-scoring-part-1/">here</a></strong><span>.</span></p></li><li><p><span>Learn how to run large models on small devices using </span><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">Quantization techniques</a></strong><span>.</span></p></li><li><p><span>Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using </span><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">Conformal Predictions</a></strong><span>.</span></p></li><li><p><span>Learn how to identify causal relationships and answer business questions using causal inference in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-causality-part-1/">this crash course</a></strong><span>.</span></p></li><li><p><span>Learn how to scale and implement ML model training in this </span><strong><a href="https://www.dailydoseofds.com/how-to-scale-model-training/">practical guide</a></strong><span>.</span></p></li><li><p><span>Learn techniques to reliably </span><strong><a href="https://www.dailydoseofds.com/5-must-know-ways-to-test-ml-models-in-production-implementation-included/">test new models in production</a></strong><span>.</span></p></li><li><p><span>Learn how to build privacy-first ML systems using </span><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">Federated Learning</a></strong><span>.</span></p></li><li><p><span>Learn 6 techniques with implementation to </span><strong><a href="https://www.dailydoseofds.com/model-compression-a-critical-step-towards-efficient-machine-learning/">compress ML models</a></strong><span>.</span></p></li></ul><p>All these resources will help you cultivate key skills that businesses and companies care about the most.</p>]]></content:encoded></item><item><title><![CDATA[How do AI teams use RL in production?]]></title><description><![CDATA[The full RL nanodegree, covered with implementation.]]></description><link>https://blog.dailydoseofds.com/p/how-do-ai-teams-use-rl-in-production</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/how-do-ai-teams-use-rl-in-production</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Mon, 20 Jul 2026 21:40:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Xq9H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://www.dailydoseofds.com/rl-course-part-12">How do AI teams use RL in production?</a></h3><p>Part 13 of the <strong><a href="https://www.dailydoseofds.com/rl-course-part-13">Reinforcement Learning course</a></strong> is available now.</p><p>Here, we look at what actual AI labs and companies are actually doing with everything we learned across twelve chapters.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xq9H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xq9H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 424w, https://substackcdn.com/image/fetch/$s_!Xq9H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 848w, https://substackcdn.com/image/fetch/$s_!Xq9H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 1272w, https://substackcdn.com/image/fetch/$s_!Xq9H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xq9H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png" width="1456" height="353" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:353,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:191783,&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.dailydoseofds.com/i/207828978?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.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_!Xq9H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 424w, https://substackcdn.com/image/fetch/$s_!Xq9H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 848w, https://substackcdn.com/image/fetch/$s_!Xq9H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 1272w, https://substackcdn.com/image/fetch/$s_!Xq9H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d9689e8-ed6d-4c21-ac96-bf2995959119_3795x920.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-13">Read Part 13 of the RL course here &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/rl-course-part-13&quot;,&quot;text&quot;:&quot;RL Nanodegree Part 13&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.dailydoseofds.com/rl-course-part-13"><span>RL Nanodegree Part 13</span></a></p><p>It covers four case studies, each showing a different role RL plays in the industry:</p><ul><li><p>Cursor&#8217;s real-time RL loop that ships improved checkpoints every five hours</p></li><li><p>How frontier labs turned verifiable rewards into reasoning and agentic capabilities</p></li><li><p>Scale AI&#8217;s enterprise results, where a 4B model beat GPT-5 on domain-specific tasks</p></li><li><p>The emerging market where RL environments are built, priced, and sold as products</p></li></ul><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-13">Read Part 13 of the RL course here &#8594;</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/rl-course-part-13&quot;,&quot;text&quot;:&quot;RL Nanodegree Part 13&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/rl-course-part-13"><span>RL Nanodegree Part 13</span></a></p><div><hr></div><h4>Why care?</h4><p>Across all twelve chapters of this series, we built the full mechanics of RL piece by piece.</p><p>We covered bandits, value functions, Bellman equations, policy gradients, PPO, GRPO, judges, trajectories, and environments.</p><p>One real test of understanding RL is whether you can read a company&#8217;s blog post about their training pipeline and immediately identify the environment, the reward source, the trajectory structure, and the failure modes they are likely facing.</p><p>That is what this chapter exercises.</p><p>We cover stories of very different companies, each using RL in a way that maps directly onto concepts from this series.</p><p>The vocabulary you built is the same vocabulary these teams operate in, like reward hacking, credit assignment, environment design, and the tension between learned and verifiable rewards.</p><p>This is the final chapter, and this is what we have covered in the full course:</p><ul><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-1/">Part 1: Foundations of Reinforcement Learning &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-2/">Part 2: MDPs and Value Functions &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-3/">Part 3: Bellman Equations and Dynamic Programming &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-4/">Part 4: Model-Free Learning &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-5/">Part 5: Function Approximation &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-6/">Part 6: Deep RL and DQN &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-7/">Part 7: Policy Gradients and Actor-Critic &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-8/">Part 8: Proximal Policy Optimization &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-9/">Part 9: RLHF &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-10/">Part 10: Verifiable Rewards and GRPO &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-11">Part 11: Reward signal problem for Agents &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-12">Part 12: Environments, trajectories, and the training Loop &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-13">Part 13: How AI teams use RL in production &#8594;</a></strong></p></li></ul><p>&#128073; Over to you: What topics would you like us to cover in this RL series?</p><div><hr></div><h3><a href="https://github.com/katanemo/plano">LLM Routing vs Mixture of Agents</a></h3><p>When you&#8217;re building a system that needs to handle diverse queries, two architectural patterns are considered.</p><p>One picks the best model for each task, and the other gets multiple models to collaborate on the same task.</p><p>Both involve multiple LLMs, but what they do with those models is completely different.</p><p>The visual below explains how each one 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_!vLV4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vLV4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 424w, https://substackcdn.com/image/fetch/$s_!vLV4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 848w, https://substackcdn.com/image/fetch/$s_!vLV4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!vLV4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vLV4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png" width="1250" height="1250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1250,&quot;width&quot;:1250,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:112620,&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.dailydoseofds.com/i/207828978?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.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_!vLV4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 424w, https://substackcdn.com/image/fetch/$s_!vLV4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 848w, https://substackcdn.com/image/fetch/$s_!vLV4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!vLV4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F236a7f2d-d795-4e5b-a681-d7ad3569c41e_1250x1250.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 LLM routing, an intent classifier reads the prompt, and a cost ranker weighs latency, token price, and capability, so only one model gets the call while everything else stays idle.</p><ul><li><p>The prompt is classified by domain and action.</p></li><li><p>A cost ranker picks the best model given latency and price constraints.</p></li><li><p>One model responds, and the rest never see the query.</p></li></ul><p>In Mixture of Agents, a set of consulting models each analyze the query independently and hands their output to a single aggregator, which uses every perspective to write the final answer and make the tool calls.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZGQF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZGQF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 424w, https://substackcdn.com/image/fetch/$s_!ZGQF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 848w, https://substackcdn.com/image/fetch/$s_!ZGQF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 1272w, https://substackcdn.com/image/fetch/$s_!ZGQF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZGQF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png" width="1456" height="786" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:786,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:261784,&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.dailydoseofds.com/i/207828978?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.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_!ZGQF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 424w, https://substackcdn.com/image/fetch/$s_!ZGQF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 848w, https://substackcdn.com/image/fetch/$s_!ZGQF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 1272w, https://substackcdn.com/image/fetch/$s_!ZGQF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09a0b813-2e75-42e9-8bf0-248af4fafd7b_1456x786.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 consulting models never see each other&#8217;s analysis, only the aggregator does.</p><p>On HermesBench, Nous Research reports a MoA preset scored higher than either model alone by roughly six points and eight to eleven percent, and no individual model in that setup reached the same result on its own.</p><p>LLM routing and MoA are not competing approaches but rather two different tools for two different problems. </p><p>Routing is about picking the right model for the task, while MoA is about combining multiple models to exceed what any one can do alone.</p><p>We wrote a full deep dive on LLM routing with Plano, including a working demo, in a recent article. </p><p>Here&#8217;s the Plano GitHub repo: <strong><a href="https://github.com/katanemo/plano">https://github.com/katanemo/plano</a> </strong>(Don&#8217;t forget to star it &#11088;&#65039;)</p><p><strong><a href="https://www.dailydoseofds.com/p/how-to-reduce-llm-costs-by-50-60-using-model-routing/">And here&#8217;s the article we wrote &#8594;</a></strong></p><div><hr></div><h3><strong>P.S. For those wanting to develop &#8220;Industry ML&#8221; expertise:</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cn8y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!cn8y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 424w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 848w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1272w, https://substackcdn.com/image/fetch/$s_!cn8y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939bede7-b0de-4770-a3e9-34d39488e776_2733x1020.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>At the end of the day, all businesses care about </span><em>impact</em><span>. That&#8217;s it!</span></p><ul><li><p>Can you reduce costs?</p></li><li><p>Drive revenue?</p></li><li><p>Can you scale ML models?</p></li><li><p>Predict trends before they happen?</p></li></ul><p>We have discussed several other topics (with implementations) that align with such topics.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.dailydoseofds.com/membership&quot;,&quot;text&quot;:&quot;Develop \&quot;Industry ML\&quot; Skills&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.dailydoseofds.com/membership"><span>Develop "Industry ML" Skills</span></a></p><p>Here are some of them:</p><ul><li><p><span>Learn everything about MCPs in this </span><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">crash course with 9 parts &#8594;</a></strong><a href="https://www.dailydoseofds.com/model-context-protocol-crash-course-part-1/">&#8203;</a></p></li><li><p><span>Learn how to build Agentic systems in </span><strong><a href="https://www.dailydoseofds.com/ai-agents-crash-course-part-1-with-implementation/">a crash course with 14 parts</a></strong><span>.</span></p></li><li><p><span>Learn how to build real-world RAG apps and evaluate and scale them in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-building-rag-systems-part-1-with-implementations/">this crash course</a></strong><span>.</span></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_!bv9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png" width="1456" height="1128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1128,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bv9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 424w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 848w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1272w, https://substackcdn.com/image/fetch/$s_!bv9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd9f458a-9e46-487b-b611-b512a7dc74d8_1782x1380.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Learn sophisticated graph architectures and how to train them on graph data.</p></li><li><p><span>So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches </span><strong><a href="https://www.dailydoseofds.com/bi-encoders-and-cross-encoders-for-sentence-pair-similarity-scoring-part-1/">here</a></strong><span>.</span></p></li><li><p><span>Learn how to run large models on small devices using </span><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/quantization-optimize-ml-models-to-run-them-on-tiny-hardware/">Quantization techniques</a></strong><span>.</span></p></li><li><p><span>Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using </span><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/conformal-predictions-build-confidence-in-your-ml-models-predictions/">Conformal Predictions</a></strong><span>.</span></p></li><li><p><span>Learn how to identify causal relationships and answer business questions using causal inference in </span><strong><a href="https://www.dailydoseofds.com/a-crash-course-on-causality-part-1/">this crash course</a></strong><span>.</span></p></li><li><p><span>Learn how to scale and implement ML model training in this </span><strong><a href="https://www.dailydoseofds.com/how-to-scale-model-training/">practical guide</a></strong><span>.</span></p></li><li><p><span>Learn techniques to reliably </span><strong><a href="https://www.dailydoseofds.com/5-must-know-ways-to-test-ml-models-in-production-implementation-included/">test new models in production</a></strong><span>.</span></p></li><li><p><span>Learn how to build privacy-first ML systems using </span><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">&#8203;</a><strong><a href="https://www.dailydoseofds.com/federated-learning-a-critical-step-towards-privacy-preserving-machine-learning/">Federated Learning</a></strong><span>.</span></p></li><li><p><span>Learn 6 techniques with implementation to </span><strong><a href="https://www.dailydoseofds.com/model-compression-a-critical-step-towards-efficient-machine-learning/">compress ML models</a></strong><span>.</span></p></li></ul><p>All these resources will help you cultivate key skills that businesses and companies care about the most.</p>]]></content:encoded></item><item><title><![CDATA[[Hands-on] Rebuilding Claude Code's Harness]]></title><description><![CDATA[...step-by-step, from scratch, using open-source stack.]]></description><link>https://blog.dailydoseofds.com/p/hands-on-rebuilding-claude-codes</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/hands-on-rebuilding-claude-codes</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Sun, 19 Jul 2026 18:44:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Sgx8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The agent loop inside Claude Code is nothing special. It sends the model a task, runs whatever tools the model requests, feeds the results back, and repeats until there&#8217;s a final answer.</p><p>Anyone can write that loop in thirty lines. But a bare version of it falls apart on a real codebase, reading the wrong files, losing the goal midway, and filling its context with output it no longer needs, while Claude Code finishes the same task cleanly.</p><p>The easy conclusion is that Anthropic simply has a better model. The actual difference is the harness, the ordinary code wrapped around the model that handles planning, tool execution, memory, and safety, while the model only decides the next step.</p><p>Here&#8217;s what a fully harnessed agent looks like when you draw it out:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Sgx8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Sgx8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png" width="1200" height="1200" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3efbbc7-24b4-4c59-965d-6c3d3fc3c694_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;:177167,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_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_!Sgx8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_1200x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Sgx8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3efbbc7-24b4-4c59-965d-6c3d3fc3c694_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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><strong><span>Memory</span></strong><span> feeds the model its working context plus facts it has learned across sessions.</span></p></li><li><p><strong><span>Skills</span></strong><span> encode how the agent should operate, meaning the procedures, constraints, and heuristics it follows.</span></p></li><li><p><strong><span>Protocols</span></strong><span> connect the agent to users, tools, and other agents.</span></p></li><li><p><strong><span>The harness core</span></strong><span> ties it all together with sub-agent orchestration, a sandbox, an evaluator, an approval loop, observability, and context compression.</span></p></li></ul><p><span>Anthropic describes this split as the brain and the hands. The model is the brain that picks each action, and the harness is the hands that carry it out and keep the run on track.</span></p><p><span>So the gap between your agent and Claude Code isn&#8217;t the model, it&#8217;s the machinery around the model.</span></p><p><span>Claude Code is one of the most capable harnesses in production today, and it&#8217;s built from a surprisingly small set of layers in that illustration. To see how much of that machinery you&#8217;d have to build yourself, I rebuilt it in CrewAI, an open-source framework for orchestrating agents.</span></p><p><span>More of it maps onto built-in features than I expected, and the part that doesn&#8217;t is where the real engineering lives.</span></p><p><span>Let&#8217;s build it layer by layer, starting with the core loop and stacking planning, subagents, sandboxing, and memory on top. At each step, we&#8217;ll mark where the framework ends and where your job begins.</span></p><div><hr></div><h4><strong><span>How Claude Code's harness works</span></strong></h4><p><span>At the center of Claude Code is a plain agent loop. You send it a message, the model decides what to do next, and it either responds directly or requests a tool. If it requests one, the tool runs, the result goes back into the conversation, and the model decides again.</span></p><p><span>This repeats until the model returns a final answer with no further tool calls.</span></p><p><span>Inside that loop, the model reads files, edits code, runs shell commands, and executes tests. These aren&#8217;t separate modes. They&#8217;re just different tool calls inside the same loop.</span></p><p><span>The loop alone isn&#8217;t enough for a reliable coding agent, though. Claude Code adds planning, file tools, subagents, memory, and a permission and sandbox system around it. These layers don&#8217;t replace the loop, they make it safe and reliable enough for real work.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h9iO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h9iO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h9iO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:202041,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.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_!h9iO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!h9iO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd523746-97c0-452b-8231-cbbad3c98d25_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>That&#8217;s the architecture we&#8217;ll rebuild, the core loop first, then each layer on top, mapping every layer to the CrewAI feature that handles it.</span></p><div><hr></div><h4><strong><span>The core agent loop</span></strong></h4><p><span>The loop runs the same sequence until the task is done:</span></p><ol><li><p><span>Ask the model to perform the task.</span></p></li><li><p><span>The model responds directly or requests one or more tools.</span></p></li><li><p><span>If tools are requested, run them and return the results to the model.</span></p></li><li><p><span>Repeat with the updated conversation.</span></p></li><li><p><span>When the model responds without requesting any tools, the task is complete.</span></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_!cyZl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cyZl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!cyZl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!cyZl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!cyZl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cyZl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156922,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.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_!cyZl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!cyZl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!cyZl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!cyZl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff0dac1c-b363-4fdf-8976-fa400359dc95_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">while True:
    reply = model(messages, tools)
    calls = [b for b in reply if b.type == "tool_use"]
    if not calls:            # plain text, no tool call: the job is done
        return reply.text
    messages += [reply, run_all(calls)]</code></pre></div><p><span>Each tool call completes one step, gives the model new information, and feeds into the next decision. A simple question might finish in one iteration, while fixing a complex bug or refactoring a large codebase can take dozens of iterations before the model has enough to produce a final answer.</span></p><p><span>CrewAI provides this execution loop automatically as soon as you create an agent. You don&#8217;t implement the while loop yourself, you define the agent and assign it a task.</span></p><div><hr></div><h4><span>Building the first agent</span></h4><p><span>Let&#8217;s create a simple Bug Fixer agent.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import LLM, Agent, Crew, Task

bug_fixer = Agent(
    role="Bug Fixer",
    goal="Find and describe the fix for the reported bug in the codebase.",
    backstory="You read directories and files to build an accurate picture of the code.",
    llm="claude-sonnet-4-6",
)

task = Task(
    description="Find the fix for {objective}.",
    expected_output="A short description of the fix and which file it belongs in.",
)

result = Crew(agents=[bug_fixer], tasks=[task]).kickoff(
    inputs={"objective": "the overdraft bug in account.py"}
)</code></pre></div><p><span>Three concepts to understand here:</span></p><ul><li><p><span>An </span><strong><span>Agent</span></strong><span> defines who does the work, through its role, goal, LLM, and tools.</span></p></li><li><p><span>A </span><strong><span>Task</span></strong><span> describes the assignment.</span></p></li><li><p><span>A </span><strong><span>Crew</span></strong><span> brings agents and tasks together. Calling kickoff() runs the same execution loop described above, regardless of whether the underlying model is Anthropic, OpenAI, Google, or something else.</span></p></li></ul><div><hr></div><h4><strong><span>Giving the agent tools</span></strong></h4><p><span>Tools are what let a model that only generates text actually work on a codebase. They read files, write them, run shell commands, and call external APIs.</span></p><p><span>CrewAI ships file system tools out of the box:</span></p><ul><li><p><strong><span>FileReadTool</span></strong><span> reads files.</span></p></li><li><p><strong><span>DirectoryReadTool</span></strong><span> lists directories.</span></p></li><li><p><strong><span>FileWriterTool</span></strong><span> writes files.</span></p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai_tools import DirectoryReadTool, FileReadTool, FileWriterTool

read_file = FileReadTool()
write_file = FileWriterTool()
list_dir = DirectoryReadTool()

filesystem_tools = [read_file, write_file, list_dir]</code></pre></div><p><span>These also double as external memory. Instead of holding a large search result in the model&#8217;s context window, the agent can write it to a file, keep only the filename, and read it back when needed.</span></p><p><span>This keeps the context window smaller and the model more focused.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tql6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tql6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Tql6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Tql6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Tql6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tql6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:221937,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.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_!Tql6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Tql6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Tql6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Tql6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae916783-98b0-4ed7-b37c-ef2dcb55f964_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>Built-in tools cover common workflows only. For anything more specific, you expose a Python function as a tool with the </span><code>@tool</code><span> decorator.</span></p><p><span>The docstring acts as the instruction manual, telling the model what the tool does, when to use it, and what it expects as input.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai.tools import tool
import subprocess

@tool("run_tests")
def run_tests(path: str = "tests/") -&gt; str:
    """Run the pytest suite at the given path and return the result."""
    result = subprocess.run(
        ["pytest", path, "-q"], capture_output=True, text=True, timeout=120
    )
    output = result.stdout + result.stderr
    return output[-4000:] if len(output) &gt; 4000 else output</code></pre></div><div><hr></div><h4><strong><span>Adding planning capability</span></strong></h4><p><span>As tasks get more complex, a plain execution loop starts losing track of the original goal. After enough tool calls, file reads, and intermediate results, the context fills up and the objective gets crowded out by everything that came after it.</span></p><p><span>This slow degradation is what people call context rot.</span></p><p><span>Planning addresses it directly. The agent builds a step-by-step plan before doing any work and keeps that plan in context throughout execution.</span></p><p><span>The plan doesn&#8217;t do the work. It&#8217;s a roadmap that keeps the model connected to the original goal, which is the same job Claude Code&#8217;s to-do list does.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EMW5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EMW5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!EMW5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!EMW5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!EMW5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EMW5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:210476,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.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_!EMW5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!EMW5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!EMW5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!EMW5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe86e5e-2eb8-4266-a71f-6d2d71211d86_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>CrewAI adds this at the crew level with </span><code>planning=True</code><span>. It generates a plan before execution and keeps it available as the task progresses.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import Crew, LLM

crew = Crew(
    agents=self.agents,
    tasks=self.tasks,
    planning=True,
    planning_llm=LLM(model="gpt-4o-mini"),
)</code></pre></div><blockquote><p><span>Note: By default, CrewAI uses gpt-4o-mini for planning, and you can swap in any LLM you prefer for that step.</span></p></blockquote><p><span>Individual agents can also reason about their own work with reasoning=True:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import Agent

bug_fixer = Agent(
    role="Bug Fixer",
    goal="Find and describe the fix for the reported bug in the codebase.",
    backstory="You read directories and files to build an accurate picture of the code.",
    tools=[FileReadTool()],
    reasoning=True,
    max_reasoning_attempts=3  # Optional: Set a maximum number of reasoning attempts
)</code></pre></div><p><span>Planning and reasoning solve different problems. Planning builds a high-level roadmap for the overall task, while reasoning gives one agent time to think through its own approach before acting.</span></p><p><span>When reasoning is enabled, the agent:</span></p><ol><li><p><span>Reflects on the task and drafts an execution plan.</span></p></li><li><p><span>Evaluates whether the plan is ready.</span></p></li><li><p><span>Refines the plan if necessary, until it&#8217;s satisfied or hits max_reasoning_attempts.</span></p></li><li><p><span>Injects the finalized reasoning plan into the task before execution.</span></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_!33xn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!33xn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!33xn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!33xn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!33xn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!33xn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:190829,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.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_!33xn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!33xn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!33xn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!33xn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e1d1181-3211-4ded-af9d-422a0a3e6ec1_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>Together, they keep the agent anchored on long-running tasks and reduce drift from the original goal.</span></p><div><hr></div><h4><strong><span>Subagents to maintain main agent&#8217;s context</span></strong></h4><p><span>Planning keeps the agent focused, but it doesn&#8217;t reduce how much information the model has to hold. On a large codebase, even a well-planned task can exceed a single context window.</span></p><p><span>Finding one bug may require reading dozens of files, and the main agent doesn&#8217;t need to keep all of them in memory.</span></p><p><span>Subagents solve this through delegation. The main agent hands a specific task to a helper agent, which works in its own context and returns a short summary. The main agent sees the conclusion, not the intermediate steps.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!czRp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!czRp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!czRp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!czRp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!czRp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!czRp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241855,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.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_!czRp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!czRp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!czRp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!czRp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F943486cf-2ce5-4310-8ee1-ad668fdc0daa_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><span>CrewAI supports this through hierarchical workflows, where a manager agent delegates to specialist agents and combines their results.</span></p><p><span>In our earlier setup, one Bug Fixer agent did all the heavy lifting. Let&#8217;s split the work across a manager and three specialists:</span></p><ul><li><p><strong><span>Codebase Explorer</span></strong><span> explores the code and maps the repository.</span></p></li><li><p><strong><span>Software Engineer</span></strong><span> implements the requested change.</span></p></li><li><p><strong><span>Test Runner</span></strong><span> runs the tests in the sandbox and reports pass or fail.</span></p></li><li><p><strong><span>Engineering Lead</span></strong><span> oversees the three specialists.</span></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_!5mO6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5mO6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!5mO6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!5mO6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!5mO6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5mO6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:217046,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.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_!5mO6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!5mO6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!5mO6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!5mO6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0869b7d2-5633-4efd-9a4c-fb6e10262290_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import Crew, Agent, Task, Process

explorer = Agent(
    role="Codebase Explorer",
    goal="Map the repository and surface the files relevant to the task.",
    backstory="You read directories and files to build a picture of the code.",
    tools=[read_file, list_dir],
    llm=llm,
)  # Same for other two specialist agents

manager = Agent(
    role="Engineering Lead",
    goal="Break the request into steps and delegate each to the right specialist.",
    backstory="You decide who does what, review tests, finish once change is done.",
    llm=llm,
    allow_delegation=True,
)

crew = Crew(
    agents=[explorer, coder, tester],
    tasks=[task],
    manager_agent=manager,
    process=Process.hierarchical,
)</code></pre></div><p><span>One thing to note is that allow_delegation is disabled by default, so it must be explicitly enabled on the manager.</span></p><p><span>Safety comes from a sandbox and approvals, not from prompts</span></p><p><span>An agent with shell access can run a destructive command, and telling the model not to do something isn&#8217;t a safeguard.</span></p><p><span>Real protection comes from two layers:</span></p><ol><li><p><span>A </span><strong><span>permission system</span></strong><span> that requires approval for sensitive actions.</span></p></li><li><p><span>A </span><strong><span>sandbox</span></strong><span> that isolates execution, so even approved commands can&#8217;t touch the host machine.</span></p></li></ol><p><span>Anthropic uses the same approach. Moving code execution into a sandbox cuts down how often a user needs to approve actions while still protecting the host system.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ya-o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ya-o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Ya-o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Ya-o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Ya-o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ya-o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159264,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.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_!Ya-o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Ya-o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Ya-o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Ya-o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F508d6a2b-891c-46b3-a04c-93cf3a2af8ae_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><h4><strong><span>Sandboxing in CrewAI</span></strong></h4><p><span>Executing code inside a sandbox rather than on the host machine applies that second layer. In this setup, code runs inside E2B, which spins up a fresh VM per session and destroys it afterward.</span></p><p><span>Shell commands and Python run entirely inside that isolated environment.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2EAH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2EAH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!2EAH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!2EAH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!2EAH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2EAH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:201492,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.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_!2EAH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!2EAH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!2EAH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!2EAH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1aec8fc-7e5a-48a0-9c48-42a1d42923df_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai_tools import E2BExecTool, E2BPythonTool
sandbox_tools = [E2BExecTool(), E2BPythonTool()]  # run tests / run code</code></pre></div><div><hr></div><h4><strong><span>Human-in-the-loop</span></strong></h4><p><span>Setting </span><strong><span>human_input=True</span></strong><span> on a Task pauses the crew after it generates an answer. You review the output, then approve it or send it back for another iteration.</span></p><p><span>When execution reaches that task, CrewAI waits for your feedback through standard input.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import Task

task = Task(
    description=(
        "In the working directory ./workspace, {objective}. "
        "Explore the code first, make the change, then run the tests and report."
    ),
    expected_output="A summary of the files changed and the final test output.",
    human_input=True,
)</code></pre></div><p><span>If your crew runs behind a web app or chat interface rather than a terminal, CrewAI&#8217;s webhook-based human-in-the-loop system handles the same review step.</span></p><div><hr></div><h4><strong><span>Memory and checkpointing</span></strong></h4><p><span>By default, an agent forgets everything once a run ends. So if you come back tomorrow to fix another bug in the same project, and it starts from zero.</span></p><p><span>Two mechanisms let an agent carry information across runs, and each serves a different purpose:</span></p><ul><li><p><strong><span>Checkpointing</span></strong><span> saves the agent&#8217;s state during a run, so it can resume after an interruption or continue from the same point along a different path.</span></p></li><li><p><strong><span>Persistent memory</span></strong><span> stores facts across separate conversations, including project preferences like &#8220;always format the final code before finishing.&#8221;</span></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_!ikeR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ikeR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ikeR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:219800,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.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_!ikeR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!ikeR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05413595-9081-4608-b60c-74fd3c4f90e0_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><h4><strong><span>Adding memory</span></strong></h4><p><span>CrewAI provides a unified Memory interface rather than separate short-term, long-term, entity, and external memory types. When saving, it uses an LLM to identify important details, organize them, and make them retrievable later.</span></p><p><span>Setting </span><code>memory=True</code><span> on the crew gives it memory across runs. After each task, CrewAI extracts useful facts from the output and stores them, and in future runs, it retrieves relevant memories and adds them to the task prompt.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2b8_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2b8_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!2b8_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!2b8_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!2b8_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2b8_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:197296,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.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_!2b8_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!2b8_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!2b8_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!2b8_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e29ee71-0628-4bae-b50e-6257c604c2c4_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">
from crewai import Crew

crew = Crew(
    agents=[explorer, coder, tester],
    tasks=[task],
    memory=True,
)</code></pre></div><p><span>All agents in a crew share its memory unless an agent is given its own.</span></p><div><hr></div><h4><strong><span>Adding Checkpoints</span></strong></h4><p><span>A checkpoint is a snapshot of an agent&#8217;s progress, including its configuration, task state, memory, intermediate results, inputs, and execution history.</span></p><p><span>By default, CrewAI creates a checkpoint whenever a task finishes, allowing the workflow to resume from that point if it&#8217;s interrupted.</span></p><p><span>Checkpoints can live in one of two built-in stores:</span></p><ul><li><p><strong><span>JsonProvider</span></strong><span> saves each checkpoint as a separate JSON file, which is easy to read and inspect manually.</span></p></li><li><p><strong><span>SqliteProvider</span></strong><span> stores all checkpoints in a single SQLite database, which holds up better under frequent checkpointing and larger workloads.</span></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_!Lzo1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lzo1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:247019,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.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_!Lzo1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!Lzo1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106d2285-d15a-448a-a41a-8af78537eca3_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import Crew

crew = Crew(
    agents=[explorer, coder, tester],
    tasks=[task],
    checkpoint=True,
)</code></pre></div><p><span>Crew, Flow, and Agent all accept a checkpoint argument, and children inherit from their parent unless they set their own value.</span></p><div><hr></div><h4><strong><span>All six layers on one bug-fix task</span></strong></h4><p><span>Here&#8217;s the full harness on one task, with the execution loop, tools, planning, subagents, sandboxing, and memory working together:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from crewai import Agent, Crew, LLM, Process, Task
from crewai.tools import tool
from crewai_tools import (DirectoryReadTool, FileReadTool, FileWriterTool, 
E2BExecTool, E2BPythonTool)

llm = LLM(model="anthropic/claude-sonnet-4.6")

list_dir = DirectoryReadTool(directory="./workspace")
filesystem_tools = [FileReadTool(), FileWriterTool(), list_dir]
sandbox_tools = [exec_tool, E2BPythonTool()]

@tool("run_tests")
def run_tests(path: str = "tests/") -&gt; str:
    """Sync ./workspace into the sandbox, then run pytest there."""
    return E2BExecTool().run(command=sync_and_test_command(path))

explorer = Agent(role="Codebase Explorer", goal="Map repo, surface relevant files.",
    tools=[read_file, list_dir], llm=llm)
coder = Agent(role="Software Engineer", goal="Implement requested change.",
    tools=filesystem_tools, reasoning=True, llm=llm)
tester = Agent(role="Test Runner", goal="Run tests in sandbox, report pass/fail.",
    tools=sandbox_tools + [read_file] + [run_tests], llm=llm)
manager = Agent(role="Engineering Lead", goal="Delegate steps, finish once tests pass.",
    allow_delegation=True, llm=llm)

task = Task(
    description="In ./workspace, {objective}. Explore, edit, test, report.",
    expected_output="Summary of changes and test output.", human_input=True,
)
crew = Crew(
    agents=[explorer, coder, tester], tasks=[task],
    manager_agent=manager, process=Process.hierarchical,
    planning=True, memory=True, checkpoint=True,
)
result = crew.kickoff(inputs={"objective": "fix failing tests in account.py"})
</code></pre></div><p><span>Agent harnesses are easiest to evaluate when success can be checked automatically. A test suite gives the agent a concrete objective, so it can plan, edit, test, and repeat until everything passes.</span></p><p><span>So this was tested against a small codebase, a BankAccount class with two real bugs and five tests, three of which failed. The rule was to fix only the implementation, not the tests.</span></p><p><span>This mirrors how Anthropic evaluates coding agents internally. One published example has Claude rebuilding a clone of the </span><a href="https://claude.ai/"><span>claude.ai</span></a><span> interface against a large suite of failing tests.</span></p><p><span>Here, the harness took the project from 3 failing and 2 passing to all 5 passing, with the implementation-only rule closing off the shortcut of editing or removing the failing tests.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yy1y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yy1y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 424w, https://substackcdn.com/image/fetch/$s_!Yy1y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 848w, https://substackcdn.com/image/fetch/$s_!Yy1y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 1272w, https://substackcdn.com/image/fetch/$s_!Yy1y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yy1y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png" width="1200" height="827" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3196cd6-8648-457e-a600-f732409f941a_1200x827.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:827,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132078,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.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_!Yy1y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 424w, https://substackcdn.com/image/fetch/$s_!Yy1y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 848w, https://substackcdn.com/image/fetch/$s_!Yy1y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 1272w, https://substackcdn.com/image/fetch/$s_!Yy1y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3196cd6-8648-457e-a600-f732409f941a_1200x827.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><h4><strong><span>Beyond prompts, environment, and tool choice</span></strong></h4><p><span>Some parts of the system aren&#8217;t things the framework builds for you:</span></p><ul><li><p><strong><span>The prompts.</span></strong><span> Each agent&#8217;s behavior comes from its role, goal, and backstory. Getting those right takes testing and iteration, and no configuration flag substitutes for it.</span></p></li><li><p><strong><span>The execution environment.</span></strong><span> The sandbox, whether E2B or a self-managed VM, has to be set up and wired in.</span></p></li><li><p><strong><span>Tool selection.</span></strong><span> Which tools each agent gets, and which agent should have access to what, is a design decision the framework doesn&#8217;t make.</span></p></li></ul><p><span>There&#8217;s also a cost to the harness itself. Planning, subagents, and looping all add API calls, so a complex agent setup can end up more expensive than a task a single model call would have solved directly.</span></p><p><span>And there&#8217;s a longer-term limitation worth keeping in mind. As models improve, some of the scaffolding stops being necessary, because some of what gets built into a harness today is a workaround for today&#8217;s model limits rather than a permanent requirement.</span></p><p><span>Anthropic originally used context resets to keep Claude Sonnet 4.5 from ending tasks too early, and they weren&#8217;t needed anymore with the more capable Claude Opus 4.5.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aqM3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aqM3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!aqM3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!aqM3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!aqM3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aqM3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png" width="1199" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1199,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:240378,&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.dailydoseofds.com/i/207049724?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.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_!aqM3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 424w, https://substackcdn.com/image/fetch/$s_!aqM3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 848w, https://substackcdn.com/image/fetch/$s_!aqM3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 1272w, https://substackcdn.com/image/fetch/$s_!aqM3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942073ab-d4f6-4177-9a5d-9440d3ad6c4e_1199x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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><div><hr></div><p><span>That&#8217;s the whole finding. A coding agent&#8217;s capability lives mostly in the harness, and an orchestration framework hands you more of that harness than you&#8217;d guess.</span></p><p><span>The loop, planning, delegation, sandboxing, and memory all arrive as configuration, while the prompts, the execution environment, and the tool choices remain yours.</span></p><p><span>If you want to run this against your own codebase, the CrewAI docs cover every feature used here, and the framework is fully open source.</span></p><p><strong><a href="https://docs.crewai.com/"><span>Check out CrewAI Docs &#8594;</span></a></strong></p><p><strong><a href="https://github.com/crewAIInc/crewAI"><span>Check out CrewAI GitHub (100% Open Source) &#8594;</span></a></strong></p><p><strong><a href="https://github.com/patchy631/ai-engineering-hub/tree/main/build-code-harness"><span>Find the code for this project in this repo </span>&#8594;</a></strong></p><p><span>Good day!</span></p>]]></content:encoded></item><item><title><![CDATA[RLHF vs. DPO vs. GRPO in RL]]></title><description><![CDATA[...explained visually.]]></description><link>https://blog.dailydoseofds.com/p/rlhf-vs-dpo-vs-grpo-in-rl</link><guid isPermaLink="false">https://blog.dailydoseofds.com/p/rlhf-vs-dpo-vs-grpo-in-rl</guid><dc:creator><![CDATA[Avi Chawla]]></dc:creator><pubDate>Fri, 17 Jul 2026 22:03:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pYUb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><a href="https://www.kimi.com/blog/kimi-k3">Kimi K3 vs Opus 4.8 vs Fable 5 vs GPT-5.6 Sol</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.kimi.com/blog/kimi-k3" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2gc4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 424w, https://substackcdn.com/image/fetch/$s_!2gc4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 848w, https://substackcdn.com/image/fetch/$s_!2gc4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!2gc4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2gc4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png" width="1456" height="1033" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1033,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56643,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.kimi.com/blog/kimi-k3&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207479852?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.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_!2gc4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 424w, https://substackcdn.com/image/fetch/$s_!2gc4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 848w, https://substackcdn.com/image/fetch/$s_!2gc4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!2gc4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dc14b71-79e8-42e8-bb3e-5144f986c30b_1550x1100.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>When Claude Opus 4.8 shipped on May 28, it was the most capable model available to the public.</p><p>Yesterday, Moonshot AI released <strong><a href="https://www.kimi.com/blog/kimi-k3">Kimi K3</a></strong>, and it beats Opus 4.8 at max effort on four of five major benchmarks: BrowseComp, DeepSWE, GPQA Diamond, FrontierSWE, and HLE with tools.</p><p>And this is not just an Opus story. K3 matches Claude Fable 5 and GPT-5.6 Sol on several benchmarks and beats them on some, while its API is priced at roughly a third of Fable 5&#8217;s.</p><p>K3 is open weights. Moonshot says it will ship all 2.8 trillion parameters on July 27, which would make it the largest open model released so far.</p><p>Every closed frontier model is rented intelligence, accessed through an API the provider can reprice, deprecate, or shut off.</p><p>Last month proved why rented intelligence comes with risks. A US export directive forced Anthropic to take Fable 5 offline globally for 18 days.</p><p>Weights on a disk don&#8217;t have that failure mode since they run on private infrastructure, fine-tune on private data, and cannot be switched off by anyone.</p><p>Do note that the weights aren&#8217;t public yet, so until July 27, this is an API model like any other.</p><p><strong><a href="https://www.kimi.com/blog/kimi-k3">Here&#8217;s the official release &#8594;</a></strong></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/rl-course-part-1/">RLHF vs. DPO vs. GRPO in RL</a></h3><p>RLHF, DPO and GRPO are often grouped together as variations of the same algorithm.</p><p>But they take completely different approaches to teaching a model to behave the way you want, and those differences show up in the training setup, the data you need, and what it costs you at scale.</p><p>The visual below summarizes how they 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_!pYUb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pYUb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 424w, https://substackcdn.com/image/fetch/$s_!pYUb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 848w, https://substackcdn.com/image/fetch/$s_!pYUb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 1272w, https://substackcdn.com/image/fetch/$s_!pYUb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pYUb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif" width="960" height="545" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:545,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:573336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207479852?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pYUb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 424w, https://substackcdn.com/image/fetch/$s_!pYUb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 848w, https://substackcdn.com/image/fetch/$s_!pYUb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 1272w, https://substackcdn.com/image/fetch/$s_!pYUb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1a1b1a-7787-44c5-b444-d7dd43d52ee9_960x545.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 understand this in detail today!</p><blockquote><p>To dive deeper into these topics (with hands-on implementation and understand actual production tradeoffs), we have already covered every bit of it in the Reinforcement Learning Nanodegree:</p><ul><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-1/">Part 1: Foundations of Reinforcement Learning &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-2/">Part 2: MDPs and Value Functions &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-3/">Part 3: Bellman Equations and Dynamic Programming &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-4/">Part 4: Model-Free Learning &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-5/">Part 5: Function Approximation &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-6/">Part 6: Deep RL and DQN &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-7/">Part 7: Policy Gradients and Actor-Critic &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-8/">Part 8: Proximal Policy Optimization &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-9/">Part 9: RLHF &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-10/">Part 10: Verifiable Rewards and GRPO &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-11">Part 11: Reward signal problem for Agents &#8594;</a></strong></p></li><li><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-12">Part 12: Environments, trajectories, and the training Loop &#8594;</a></strong></p></li></ul></blockquote><div><hr></div><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-9/">RLHF (Reinforcement Learning from Human Feedback)</a></strong> is the simplest formulation, which also went into building ChatGPT.</p><p>You sample prompts, run them through the policy, and score the outputs with a reward model. Then you compute advantages, apply a KL penalty to keep the policy close to the reference, and update via PPO.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DpLW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DpLW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DpLW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DpLW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DpLW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DpLW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg" width="2528" height="1271" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1271,&quot;width&quot;:2528,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:280307,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207479852?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4a4e67e-3646-498b-82f3-0c9ab193a463_2528x1696.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_!DpLW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DpLW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DpLW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DpLW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36114836-0453-49e4-b245-14e80c68b172_2528x1271.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 requires four live models running simultaneously:</p><ul><li><p>The policy you&#8217;re training</p></li><li><p>A frozen reference copy</p></li><li><p>A reward model</p></li><li><p>And a critic.</p></li></ul><p>This means running four sets of forward passes per training step.</p><p>At production scale, this is expensive to run and hard to stabilize. And the reward model needs its own human-preference training before any of this can even begin.</p><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-10/">DPO (Direct Preference Optimization)</a></strong> provides a better solution.</p><p>Instead of training a separate reward model, DPO derives the reward signal implicitly from the policy itself.</p><p>It works from preference pairs, a winner and a loser response to the same prompt. It computes log-probability ratios between the current policy and a frozen reference, and uses that ratio as the implicit reward.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tiK1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tiK1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tiK1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tiK1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tiK1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tiK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg" width="2528" height="1003" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1003,&quot;width&quot;:2528,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:288961,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207479852?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F554fcfbf-32ff-4347-8481-153b67eb9516_2528x1696.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_!tiK1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tiK1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tiK1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tiK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b01a508-1e60-41f6-b5eb-b7509fe82085_2528x1003.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 removes the explicit reward model and the critic entirely, bringing the pipeline down to just policy and frozen reference.</p><p>The tradeoff is that you need labeled preference pairs upfront. And since there&#8217;s no online exploration, DPO can be brittle if the preference data doesn&#8217;t cover the failure modes you care about.</p><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-10/">GRPO (Group Relative Policy Optimization)</a></strong>, introduced by DeepSeek in 2024, takes a different path.</p><p>It keeps the RL framing but eliminates the critic by replacing the value baseline with group statistics.</p><p>For each prompt, the model generates a group of outputs, and a verifier scores each one. Advantages are then computed from the mean and standard deviation of those scores within the group.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X2-w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X2-w!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 424w, https://substackcdn.com/image/fetch/$s_!X2-w!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 848w, https://substackcdn.com/image/fetch/$s_!X2-w!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!X2-w!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X2-w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg" width="2528" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:2528,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:237690,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.dailydoseofds.com/i/207479852?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe262fc85-723f-4ae5-b2d7-58d1be6a55b8_2528x1696.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_!X2-w!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 424w, https://substackcdn.com/image/fetch/$s_!X2-w!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 848w, https://substackcdn.com/image/fetch/$s_!X2-w!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!X2-w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb75ab477-499a-4190-9d30-5b1dfe9e8601_2528x971.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 critic is a key bottleneck in RLHF since it&#8217;s slow to converge, adds instability, and requires a regression head on top of the policy.</p><p>GRPO removes all of that by using the group itself as the baseline, keeping the RL loop intact but at lower overhead than PPO.</p><p>Here&#8217;s a useful way to understand all three at once.</p><ul><li><p>RLHF uses external scores and an internal critic to measure advantage.</p></li><li><p>DPO encodes preference implicitly and skips both.</p></li><li><p>GRPO generates its own baseline from a group and keeps the RL loop without the critic.</p></li></ul><p>All three produce aligned models, but they differ on how much machinery the alignment requires.</p><p><strong><a href="https://www.dailydoseofds.com/rl-course-part-1/">To dive deeper into these topics (with hands-on implementation and understanding actual production tradeoffs), we have already covered every bit of it in the Reinforcement Learning Nanodegree. Start here &#8594;</a></strong></p><div><hr></div><h3><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">Paged Attention in LLMs</a></strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/"><span>&#8203;</span></a></h3><p>When you&#8217;re serving LLMs at scale, memory becomes your bottleneck before compute does.</p><p>The problem isn&#8217;t a lack of GPU memory; it&#8217;s how inefficiently we use it.</p><p>Let&#8217;s understand why this happens and how Paged Attention solves it elegantly!</p><h4><strong>KV Cache</strong></h4><p>During LLM inference, the model stores the key and value vectors of all previously generated tokens in memory. This is the KV cache (<a href="https://www.dailydoseofds.com/p/kv-caching-in-llms-explained-visually/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/p/kv-caching-in-llms-explained-visually/">we covered KV caching in detail here</a></strong><a href="https://www.dailydoseofds.com/p/kv-caching-in-llms-explained-visually/"><span>&#8203;</span></a>).</p><p>Simply put, instead of recomputing attention over all previous tokens every time a new token is generated, the model just looks up the cached values and computes attention with them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vehr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vehr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 424w, https://substackcdn.com/image/fetch/$s_!vehr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 848w, https://substackcdn.com/image/fetch/$s_!vehr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 1272w, https://substackcdn.com/image/fetch/$s_!vehr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vehr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png" width="996" height="1016" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1016,&quot;width&quot;:996,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vehr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 424w, https://substackcdn.com/image/fetch/$s_!vehr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 848w, https://substackcdn.com/image/fetch/$s_!vehr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 1272w, https://substackcdn.com/image/fetch/$s_!vehr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9acc9f12-a5d7-40fb-986b-deb97f086dca_996x1016.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 is crucial for efficiency. Without it, generating a 1000-token response would require recomputing attention for all previous tokens at each step. That&#8217;s <code>O(n&#178;)</code> operations instead of <code>O(n)</code> and the speed difference is evident below:</p><p>But there&#8217;s a problem.</p><h4><strong>The memory inefficiency problem</strong></h4><p>Traditional KV cache implementations pre-allocate large, contiguous memory blocks for each request.</p><p>Here&#8217;s why this is wasteful:</p><p>Imagine serving 100 concurrent users. You don&#8217;t know how long each response will be, so you pre-allocate space for the maximum possible length, say, 2048 tokens per request. But the average response turns out to be only 200 tokens.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vLe7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vLe7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 424w, https://substackcdn.com/image/fetch/$s_!vLe7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 848w, https://substackcdn.com/image/fetch/$s_!vLe7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 1272w, https://substackcdn.com/image/fetch/$s_!vLe7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vLe7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png" width="1456" height="794" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vLe7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 424w, https://substackcdn.com/image/fetch/$s_!vLe7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 848w, https://substackcdn.com/image/fetch/$s_!vLe7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 1272w, https://substackcdn.com/image/fetch/$s_!vLe7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594d51b3-7540-47bc-a4be-72d174a1f6df_1456x794.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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&#8217;ve just reserved 10x the memory you actually need.</p><p>And it gets worse. Each request gets its own isolated block. So even if 80 of those 100 users share the same system prompt, you&#8217;re storing 80 duplicate copies of the same KV cache entries. None of that memory can be shared or reclaimed.</p><p>As a result, you&#8217;re often using only 20-30% of your allocated GPU memory effectively. The rest is reserved but unused, and because it&#8217;s scattered across fragmented contiguous blocks, you can&#8217;t even fit new requests into the gaps.</p><p>This is the core inefficiency that kills throughput.</p><h4><strong>Paged Attention</strong></h4><p>Paged Attention solves this by borrowing the concept of virtual paging memory from operating systems.</p><p>If you&#8217;ve studied OS fundamentals, you know that programs don&#8217;t get one big contiguous chunk of RAM. Instead, the OS breaks memory into small, fixed-size pages, scatters them anywhere in physical memory, and uses a page table to map each program&#8217;s virtual addresses to physical locations.</p><p>Paged Attention does the same thing for the KV cache. Here&#8217;s how:</p><p>Block-level allocation: Instead of reserving one large contiguous block per request, the KV cache is divided into small, fixed-size blocks (typically 16 tokens each). These blocks can live anywhere in GPU memory and don&#8217;t necessarily need to be next to each other.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yaCk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yaCk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 424w, https://substackcdn.com/image/fetch/$s_!yaCk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 848w, https://substackcdn.com/image/fetch/$s_!yaCk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 1272w, https://substackcdn.com/image/fetch/$s_!yaCk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yaCk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png" width="1024" height="559" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:559,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!yaCk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 424w, https://substackcdn.com/image/fetch/$s_!yaCk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 848w, https://substackcdn.com/image/fetch/$s_!yaCk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 1272w, https://substackcdn.com/image/fetch/$s_!yaCk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e8eca84-b9a0-48a6-8969-1fbc3891d1d9_1024x559.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Block table (page table): Each request maintains a block table which is a simple mapping from logical block index to physical block location in GPU memory. When the model needs the KV cache for token 33, it looks up which physical block holds it, fetches it, and computes attention. The LLM doesn&#8217;t care where the block is physically sitting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Dbuj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Dbuj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 424w, https://substackcdn.com/image/fetch/$s_!Dbuj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 848w, https://substackcdn.com/image/fetch/$s_!Dbuj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 1272w, https://substackcdn.com/image/fetch/$s_!Dbuj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Dbuj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png" width="1456" height="794" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Dbuj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 424w, https://substackcdn.com/image/fetch/$s_!Dbuj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 848w, https://substackcdn.com/image/fetch/$s_!Dbuj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 1272w, https://substackcdn.com/image/fetch/$s_!Dbuj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e888bac-7520-48e1-ad98-b461238d41cd_1456x794.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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>Shared prefixes: Here&#8217;s where it gets really clever. Multiple requests that share the same system prompt don&#8217;t need separate copies of the KV cache for that shared prefix. Their block tables simply point to the same physical blocks. Only when their responses diverge do new blocks get allocated for each request individually.</p><p>In a production setting, where every request typically shares a system prompt, the memory savings via shared prefix become massive.</p><h4><strong>Impact</strong></h4><p>In the original Paged Attention paper, the authors measured that existing systems only utilized 20-38% of the allocated KV cache memory effectively. The rest was wasted due to fragmentation and over-reservation.</p><p>Paged Attention can achieve:</p><ul><li><p>2-4x higher throughput compared to state-of-the-art systems at the same level of latency</p></li><li><p>Near-zero memory waste, as it only allocates memory for what&#8217;s actually used</p></li></ul><p>Better batching leads to more concurrent requests on the same GPU hardware</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!akIS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!akIS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 424w, https://substackcdn.com/image/fetch/$s_!akIS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 848w, https://substackcdn.com/image/fetch/$s_!akIS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 1272w, https://substackcdn.com/image/fetch/$s_!akIS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!akIS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png" width="1024" height="360" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:360,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!akIS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 424w, https://substackcdn.com/image/fetch/$s_!akIS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 848w, https://substackcdn.com/image/fetch/$s_!akIS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 1272w, https://substackcdn.com/image/fetch/$s_!akIS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8461e1-34ad-451b-b669-3798985ce115_1024x360.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><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"><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 is why vLLM, which implements Paged Attention as its core algorithm, has become the go-to inference engine for production deployments. Other frameworks like TensorRT-LLM and SGLang have also adopted similar paging mechanisms for faster inference.</p><p>This optimization becomes even more crucial when running inference servers at scale, especially with variable request patterns, shared prompts, and cost-per-request constraints.</p><p>&#128073; Over to you: What other OS concepts do you think could be applied to optimize LLM inference?</p><p><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/"><span>&#8203;</span></a><strong><a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/">To dive deeper into how LLM systems are deployed, start with the practical and hands-on LLMOps course here &#8594;</a></strong></p><p>Good day!<a href="https://www.dailydoseofds.com/llmops-crash-course-part-1/"><span>&#8203;</span></a></p>]]></content:encoded></item></channel></rss>