<?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[The AiEdge Newsletter]]></title><description><![CDATA[A newsletter for continuous learning about Machine Learning applications, Machine Learning System Design, MLOps, the latest techniques and news. 
Subscribe and receive a free Machine Learning book PDF!]]></description><link>https://newsletter.theaiedge.io</link><image><url>https://substackcdn.com/image/fetch/$s_!kRD-!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e9c582-b22b-45c5-a64e-a9105824fb01_1067x1067.png</url><title>The AiEdge Newsletter</title><link>https://newsletter.theaiedge.io</link></image><generator>Substack</generator><lastBuildDate>Fri, 06 Nov 2026 23:48:02 GMT</lastBuildDate><atom:link href="https://newsletter.theaiedge.io/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[AiEdge]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[damienb@theaiedge.io]]></webMaster><itunes:owner><itunes:email><![CDATA[damienb@theaiedge.io]]></itunes:email><itunes:name><![CDATA[Damien Benveniste]]></itunes:name></itunes:owner><itunes:author><![CDATA[Damien Benveniste]]></itunes:author><googleplay:owner><![CDATA[damienb@theaiedge.io]]></googleplay:owner><googleplay:email><![CDATA[damienb@theaiedge.io]]></googleplay:email><googleplay:author><![CDATA[Damien Benveniste]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How LLM Distillation Trains Smaller Models]]></title><description><![CDATA[From teacher-written answers to probability targets and feedback on the student&#8217;s own output.]]></description><link>https://newsletter.theaiedge.io/p/how-llm-distillation-trains-smaller-models</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-llm-distillation-trains-smaller-models</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 06 Nov 2026 16:02:12 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/cd02b71f-6d9c-4f6e-9e78-426c40931151_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>LLM distillation trains one language model using the behavior of another.</strong> The teacher supplies answers or probabilities for possible next tokens. Training compares those targets with the student's predictions and changes the student's weights. When training ends, the student can generate answers on its own.</p><p>Ahead of AI's recent <a href="https://magazine.sebastianraschka.com/p/building-reasoning-models">reasoning-model course</a> teaches distillation as a route to smaller reasoning models, making the transfer of useful behavior into a cheaper model a concrete training choice.</p><p>How does that transfer happen? Through three decisions: <strong>what the teacher supplies, where the student practices, and which differences the training loss penalizes.</strong> Those decisions determine what the student has an opportunity to learn. They do not guarantee that it acquires everything the teacher can do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gYka!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gYka!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!gYka!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gYka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1368211,&quot;alt&quot;:&quot;Teacher targets change student weights during training; deployment uses the trained student alone.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Teacher targets change student weights during training; deployment uses the trained student alone." title="Teacher targets change student weights during training; deployment uses the trained student alone." srcset="https://substackcdn.com/image/fetch/$s_!gYka!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!gYka!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!gYka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F055aede3-c4c7-4f91-8739-9d76a6575e1c_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Distillation moves the teacher&#8217;s influence into the student&#8217;s learned parameters.</figcaption></figure></div><p>A useful distinction comes before any equations. Distillation changes a model during training. It does not normally keep a larger model beside it to check every answer during deployment. In speculative decoding, a small model proposes tokens and a larger model verifies them. After distillation, the smaller model's own predictions determine its output. Removing the teacher from that loop creates the potential saving, and also makes the student's independent quality the relevant test.</p><p>Nor does distillation automatically make a model smaller. We choose a student architecture, usually start from an already pretrained checkpoint, and train it to reproduce selected behavior. A smaller student might learn a specialized task well while losing some of the teacher's breadth. Distillation can also use a student of the same size; here we will focus on transferring behavior into a smaller model.</p><p>We will follow the training signal from recorded answers to probability targets, then change who produces the prefixes used for training. That will let us explain why a teacher can provide useful feedback on student mistakes without becoming a correctness oracle.</p><p><strong>Contents</strong></p><ul><li><p>What moves from teacher to student</p></li><li><p>Learn from a teacher's answers</p></li><li><p>Learn from a teacher's probabilities</p></li><li><p>Train where the student actually goes</p></li><li><p>Choose what the student should match</p></li><li><p>Check what transferred</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-llm-distillation-trains-smaller-models">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Quantization Compresses LLMs]]></title><description><![CDATA[Follow GPTQ, AWQ, and SmoothQuant through weight compensation, channel scaling, and low-precision execution.]]></description><link>https://newsletter.theaiedge.io/p/how-quantization-compresses-llms</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-quantization-compresses-llms</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 02 Nov 2026 16:01:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/515aaea2-266e-4d9c-b7db-54210d84f3d0_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>LLM quantization represents a model&#8217;s numbers with fewer bits.</strong> Post-training quantization does this after the model has learned its weights. It maps those weights, and sometimes the changing numerical inputs called activations, onto a smaller set of representable values. The model still computes new answers, but its calculations now use approximations.</p><p>Serving engines such as <a href="https://docs.vllm.ai/en/latest/features/quantization/">vLLM</a> support several quantization methods with different hardware requirements, making a smaller checkpoint a choice about execution as well as storage.</p><p>How can we remove precision without removing the computation that makes the model useful?</p><p>The central idea is to preserve what the numbers <strong>do together</strong>. A weight contributes to an output by multiplying an activation. A small weight error can matter greatly when its input is large. Errors in different weights can also reinforce or cancel one another.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IKoH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IKoH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 424w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 848w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1272w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IKoH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png" width="1944" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1156623,&quot;alt&quot;:&quot;The same weight error contributes 0.04 when multiplied by input 1 and 0.8 when multiplied by input 20.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same weight error contributes 0.04 when multiplied by input 1 and 0.8 when multiplied by input 20." title="The same weight error contributes 0.04 when multiplied by input 1 and 0.8 when multiplied by input 20." srcset="https://substackcdn.com/image/fetch/$s_!IKoH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 424w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 848w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1272w, https://substackcdn.com/image/fetch/$s_!IKoH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76e12d05-e0bf-4a71-a6e7-6837aa78a510_1944x809.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A coefficient&#8217;s error reaches the output through the activation it multiplies.</figcaption></figure></div><p>We will follow three members of the post-training quantization family, organized by where they absorb that error:</p><ul><li><p><strong>GPTQ</strong> rounds a weight, then adjusts weights that have not yet been rounded to compensate for its effect.</p></li><li><p><strong>AWQ</strong>, activation-aware weight quantization, rescales input channels so consequential weights get a more useful rounding grid.</p></li><li><p><strong>SmoothQuant</strong> redistributes large activation values into the weights, making it easier to quantize both operands of a matrix multiplication.</p></li></ul><p>These choices are related, but they are not three interchangeable file formats. GPTQ and AWQ are commonly used for weight-only compression. SmoothQuant addresses the additional difficulty of quantizing activations, and its transformation can be followed by GPTQ.</p><p>Here is the first useful distinction: <strong>the largest weight is not automatically the most important weight to preserve.</strong> Its effect depends on the input it multiplies and the other contributions to the output. That is why a conversion method may run calibration text through a trained model before deciding how to round its weights. It needs examples of the computation it is trying to preserve.</p><p><strong>Table of contents</strong></p><ul><li><p>What rounding changes</p></li><li><p>GPTQ compensates across weights</p></li><li><p>AWQ changes the effective grid</p></li><li><p>SmoothQuant balances two operands</p></li><li><p>From compressed weights to execution</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-quantization-compresses-llms">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How CUDA Graphs Speed Up LLM Inference]]></title><description><![CDATA[Replay GPU operations with fresh tokens, growing caches, and changing batches.]]></description><link>https://newsletter.theaiedge.io/p/how-cuda-graphs-speed-up-llm-inference</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-cuda-graphs-speed-up-llm-inference</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 30 Oct 2026 15:01:29 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/dd83d786-690b-411f-bb0c-77f0ff41eb33_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>CUDA Graphs can speed up repeated GPU work by preparing its execution plan once and replaying it with new data.</strong> They are a feature of NVIDIA&#8217;s CUDA platform. In LLM inference, that work can be the sequence of operations used to generate the next token. Replay launches those operations again; it does not return an earlier answer or avoid computing the new token.</p><p>Serving engines such as <a href="https://docs.vllm.ai/en/latest/design/cuda_graphs/">vLLM</a> expose full and piecewise graph modes, making replay coverage a practical choice about latency and GPU memory.</p><p>How can a reusable plan handle an LLM whose tokens, context lengths, and active requests keep changing?</p><p>The useful distinction is between <strong>the description of the work</strong> and <strong>the data that work reads</strong>. A captured operation can keep the same input address while the values stored at that address change. The GPU then follows the prepared dependencies and computes a fresh result.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PodH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PodH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 424w, https://substackcdn.com/image/fetch/$s_!PodH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 848w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1272w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PodH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png" width="2172" height="724" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:724,&quot;width&quot;:2172,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1303831,&quot;alt&quot;:&quot;Two replays of the same doubling operation read different input values and compute different outputs.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two replays of the same doubling operation read different input values and compute different outputs." title="Two replays of the same doubling operation read different input values and compute different outputs." srcset="https://substackcdn.com/image/fetch/$s_!PodH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 424w, https://substackcdn.com/image/fetch/$s_!PodH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 848w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1272w, https://substackcdn.com/image/fetch/$s_!PodH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1672d516-423a-4fc8-b62c-7770f5a2fe32_2172x724.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Replay reuses the operation description. It still computes from the values present when it runs.</figcaption></figure></div><p>A fixed execution plan does not require a fixed answer. An operation that doubles the numbers in an input buffer produces a different output after those numbers change, even though the operation and its input address are unchanged. Replacing the buffer itself is a different matter: the prepared operation may still point to the original storage.</p><p>LLM serving builds on that distinction. New tokens, positions, and cache locations can become updated data inside persistent buffers. Changes to the amount or arrangement of work may instead require another prepared graph, a smaller captured region, or ordinary execution.</p><p>We will follow that boundary from GPU launches to growing token histories, then examine when the cost of keeping several graph variants ready outweighs the launch savings.</p><p><strong>Table of contents</strong></p><ul><li><p>Where a decoding step spends time</p></li><li><p>Capture a plan, replay fresh work</p></li><li><p>Keep addresses stable while values change</p></li><li><p>Fit changing LLM state into a replay</p></li><li><p>Choose the right graph for the batch</p></li><li><p>Decide whether replay pays</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-cuda-graphs-speed-up-llm-inference">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How LLM Rerankers Order Retrieved Passages]]></title><description><![CDATA[Follow pointwise scores, pairwise preferences, and listwise windows from model judgment to useful context.]]></description><link>https://newsletter.theaiedge.io/p/how-llm-rerankers-order-retrieved-passages</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-llm-rerankers-order-retrieved-passages</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 26 Oct 2026 15:02:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/6379da09-c9af-433f-9edb-1a165dbfac69_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A reranker takes a question and a shortlist of retrieved passages, reads them again, and changes their order before a large language model (LLM) receives its context. The first search finds candidates across a large collection. Reranking spends more computation deciding which of those candidates deserve the limited space in the answering model's prompt.</p><p>Cohere's release of <a href="https://cohere.com/blog/rerank-5">Rerank 5</a> for retrieval-based answers and agents makes this a concrete application choice: a pipeline can spend additional computation deciding which evidence reaches the answering model.</p><p>How does that extra computation produce a better order? The main distinction is <strong>what the model judges together</strong>:</p><ul><li><p><strong>Pointwise:</strong> read the question with one passage, produce a score, then sort the scores.</p></li><li><p><strong>Pairwise:</strong> read the question with two passages, choose the better one, then assemble those preferences into an order.</p></li><li><p><strong>Listwise:</strong> read the question with a group of passages and return their order, sometimes one overlapping group at a time.</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_!RtGM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RtGM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RtGM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1404632,&quot;alt&quot;:&quot;Three rows show independent scores followed by sorting, two-passage preferences followed by aggregation, and a group judgment returning an order.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Three rows show independent scores followed by sorting, two-passage preferences followed by aggregation, and a group judgment returning an order." title="Three rows show independent scores followed by sorting, two-passage preferences followed by aggregation, and a group judgment returning an order." srcset="https://substackcdn.com/image/fetch/$s_!RtGM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!RtGM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58855a7e-3a3e-44b6-872c-69e173f27704_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The unit of judgment determines what the application must do with the model output.</figcaption></figure></div><p>These methods buy different kinds of judgment. Independent scores can be computed in parallel. Comparisons let the model weigh competing evidence directly, but the application must decide how to reconcile those judgments. A listwise answer orders several candidates at once, at the cost of a longer input and a more demanding output.</p><p>The names describe the ranking procedure. The underlying model architecture and training objective are separate choices. We will separate those dimensions, follow the numbers and comparisons into an actual ordering, and see where the methods can work together.</p><p><strong>Contents</strong></p><ul><li><p>What a reranker changes</p></li><li><p>Pointwise: score each passage</p></li><li><p>Pairwise: compare two passages</p></li><li><p>Listwise: order a group</p></li><li><p>Choose the work your query needs</p></li></ul><p>There is one useful boundary to establish immediately. A reranker cannot promote a passage that never entered its shortlist. If the answer is present but buried, reordering may help. If the necessary evidence is absent, the pipeline needs another search or a different way to retrieve it. This distinction tells you where to investigate a bad answer before choosing a more expensive ranking model.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-llm-rerankers-order-retrieved-passages">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Looped Transformers Reuse Their Weights]]></title><description><![CDATA[Follow changing attention states, shared gradients, and the real cost of extra passes.]]></description><link>https://newsletter.theaiedge.io/p/how-looped-transformers-reuse-their-weights</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-looped-transformers-reuse-their-weights</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 23 Oct 2026 15:02:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ed5784d8-4c46-4733-b5f2-0287a96a14f6_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A <strong>looped Transformer</strong> reuses a group of neural-network layers several times before predicting the next token. Each pass receives the hidden representations produced by the previous pass. Those representations are the model's working state: numerical vectors that change as it processes the input. The learned weights stay fixed during inference.</p><p>Open-weight models such as <a href="https://huggingface.co/tomg-group-umd/huginn-0125">Huginn</a> expose the number of recurrent passes as an inference setting, making model size and computation per token separate design choices.</p><p>How can applying the same weights again produce useful new work?</p><p>The answer is in what gets passed around the loop. Restart a deterministic computation from the same state and it returns the same result. Feed its result into the next pass and the computation can advance. A query can change after retrieving a fact, an intermediate result can become the input to another operation, or a partial representation can be refined.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tjsy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tjsy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tjsy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1396017,&quot;alt&quot;:&quot;Independent restarts return the same state, while feeding each result into the same transformation produces a sequence of changed states.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Independent restarts return the same state, while feeding each result into the same transformation produces a sequence of changed states." title="Independent restarts return the same state, while feeding each result into the same transformation produces a sequence of changed states." srcset="https://substackcdn.com/image/fetch/$s_!tjsy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!tjsy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb677bb5-d908-42e5-a653-d8db81430dd8_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Weight reuse becomes recurrent computation when one pass's result becomes the next pass's input.</figcaption></figure></div><p>This gives us a useful first distinction. Suppose a core contains two layers, A and B, and we run it three times. The execution is A, B, A, B, A, B. We store two sets of layer weights but perform six layer applications. The copies in an unrolled drawing represent uses of the same parameters.</p><p>That can provide more computation without storing six independent transformations. It does not make the extra applications free, and it does not establish that the sixth application produces a better answer. The state must contain something useful for the next pass, training must encourage useful repeated transformations, and the model needs a sensible place to stop.</p><p>We will follow those dependencies from attention and changing hidden states through training, halting, and memory. Along the way, a small constructed attention block will make the intermediate operations visible. Its calculations illustrate what shared weights can do; they are not a claim about the internal variables of a trained language model.</p><p><strong>Table of contents</strong></p><ul><li><p>What repeats inside the model</p></li><li><p>Why another pass can change the answer</p></li><li><p>Training the shared computation</p></li><li><p>Deciding when to stop</p></li><li><p>What looping costs</p></li><li><p>Depth and reasoning tokens are different budgets</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-looped-transformers-reuse-their-weights">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How the KV Cache Shapes AI Agent Costs]]></title><description><![CDATA[Why shrinking the cache, reusing a prefix, and keeping it nearby save different resources.]]></description><link>https://newsletter.theaiedge.io/p/how-the-kv-cache-shapes-ai-agent-costs</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-the-kv-cache-shapes-ai-agent-costs</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 19 Oct 2026 15:03:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a1a7d5bd-86b1-4ebc-9cd6-7949b12aa5de_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI agent can spend most of a model call reading a history it has already processed. The <strong>KV cache</strong> preserves the keys and values that a causal Transformer computed for earlier tokens, at each attention layer. Later tokens can consult those saved states instead of running the historical tokens through the model again. The model's weights stay unchanged; this is reusable inference state.</p><p>DeepSeek explicitly connects cache-hit charges to a large share of its agent workloads' costs, making the storage and reuse of that state a product-cost concern as well as a serving optimization. <a href="https://www.deepseek.com/en/news/deepseek-v4-1-flash/">DeepSeek's release explanation</a></p><p>Consider the shape of the work. A short chat might contain 500 input tokens and produce 500 output tokens. A coding agent can accumulate system instructions, repository files, earlier decisions, dozens of tool calls, and long tool results. It may then read 200,000 tokens to produce just 200 more before calling another tool.</p><p>Must the next call rebuild everything the model already computed?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LXF6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LXF6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 424w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 848w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1272w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LXF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png" width="1983" height="793" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:793,&quot;width&quot;:1983,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1229089,&quot;alt&quot;:&quot;An agent reuses its processed history on the next turn, while new queries still consult that history.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An agent reuses its processed history on the next turn, while new queries still consult that history." title="An agent reuses its processed history on the next turn, while new queries still consult that history." srcset="https://substackcdn.com/image/fetch/$s_!LXF6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 424w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 848w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1272w, https://substackcdn.com/image/fetch/$s_!LXF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eab90d7-f73e-4ca4-ae4f-b58206433695_1983x793.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Keeping the earlier computation avoids rebuilding it; continuing the task still requires reading its result.</figcaption></figure></div><p>It need not. But preserving the work creates a second question: <strong>where is the saved state, and how much of it must move before the agent can continue?</strong></p><p>Three different savings sit behind that question. A smaller representation reduces the bytes needed for each remembered position. Prefix caching reuses computation from an earlier call. Keeping the reusable state near the executing GPU avoids restoring it across a slower connection. These savings interact, but they are not interchangeable.</p><p>Here is the useful starting distinction: <strong>a cache hit can eliminate the work of rebuilding an old token without eliminating the work of consulting it.</strong> A newly arrived tool result still needs to interact with the previous context. Every new generated token may consult that context again. A cheap input-cache hit therefore does not imply cheap generation from a long history.</p><p>We'll follow those saved states from attention through head sharing, latent compression, paging, persistent storage, and separate prefill and decode workers. Then we'll account for a 50-turn agent and use a separate timing example to decide when retaining, restoring, or rebuilding state pays off.</p><p><strong>Table of contents</strong></p><ul><li><p>The work a KV cache saves</p></li><li><p>When bytes limit decoding</p></li><li><p>Shrink the state per token</p></li><li><p>Reuse the prefix without copying it</p></li><li><p>Keep, move, or recompute</p></li><li><p>Account for a 50-turn agent</p></li><li><p>Choose a retention policy</p></li><li><p>Design models around the cache</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-the-kv-cache-shapes-ai-agent-costs">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Hybrid LLMs Combine Memory, Attention, and Experts]]></title><description><![CDATA[Follow Mamba-2, Gated DeltaNet and KDA from state updates to the costs that active parameter counts miss.]]></description><link>https://newsletter.theaiedge.io/p/how-hybrid-llms-combine-memory-attention-and</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-hybrid-llms-combine-memory-attention-and</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 16 Oct 2026 15:00:46 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/507df679-3e9e-4b54-b364-dfb0ce3b7f34_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A hybrid LLM processes a sequence with more than one kind of memory. Some layers update a compact running state as tokens arrive. Other layers retain representations of individual positions and consult them through attention. The model can also use a mixture of experts, selecting a few feedforward networks for each token instead of evaluating one large dense network everywhere.</p><p>Released architectures from Qwen, Moonshot AI and NVIDIA now combine these mechanisms, making the meaning of &#8220;model size&#8221; depend on both how history is stored and which parameters actually execute.</p><p>Why combine them? <strong>They separate three resources: memory of the sequence, access to individual positions, and capacity to transform a token.</strong> Improving one resource does not automatically improve the others.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oO6d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oO6d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oO6d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1141050,&quot;alt&quot;:&quot;Attention retains separate position entries; recurrence folds successive inputs into a fixed-size current state.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Attention retains separate position entries; recurrence folds successive inputs into a fixed-size current state." title="Attention retains separate position entries; recurrence folds successive inputs into a fixed-size current state." srcset="https://substackcdn.com/image/fetch/$s_!oO6d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!oO6d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55da9df9-60c6-4d7d-8f58-966a5545bb06_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A hybrid combines access to individual positions with a compact state that is updated as the sequence advances.</figcaption></figure></div><p>The recurrent sequence mixers belong to a recognizable family, but their writes differ:</p><ul><li><p><strong>Mamba-2</strong> selectively fades a running state and adds new information.</p></li><li><p><strong>Gated DeltaNet</strong> also checks what its memory predicts, then writes a correction.</p></li><li><p><strong>Kimi Delta Attention</strong>, or <strong>KDA</strong>, adds finer control over which state coordinates fade.</p></li></ul><p>Retained attention gives these compact memories a complementary path through position-indexed history. Mixture of experts, or <strong>MoE</strong>, changes a different component: the feedforward computation applied to each token representation.</p><p>That distinction already lets you read a hybrid architecture more accurately. In Qwen3-Next, a hybrid language model with a 3:1 mixer design, three recurrent mixers are followed by an attention mixer along the model's depth. Every token runs through that configured sequence. The model does not wait three generated tokens before using attention, and it does not decide at runtime whether a particular token deserves an attention layer.</p><p>The expert router does make a per-token choice. Mixer placement is fixed; expert selection depends on the current representation. Calling both &#8220;conditional computation&#8221; without this qualification hides how the model actually runs.</p><p>We will follow those two design decisions from the original decoder block to the memory updates, then put them back together. The payoff is practical: given another hybrid model, you should be able to explain what grows with context, what remains fixed, and why its active parameter count cannot tell you its serving cost.</p><p><strong>Contents</strong></p><ul><li><p>Two jobs inside a Transformer</p></li><li><p>Mamba-2 keeps a running state</p></li><li><p>Delta memory corrects what it stores</p></li><li><p>Why hybrids retain attention</p></li><li><p>Sparse experts change the other half</p></li><li><p>When the combination is better</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-hybrid-llms-combine-memory-attention-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Persistent Agents Keep Working]]></title><description><![CDATA[Reconstruct a coding task&#8217;s context, preserve accepted work, and recover safely when a worker disappears.]]></description><link>https://newsletter.theaiedge.io/p/how-persistent-agents-keep-working</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-persistent-agents-keep-working</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 12 Oct 2026 15:00:33 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f1faa5ef-5f71-4170-a382-fdea7abc4b8d_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A persistent agent keeps a task moving after the model's current context, the worker process, or the execution environment has ended. It does that by saving enough information outside those components to reconstruct the next valid step. Remembering a user's preferences helps future conversations; recovering a half-finished job requires a different set of guarantees.</p><p>OpenAI's managed Agents API now exposes durable sessions, context compaction, recovery, and separate execution environments, making the boundary between a saved conversation and a recoverable task a concrete platform decision. <a href="https://developers.openai.com/api/docs/guides/agents-api/overview">Agents API overview</a>.</p><p>What actually allows an agent to continue tomorrow?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_YZ1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_YZ1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1395540,&quot;alt&quot;:&quot;A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement." title="A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement." srcset="https://substackcdn.com/image/fetch/$s_!_YZ1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!_YZ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50fcac19-6307-4a67-8546-841f77a211ee_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A replacement needs evidence from several resources, not the old process stack.</figcaption></figure></div><p>The familiar agent loop is straightforward: receive a goal, ask the LLM for an action, execute a tool, return the observation, and repeat. A short demonstration can keep almost everything in one process. Stretch that task across several hours and the assumptions change. The agent may edit files, wait for approval, lose a network response, and outlive its container. Its next prompt cannot reconstruct facts that were never durably recorded.</p><p>The useful mental model is a distributed system with a probabilistic planner inside it. The model proposes what to do. The surrounding runtime records accepted decisions, preserves evidence, executes actions, and determines what can safely happen next.</p><p>One consequence is immediately useful: <strong>a missing result is different from a failed action</strong>. An external service may have completed the request before the worker disappeared. A saved task record saying &#8220;no result recorded&#8221; tells us about the worker's knowledge. It does not tell us whether the world changed. Recovering the job means closing that gap, not asking the model to guess.</p><p>We will separate the kinds of state, reconstruct a bounded context, and work through the commit boundaries. Then we will build a local runtime, continue a code repair in a fresh context, and terminate a process between an external effect and its saved acknowledgement.</p><p><strong>Table of contents</strong></p><ul><li><p>Separate the state that must survive</p></li><li><p>Rebuild context from durable evidence</p></li><li><p>Recover execution across a crash</p></li><li><p>Resume workspaces, approvals, and delegated work</p></li><li><p>Connect the complete runtime</p></li><li><p>Build the durable runtime</p></li><li><p>Continue a coding task across context windows</p></li><li><p>Break it and compare recovery strategies</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-persistent-agents-keep-working">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Self-Improving Agents Learn from Experience]]></title><description><![CDATA[How executable tasks and adaptive curricula turn production failures into useful practice.]]></description><link>https://newsletter.theaiedge.io/p/how-self-improving-agents-learn-from-experience</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-self-improving-agents-learn-from-experience</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 09 Oct 2026 15:03:57 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a55da6d7-048b-4060-829a-929bd75b2a5a_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A <strong>self-improving agent</strong> uses evidence from earlier tasks to change something retained for later tasks, then demonstrates better behavior on new runs. The change might be a prompt, a tool, a reusable procedure, or the model&#8217;s weights. Criticizing an answer and trying again can help finish today&#8217;s task. Persistent improvement changes what happens when tomorrow&#8217;s task begins.</p><p>OpenAI&#8217;s Tax AI deployment turns practitioner corrections into evaluated product changes, making the quality of this feedback loop a concrete engineering problem.</p><p>The interesting question is how to turn those failures into useful practice, then retain what helps on future 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_!Xzf4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xzf4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1217323,&quot;alt&quot;:&quot;A retry loops inside one task, while a checked version change is loaded by a later task.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A retry loops inside one task, while a checked version change is loaded by a later task." title="A retry loops inside one task, while a checked version change is loaded by a later task." srcset="https://substackcdn.com/image/fetch/$s_!Xzf4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Xzf4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b1e68f-79a9-4ee8-ab8a-b3171f3082c9_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Persistence requires a retained artifact and a later execution that uses it.</figcaption></figure></div><p>The answer has two paths. One repairs the <strong>agent system</strong>: its code, instructions, tools, retrieval, or stored skills. The other improves the <strong>model</strong> using selected demonstrations or rewards from fresh attempts. Both need a way to decide whether a proposed change actually helps.</p><p>That is where <strong>environments</strong> become important. An environment supplies a task, a starting state, tools that change that state, and a way to evaluate the consequences. It can produce new experience when the agent tries a different action. A saved conversation contains only the experience that already happened.</p><p>This distinction changes what we should scale. More failure logs can reveal recurring defects. More executable environments can let an agent practice different decisions. Neither produces improvement until an update is made and tested on future behavior.</p><p>A useful first check is to ask what survives the run. A reflection left in a discarded conversation changes nothing for the next user. A saved skill changes future behavior only if another run retrieves and executes it. A newly trained checkpoint changes nothing until the application serves it. Persistence needs an actual connection to the next execution.</p><p>We will follow that connection through traces, three ways to construct executable environments, training, curriculum, and deployment.</p><p><strong>Contents</strong></p><ul><li><p>What persists after a run</p></li><li><p>Turn traces into testable failures</p></li><li><p>An environment produces new experience</p></li><li><p>How executable environments are built</p></li><li><p>Check what the environment rewards</p></li><li><p>Convert experience into an agent update</p></li><li><p>Build a curriculum from agent outcomes</p></li><li><p>Promote improvements on independent evidence</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-self-improving-agents-learn-from-experience">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How DeepSeek V4.1 Flash Separates Reading and Generation]]></title><description><![CDATA[How a shorter input path, shared attention memory, and selective reconstruction change the cost of long conversations.]]></description><link>https://newsletter.theaiedge.io/p/how-deepseek-v4-1-flash-separates-reading-and</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-deepseek-v4-1-flash-separates-reading-and</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 07 Oct 2026 15:00:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/347ca444-69c1-4f29-bd01-de4963a09be4_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>DeepSeek V4.1 Flash generates text one <strong>token</strong> at a time. A token is a piece of text, often a word or part of one. To choose what comes next, the model transforms the text already available through successive processing stages called <strong>layers</strong>. Its unusual feature is that most supplied text can take a shorter path through those stages than a token being used to generate the next one.</p><p>DeepSeek's <a href="https://arxiv.org/html/2609.19969">technical report</a> motivates this design with agents that repeatedly receive long tool results and accumulated history, making the cost of reading and retaining that information a major part of running the model. Why should preparing old text for later use require the same computation as deciding what to write next?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s7qx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s7qx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s7qx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1060771,&quot;alt&quot;:&quot;Most supplied positions pass through the first 20 layers to prepare memory. The final 128 also prepare recent context in the next 20 layers. Each chosen answer token uses both halves and earlier memory to predict the following token.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Most supplied positions pass through the first 20 layers to prepare memory. The final 128 also prepare recent context in the next 20 layers. Each chosen answer token uses both halves and earlier memory to predict the following token." title="Most supplied positions pass through the first 20 layers to prepare memory. The final 128 also prepare recent context in the next 20 layers. Each chosen answer token uses both halves and earlier memory to predict the following token." srcset="https://substackcdn.com/image/fetch/$s_!s7qx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!s7qx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c40d6fa-0499-46aa-ac38-866b0f52b443_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The shorter route prepares memory for later use. Recent input still enters the upper half before generation, and each chosen answer token uses both halves.</figcaption></figure></div><p>The design divides 40 layers into two halves. The first 20 prepare reusable memory of the input. Most input positions can stop there; a final slice of up to 128 positions also passes through the upper half to prepare its recent context. Once generation begins, each newly chosen token goes through both halves to predict the following token. The architecture is called a <strong>causal encoder-decoder</strong>, or <strong>CED</strong>. We will unpack those roles, then trace how sharing memory, selecting what to read, storing fewer bits, and rebuilding recent state change different costs.</p><p>The useful distinction is already visible: preparing a record of earlier text and using that record to choose a new token need not follow identical paths. The shorter input route matters most when there is much more new text to read than text to generate.</p><p><strong>Table of contents</strong></p><ul><li><p>Why one causal stack reads and writes</p></li><li><p>Why agent workloads change the budget</p></li><li><p>Prefill, decode, and the cache between them</p></li><li><p>How CED changes the old-token dependency</p></li><li><p>Why generated tokens still use the full model</p></li><li><p>Why this is a different encoder-decoder</p></li><li><p>How CSA2 shares global history</p></li><li><p>Why sparse search needs a hierarchy</p></li><li><p>How the cache bytes add up</p></li><li><p>What bounded replay rebuilds</p></li><li><p>Putting the architecture together</p></li><li><p>What the quality evidence establishes</p></li><li><p>What this means for agent architectures</p></li></ul>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-deepseek-v4-1-flash-separates-reading-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Build a Jev-Supervised AI Agent]]></title><description><![CDATA[Typed decisions, guarded tools, and a measured comparison with LLM supervisors]]></description><link>https://newsletter.theaiedge.io/p/build-a-jev-supervised-ai-agent-218605208</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/build-a-jev-supervised-ai-agent-218605208</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Sat, 03 Oct 2026 15:02:23 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/73d933ba-a75a-4f7f-80be-67272008fb19_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI agent does more than write its final answer. It chooses a tool, reads the result, decides whether to continue, and sometimes has to admit that an action's outcome is unknown. TypeSafe released Jev in September 2026 as a model for typed decisions inside software, which makes those small transitions a practical design choice.</p><p>Here is the agent we will build: a generative model plans and writes; Jev chooses among named next actions using the current state; Python checks hard rules, executes a local tool, and records what actually happened. The central question is where a fast decision belongs when the task still needs open-ended reasoning and real effects. The short answer is <strong>between observations and permitted transitions</strong>. Jev can judge the state, but its choice cannot itself refund an account or prove that a refund settled.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-VLK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-VLK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-VLK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png" width="1942" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1279431,&quot;alt&quot;:&quot;Agent loop in which an LLM plans, Jev proposes a next action, code guards and executes a tool, observations update state, and an LLM writes the answer.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Agent loop in which an LLM plans, Jev proposes a next action, code guards and executes a tool, observations update state, and an LLM writes the answer." title="Agent loop in which an LLM plans, Jev proposes a next action, code guards and executes a tool, observations update state, and an LLM writes the answer." srcset="https://substackcdn.com/image/fetch/$s_!-VLK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!-VLK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F095f2c53-358d-477c-8b8d-3924a52be8a6_1942x809.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Jev sits inside the state transition loop; the executor and observation record determine what actually changed.</figcaption></figure></div><p>We will make one Jev call first, then connect it to a small support agent. Then we will compare Jev with two structured-output LLMs using our experiments on support and document-research tasks. The experiment is useful because it records both proposed actions and actual local effects.</p><p><strong>In this guide</strong></p><ul><li><p>What Jev decides</p></li><li><p>Give the agent observable state</p></li><li><p>Build the guarded loop</p></li><li><p>Run support and research tasks</p></li><li><p>Compare three supervisors</p></li><li><p>Read probabilities and disagreements</p></li><li><p>Decide where Jev belongs</p></li></ul><p>One distinction will keep the rest of the build honest. A tool returning HTTP 202 says a request was accepted for processing. It does not say the requested business outcome happened. That gap is exactly where a supervisor needs evidence, and where code must resist an unsafe retry.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/build-a-jev-supervised-ai-agent-218605208">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Jev Turns Questions Into Decisions]]></title><description><![CDATA[Inside the state, typed-output, probability, and application-policy contracts of a decision model]]></description><link>https://newsletter.theaiedge.io/p/how-jev-turns-questions-into-decisions</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-jev-turns-questions-into-decisions</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 30 Sep 2026 15:02:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f25bb621-bfb9-43ff-afd5-ab71ff0ac615_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Jev is a decision model whose interface asks bounded questions about a supplied state and returns probabilities over the allowed answers. A support system might ask which queue should receive a ticket, whether a tool result actually resolved it, and how urgent it is. The application, rather than the model, decides what to do with those answers. In September 2026, TypeSafe introduced Jev for this kind of typed decision request, making an old systems question concrete: when the useful output is a small distribution, why generate a sentence to carry 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_!kHLg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kHLg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 424w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 848w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1272w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kHLg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png" width="1912" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/accfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:1912,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1221157,&quot;alt&quot;:&quot;One state feeds several typed questions, each returning a bounded probability distribution; code uses the answers to choose actions.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One state feeds several typed questions, each returning a bounded probability distribution; code uses the answers to choose actions." title="One state feeds several typed questions, each returning a bounded probability distribution; code uses the answers to choose actions." srcset="https://substackcdn.com/image/fetch/$s_!kHLg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 424w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 848w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1272w, https://substackcdn.com/image/fetch/$s_!kHLg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faccfeb76-a169-4b6d-847a-ee9507fa373a_1912x823.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The external contract: state and typed questions produce distributions; the application retains control.</figcaption></figure></div><p>The short answer is that Jev moves the boundary. A conventional language model can certainly emit <code>{"route":"billing"}</code>; strict structured output can make that object parse. Jev instead accepts the answer space as part of the question and returns the chosen answer <em>and its distribution</em> as the native result. Several questions can refer to one supplied state. That makes semantic judgments easier to place inside software, but it does not make their probabilities self-validating or authorize any action.</p><p>This is a model category worth understanding even if a particular workload ends up using rules, a fine-tuned classifier, or a constrained LLM. We will follow the interfaces first, then the computation they may avoid, the architecture that is and is not disclosed, and finally the policy that turns a judgment into a safe system decision.</p><p><strong>In this deep dive</strong></p><ol><li><p>What Jev receives and returns</p></li><li><p>Why a separate decision model might help</p></li><li><p>What can be inferred about Jev's architecture</p></li><li><p>Calibration, RLCD, and action thresholds</p></li><li><p>Where Jev fits among existing tools</p></li><li><p>A system with generation and decision separated</p></li></ol><p>One useful rule already follows from the interface: a model's answer should be treated as evidence about a defined outcome, while the application's code retains the choice of action. The rest of the article explains exactly what must be defined, computed, and checked before that rule is useful.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-jev-turns-questions-into-decisions">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Complete Guide to Evaluation Pipelines for AI Agents]]></title><description><![CDATA[From production traces and isolated trials to evidence you can use for release decisions]]></description><link>https://newsletter.theaiedge.io/p/how-to-build-an-evaluation-pipeline-fo-217656816</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-to-build-an-evaluation-pipeline-fo-217656816</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 28 Sep 2026 15:04:25 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/efc7964b-db00-4133-9ab7-0231adb5b628_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An agent can say that a refund is complete while the customer's account shows no refund. For an agent that can use tools, a convincing reply is only one piece of evidence. A production evaluation has to check the actions the agent took and the world those actions left behind.</p><p>Teams are already using production conversations and human labels to build agent evaluations, as <a href="https://dropbox.tech/machine-learning/how-we-turned-ai-evaluations-into-better-responses-in-dash-chat">Dropbox's engineering account</a> illustrates; the durable problem is deciding whether an agent actually completed an authorized task. How do we turn that question into a pipeline that can test a new agent version before release and keep learning afterward?</p><p>The compact answer is a loop: <strong>observed request &#8594; reviewed case &#8594; isolated trial &#8594; trace and final state &#8594; graders &#8594; version comparison &#8594; release decision &#8594; production feedback</strong>. A case describes the starting world and acceptable outcomes. A trial runs one agent attempt against that world. Graders inspect independent evidence, and the comparison asks whether the new version improves the tasks that matter without breaking important slices. The loop is reusable; the meaning of success changes with the agent's job.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hJJ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hJJ7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1464243,&quot;alt&quot;:&quot;Agent claims a refund is complete, while the tool only accepted the request and the ledger has no refund.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Agent claims a refund is complete, while the tool only accepted the request and the ledger has no refund." title="Agent claims a refund is complete, while the tool only accepted the request and the ledger has no refund." srcset="https://substackcdn.com/image/fetch/$s_!hJJ7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!hJJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb912402-de63-4ce2-9f13-113df6ae0158_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An answer, a tool acknowledgment and a committed state are different evidence.</figcaption></figure></div><p>The first useful rule is to give a completed action its own proof. If a support agent says &#8220;refunded,&#8221; a ledger record or service commit is the proof, subject to the service's consistency contract. If the record is absent, the polished sentence cannot rescue the task. That single separation prevents an answer-only judge from turning a failed action into a pass.</p><p>The second rule is to test the task from a known starting point. The same request can require a refund when the customer verifies identity, a clarifying question when they cannot, or a refusal when policy forbids it. An evaluation case must carry those starting facts and accepted branches. Otherwise a grader may punish a careful agent for asking or reward a reckless one for acting.</p><p>Before trusting a score, ask what its grader can observe. If it sees only messages, the score measures answer quality. If it sees tool calls but no final state, it can verify attempted actions without proving durable effects. Reserve &#8220;task success&#8221; for a test whose evidence covers the task's actual outcome. This distinction is useful even before the full pipeline exists.</p><p><strong>Table of contents</strong></p><ol><li><p><a href="#define-what-success-must-prove">Define what success must prove</a></p></li><li><p><a href="#turn-production-evidence-into-cases">Turn production evidence into cases</a></p></li><li><p><a href="#run-isolated-observable-trials">Run isolated, observable trials</a></p></li><li><p><a href="#grade-the-evidence">Grade the evidence</a></p></li><li><p><a href="#compare-agent-versions-fairly">Compare agent versions fairly</a></p></li><li><p><a href="#operate-the-pipeline-and-close-the-loop">Operate the pipeline and close the loop</a></p></li></ol>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-to-build-an-evaluation-pipeline-fo-217656816">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How AI Agent Memory Updates a Changed Preference]]></title><description><![CDATA[Follow one correction from a user message to the active fact a future task retrieves.]]></description><link>https://newsletter.theaiedge.io/p/how-ai-agent-memory-updates-a-changed-preference</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-ai-agent-memory-updates-a-changed-preference</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 25 Sep 2026 15:04:28 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/66908f83-ab4a-4bd8-b3a3-f60d09768c5c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI coding assistant can remember that you use Python for deployment scripts and still get the next deployment wrong after you switch to Go. The problem is not that it forgot everything. It may remember <strong>both</strong> instructions and have no reliable way to tell which one is current.</p><p>Persistent agent memory tools now let applications carry stored information across sessions and update it, making the quality of that update consequential for later tasks. The question is: when a user changes a standing preference, what must happen so an agent acts on the new one? A useful memory system treats the new message as a proposed change to stored state. It identifies the fact, finds the existing fact about the same thing, reconciles the two, commits the active version, and retrieves that version when the next task needs 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_!lKkE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lKkE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lKkE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1359304,&quot;alt&quot;:&quot;Two conflicting remembered script-language preferences converge on one later task.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two conflicting remembered script-language preferences converge on one later task." title="Two conflicting remembered script-language preferences converge on one later task." srcset="https://substackcdn.com/image/fetch/$s_!lKkE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!lKkE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c4eadc1-4906-4596-b74f-9407734b1e42_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The future request needs one current preference, but a transcript can offer two.</figcaption></figure></div><p>That differs from appending messages to a transcript. We can see why by following one preference from its first instruction through a correction and a later task. The same failure can affect a project decision or customer preference.</p><h2>What changes when an agent has memory?</h2><p>The model receives a limited working context with each request. A conversation transcript can be placed in that context, but it grows, contains incidental remarks, and may contain claims that no longer hold. <strong>Persistent memory</strong> here means an external store that keeps selected information beyond one request or session. A write operation changes that store; a later read returns a useful part of it to the model. The model's weights are not being retrained every time a preference changes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fH45!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fH45!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!fH45!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fH45!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1292665,&quot;alt&quot;:&quot;A fact is written outside the model and read into a later session.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A fact is written outside the model and read into a later session." title="A fact is written outside the model and read into a later session." srcset="https://substackcdn.com/image/fetch/$s_!fH45!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!fH45!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!fH45!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a72a9ec-af95-4d21-b1d7-eb77479a4853_1536x1024.png 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 buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Persistent memory changes external state, then supplies selected context later.</figcaption></figure></div><p>Suppose a user tells a coding assistant, &#8220;For the Atlas repository, write deployment scripts in Python.&#8221; The assistant might store a compact record with four parts: the user, the Atlas repository, the subject <em>deployment-script language</em>, and the current value <em>Python</em>. The message that supplied the preference is its source. This is more useful than an unqualified memory such as &#8220;prefers Python,&#8221; because the latter could affect unrelated work.</p><p>The store has two distinct paths. On the <strong>write path</strong>, a message or tool result is examined for information worth retaining, then compared with what is already stored. On the <strong>read path</strong>, the next task retrieves applicable memory and places it where the model can use it. If the write path is wrong, fast retrieval brings back a mistake. If the read path misses the right record, a perfect update sits unused.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YZUN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YZUN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!YZUN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1159703,&quot;alt&quot;:&quot;A write path maintains stored facts; a read path returns applicable facts to the model.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A write path maintains stored facts; a read path returns applicable facts to the model." title="A write path maintains stored facts; a read path returns applicable facts to the model." srcset="https://substackcdn.com/image/fetch/$s_!YZUN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!YZUN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615048b0-ae1b-4698-a677-4d0d2de23091_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A good write is useful only when the later read selects it.</figcaption></figure></div><p>Now the user says, &#8220;For Atlas, use Go for deployment scripts from now on.&#8221; Adding that sentence as a second, equally active memory would leave the future assistant to arbitrate a contradiction each time. A better result is an active Atlas deployment-language preference of <em>Go</em>, with the former Python preference no longer active. The old statement may remain in an audit history, but it should not be presented as another current instruction.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n67r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n67r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!n67r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!n67r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1054108,&quot;alt&quot;:&quot;Appending leaves two candidate instructions; updating leaves one active value.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Appending leaves two candidate instructions; updating leaves one active value." title="Appending leaves two candidate instructions; updating leaves one active value." srcset="https://substackcdn.com/image/fetch/$s_!n67r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!n67r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!n67r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56e100f-5ee5-4498-ad99-da38b8fde01b_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A correction must change what the next read sees.</figcaption></figure></div><p><strong>Remembering a correction means changing the state that future reads see</strong>, not merely remembering that a correction was said. The change has to preserve the subject and scope of the fact, or it will solve one task by creating a wider error.</p><div id="youtube2-5HgG6_K4DYo" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;5HgG6_K4DYo&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/5HgG6_K4DYo?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-ai-agent-memory-updates-a-changed-preference">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How LLM Routers Balance Cache Reuse and Queue Time]]></title><description><![CDATA[Four routing strategies, one repeated prompt, and the point where a cold replica wins]]></description><link>https://newsletter.theaiedge.io/p/how-cache-aware-routing-chooses-between-warm-and</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-cache-aware-routing-chooses-between-warm-and</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 23 Sep 2026 15:03:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0523da2d-4b65-4099-911d-4712db320d9c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An LLM request router sits in front of several replicas of the same model and chooses which replica should receive each prompt. <strong>Cache-aware routing</strong> makes that placement decision before execution by considering reusable prompt state at each replica, not only how busy it looks. The surprising part is that replicas stop being interchangeable after they begin serving traffic: one may already hold reusable computation for the prompt, while another may have a shorter queue.</p><p>Prefix-aware routing became a managed endpoint option in September 2026, a sign that cache locality has moved from an engine detail into a deployment decision.</p><p>So where should the next request go: to the warm replica or the idle one? The compact answer is to send it where the saved prompt computation is worth more than the extra work already waiting there. A useful router therefore needs two views at once: <strong>what can be reused</strong> and <strong>what must still be processed</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_!T8m-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T8m-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T8m-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1091918,&quot;alt&quot;:&quot;One LLM request faces two destinations: a warm replica with a queue and a cold replica with no queue, making the faster choice ambiguous.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One LLM request faces two destinations: a warm replica with a queue and a cold replica with no queue, making the faster choice ambiguous." title="One LLM request faces two destinations: a warm replica with a queue and a cold replica with no queue, making the faster choice ambiguous." srcset="https://substackcdn.com/image/fetch/$s_!T8m-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!T8m-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d246b2c-fdb6-474d-9b13-7b616e92218a_1774x887.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The cached destination is not automatically the fastest destination.</figcaption></figure></div><p>To see why, start with the work a cached prefix actually removes. Then we will keep one support prompt fixed while four routing policies make different placement decisions. That comparison will expose the useful rule, its failure modes, and the state a production router has to keep current.</p><h2>What a warm prefix actually saves</h2><p>Before routing makes sense, we need one piece of transformer serving machinery.</p><p>An incoming prompt is a sequence of tokens. During <strong>prefill</strong>, the model processes those input tokens through every transformer layer. In each attention layer it derives a key vector and a value vector for every position. Those vectors are the processed state that later tokens attend to. The first generated token can appear only after this prompt work has finished.</p><p>During <strong>decode</strong>, the model generates one new token, appends its new key and value state, and repeats. Decode can reuse the state for all earlier positions instead of rebuilding it. The stored collection is called the <strong>KV cache</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_!XLMl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XLMl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 424w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 848w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1272w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!XLMl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png" width="1923" height="817" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:817,&quot;width&quot;:1923,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1198485,&quot;alt&quot;:&quot;Prefill processes all prompt tokens into KV state before the first output token, while decode reuses that state and adds one token at a time.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Prefill processes all prompt tokens into KV state before the first output token, while decode reuses that state and adds one token at a time." title="Prefill processes all prompt tokens into KV state before the first output token, while decode reuses that state and adds one token at a time." srcset="https://substackcdn.com/image/fetch/$s_!XLMl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 424w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 848w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1272w, https://substackcdn.com/image/fetch/$s_!XLMl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d71ed3b-080e-4f22-b562-573ec9d91339_1923x817.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Routing can save prefill work; it cannot make unknown output tokens exist early.</figcaption></figure></div><p>Now consider a support assistant whose prompt begins with 3,200 tokens of policies, tool descriptions, and response rules. Only the short customer question at the end changes. If the engine has already processed the same beginning, it can reuse the matching KV state and prefill only the new suffix.</p><p>Prefix caching does not mean that the model remembers a similar idea. The match is structural. Serving engines divide the prompt into token blocks, identify a block using its tokens and the blocks before it, and reuse only an unbroken matching prefix. If block three changes, later blocks no longer describe the same model state, even if much of their text looks familiar.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w2th!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w2th!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!w2th!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!w2th!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1041065,&quot;alt&quot;:&quot;A prompt split into ordered token blocks reuses only the consecutive cached blocks from the beginning, stopping at the first changed block.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A prompt split into ordered token blocks reuses only the consecutive cached blocks from the beginning, stopping at the first changed block." title="A prompt split into ordered token blocks reuses only the consecutive cached blocks from the beginning, stopping at the first changed block." srcset="https://substackcdn.com/image/fetch/$s_!w2th!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!w2th!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!w2th!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff76bb78d-091d-48c2-8ce1-1ba972743c4f_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Prefix reuse is an unbroken chain from the first token, not a bag of similar passages.</figcaption></figure></div><p>That distinction gives prefix caching an honest boundary. It skips model computation already performed for the input prefix. It does not skip the generation of new output tokens, because those tokens do not exist yet. A workload with long repeated inputs and short answers can gain a lot; a workload with unrelated prompts or very long answers may gain little.</p><p>Within one replica, the rule is simple: reuse every valid prefix block that is still resident, prefill the remaining input, then decode normally.</p>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-cache-aware-routing-chooses-between-warm-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Test-Time Scaling Allocates LLM Reasoning Across Depth, Width, and Feedback]]></title><description><![CDATA[Why the same inference budget can finish one path, explore alternatives, or learn from a failure]]></description><link>https://newsletter.theaiedge.io/p/how-test-time-scaling-allocates-llm-reasoning</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-test-time-scaling-allocates-llm-reasoning</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 21 Sep 2026 15:01:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d66a9ed7-efcb-487b-a0fa-160ac44e596b_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Test-time compute</strong> is the work an already-trained model performs for one request while producing, checking, or revising its answer. <strong>Test-time scaling</strong> means giving the model more of that request-time work, or allocating it differently, without retraining the model. The extra budget can extend one line of reasoning, generate alternative answers, or use an observation to try again. Those choices are often bundled under &#8216;let it think longer,&#8217; but they do not buy the same thing.</p><p>That distinction is now practical because current OpenAI and Anthropic APIs expose reasoning-effort controls while Google offers an Extended Thinking model for complex live-agent tasks, turning &#8220;let it think&#8221; into a quality, latency, and cost decision for each request.</p><p>The useful question is not simply, &#8220;How much thinking should I buy?&#8221; It is: <strong>where should the extra compute go?</strong> Test-time scaling allocates it to depth, width, or feedback. Depth extends one attempt. Width creates separate attempts. Feedback evaluates work and changes the next attempt. Each repairs a different failure, and none guarantees correctness.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RYXr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RYXr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!RYXr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!RYXr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!RYXr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RYXr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1228899,&quot;alt&quot;:&quot;The same reasoning model receives one coding task and can spend extra compute on a longer path, parallel paths, or a test-and-revise loop.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same reasoning model receives one coding task and can spend extra compute on a longer path, parallel paths, or a test-and-revise loop." title="The same reasoning model receives one coding task and can spend extra compute on a longer path, parallel paths, or a test-and-revise loop." srcset="https://substackcdn.com/image/fetch/$s_!RYXr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!RYXr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!RYXr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!RYXr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faca30f23-9cd4-41df-bfe4-203d621f5bda_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">One budget can buy three different information flows, so &#8220;more thinking&#8221; is not a complete system description.</figcaption></figure></div><h2>What test-time compute actually is</h2><p>Start with an ordinary request. Training is already over, and the model begins with learned weights that stay fixed while it answers. At each step, the model processes the request and the tokens generated so far to choose the next token. That ordinary generation already consumes test-time compute: computation performed after training for one particular input.</p><p>The term covers more than the model's hidden reasoning tokens. It includes the work the model and its surrounding system perform to produce, inspect, and improve this one answer. Continuing the generation adds more token-level operations to the current history. Starting another generation creates a separate candidate history. Running a test or verifier creates an observation that a later attempt can use. Revising with that observation performs another generation under changed conditions.</p><p><strong>Test-time scaling</strong> is the deliberate decision to increase or reallocate that per-request work relative to a baseline answer. The extra work can matter because it changes the transient information available to a later choice: a longer prefix, a genuinely different candidate, or new evidence about an error. If the added work does not change that state or evidence, it may increase latency and cost without improving the answer.</p><p>This is not training or fine-tuning. Training changes reusable model weights for future requests. Test-time compute leaves those weights alone and is paid again for each request. It is also not synonymous with selecting a larger model or producing a longer visible answer. A system may spend substantial compute on candidates, checks, and revisions that never appear in the final response.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!snz-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!snz-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!snz-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!snz-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!snz-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!snz-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1490843,&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://newsletter.theaiedge.io/i/216478399?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.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_!snz-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!snz-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!snz-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!snz-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dce9978-aa0b-4390-b0fb-3e64295b6179_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Training changes reusable model weights. Test-time scaling leaves those weights fixed and increases or reallocates the work performed for one request.</figcaption></figure></div><p>We will follow one realistic coding task through all three choices. An agent must repair <code>invoice_total</code>, a function that sums prices, applies tax, and returns integer cents. Its contract requires exact decimal arithmetic, an 8 percent tax applied after aggregation, round-half-up once to the nearest cent, then conversion to integer cents. The visible invoice contains items priced at $12.49, $7.25, and $3.10. Hidden tests vary the inputs to expose half-cent rounding, multiple-item accumulation, zero tax, and binary floating-point drift.</p><p>First we need to see why one uninterrupted generation can fail. Then we can spend the same request-time budget on a deeper path, a wider candidate set, or a feedback loop and see what actually changes.</p><h2>Before scaling, identify the one-shot failure</h2><p>An autoregressive language model generates a response one token at a time. At every position it receives the request plus the tokens already written, then assigns probabilities to possible next tokens. Once a token is chosen, that token becomes part of the state used to predict everything that follows.</p><p>This left-to-right process matters because an early choice can narrow the rest of the answer. Suppose our coding agent begins with the assumption that converting dollars to cents is just <code>int(total * 100)</code>. It can write an elegant explanation and many consistent lines of code after that. The later tokens are coherent with the earlier assumption, but coherence does not repair the assumption.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rmv2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rmv2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!rmv2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!rmv2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!rmv2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!rmv2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:841835,&quot;alt&quot;:&quot;A left-to-right token sequence branches at an early assumption, and later tokens remain coherent with either the sound or mistaken branch.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A left-to-right token sequence branches at an early assumption, and later tokens remain coherent with either the sound or mistaken branch." title="A left-to-right token sequence branches at an early assumption, and later tokens remain coherent with either the sound or mistaken branch." srcset="https://substackcdn.com/image/fetch/$s_!rmv2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!rmv2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!rmv2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!rmv2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cc538e-8925-4ea0-a79e-3e6d4a4bee44_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An early token becomes part of the state that produces every later token.</figcaption></figure></div><p>A <strong>one-shot attempt</strong> is one uninterrupted generation from request to answer. It may spend many internal reasoning tokens, but it has no separate alternative to compare with and no external result that changes its course. Its success depends on the model entering a useful line of reasoning and staying there.</p><p>For this lesson, a useful accounting unit is a generated reasoning token, a candidate response, a verifier evaluation, or a tool call such as a test run. These units have different hardware costs, so we will not pretend they are perfectly interchangeable. The important constraint is that the system has a finite request-time budget and must decide how to allocate 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_!gGOe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gGOe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 424w, https://substackcdn.com/image/fetch/$s_!gGOe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 848w, https://substackcdn.com/image/fetch/$s_!gGOe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 1272w, https://substackcdn.com/image/fetch/$s_!gGOe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gGOe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png" width="1919" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1919,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:916532,&quot;alt&quot;:&quot;A fixed request-time budget is divided among generated tokens, candidate responses, verifier evaluations, and tool calls.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A fixed request-time budget is divided among generated tokens, candidate responses, verifier evaluations, and tool calls." title="A fixed request-time budget is divided among generated tokens, candidate responses, verifier evaluations, and tool calls." srcset="https://substackcdn.com/image/fetch/$s_!gGOe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 424w, https://substackcdn.com/image/fetch/$s_!gGOe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 848w, https://substackcdn.com/image/fetch/$s_!gGOe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 1272w, https://substackcdn.com/image/fetch/$s_!gGOe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2fc8f0e-9f0a-4008-9a13-49ef6c3f92df_1919x820.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The units have different costs, but all consume finite work after the request arrives.</figcaption></figure></div><p>There are three places to allocate that budget:</p><ol><li><p><strong>Depth:</strong> continue or enrich the same reasoning trajectory.</p></li><li><p><strong>Width:</strong> sample several separate trajectories from the same starting request.</p></li><li><p><strong>Feedback:</strong> inspect work, then condition the next attempt on what the inspection revealed.</p></li></ol><p>The distinction is about information flow. Extra depth sees the same request and its own growing prefix. Width gives each attempt the request but not the siblings' work. Feedback adds a new observation, such as &#8220;the half-cent test failed,&#8221; before the next generation. Width is logical branching; whether those branches run simultaneously is a separate serving decision.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r5X5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r5X5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!r5X5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!r5X5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!r5X5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!r5X5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1098335,&quot;alt&quot;:&quot;Three aligned panels compare depth, width, and feedback by showing which information reaches each new generation step.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Three aligned panels compare depth, width, and feedback by showing which information reaches each new generation step." title="Three aligned panels compare depth, width, and feedback by showing which information reaches each new generation step." srcset="https://substackcdn.com/image/fetch/$s_!r5X5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!r5X5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!r5X5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!r5X5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7261319-ef8c-4aab-b50e-5cf0ddd7dcf4_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Depth extends a prefix, width restarts from the request, and feedback adds a new observation.</figcaption></figure></div><p>That gives us a diagnostic before we spend anything. If the model merely stops before completing a sound plan, buy depth. If different plausible starts lead to different outcomes, buy width. If a checker can reveal what went wrong, buy feedback. A high effort setting may combine these internally, but an application designer still needs this mental model to understand latency, cost, and failure.</p><h2>Depth gives one trajectory room to finish</h2><p>The simplest scaling strategy is to let one attempt run longer. The model can decompose the task, inspect edge cases, and carry intermediate facts farther before committing to the final response. In our invoice task, a deeper trajectory must preserve a specific dependency: represent the prices exactly, sum them to $22.84, apply the 8 percent tax to obtain $24.6672, round that total once to $24.67, then return 2467 cents.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DS5S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DS5S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!DS5S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!DS5S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!DS5S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!DS5S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1262028,&quot;alt&quot;:&quot;One invoice-patch trajectory moves through numeric representation, rounding order, edge cases, and a final patch.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One invoice-patch trajectory moves through numeric representation, rounding order, edge cases, and a final patch." title="One invoice-patch trajectory moves through numeric representation, rounding order, edge cases, and a final patch." srcset="https://substackcdn.com/image/fetch/$s_!DS5S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!DS5S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!DS5S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!DS5S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fa7f929-ebd9-47b3-ac63-143f55ca33d8_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Depth preserves dependent intermediate reasoning inside one trajectory.</figcaption></figure></div><p>The benefit is continuity. Every later step sees the reasoning accumulated earlier. Here, the final integer conversion only makes sense after the representation and rounding policy are settled. Once an earlier step truncates a fraction of a cent, no later step can reconstruct it. Proofs, long calculations, and code changes with dependent invariants have the same shape.</p><p>But depth is not the same as recovery. If the trajectory commits early to binary floating point and treats a failing cent as harmless noise, more tokens can reinforce the wrong frame. The model may repeatedly check arithmetic inside a mistaken representation. It is thinking longer, but within a shrinking part of the solution space.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ef3M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ef3M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!ef3M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!ef3M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!ef3M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ef3M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:972290,&quot;alt&quot;:&quot;Two long trajectories begin from different early assumptions; one reaches a sound patch while the other elaborates a floating-point mistake.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two long trajectories begin from different early assumptions; one reaches a sound patch while the other elaborates a floating-point mistake." title="Two long trajectories begin from different early assumptions; one reaches a sound patch while the other elaborates a floating-point mistake." srcset="https://substackcdn.com/image/fetch/$s_!ef3M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!ef3M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!ef3M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!ef3M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f14a22-72bc-46c6-bdb2-f0dd5e0950ea_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A longer path can complete a good approach or entrench a bad one.</figcaption></figure></div><p>That gives us the first useful rule: <strong>depth helps when a sound path is unfinished, not merely when a path is wrong</strong>. A model that often reaches the correct approach and then runs out of room is a good candidate for higher effort. A model that confidently commits to a bad representation needs an alternative or new evidence, not an even longer monologue.</p><div id="youtube2-YlB7_bsk8sI" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;YlB7_bsk8sI&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/YlB7_bsk8sI?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-test-time-scaling-allocates-llm-reasoning">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Constrained Decoding Makes LLM Outputs Follow a Schema]]></title><description><![CDATA[The decoder can guarantee the shape of a tool call while leaving its values completely wrong.]]></description><link>https://newsletter.theaiedge.io/p/how-constrained-decoding-makes-llm-outputs</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-constrained-decoding-makes-llm-outputs</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 18 Sep 2026 15:04:14 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4efaddf5-61fe-42d3-b4a0-b87ac07812c4_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An LLM can return JSON that parses perfectly, matches every required field, and is still dangerous to execute. That is not a contradiction. It is the exact boundary of <strong>constrained decoding</strong>.</p><p>Normally, a language model can choose any token in its vocabulary at each generation step. Constrained decoding inserts a rule checker into that loop. The checker looks at the text already generated and removes every next token that would make the requested structure impossible to complete. The model then chooses among what remains.</p><p>Structured output has become a common connection layer between LLMs, extraction pipelines, and agent tools, yet a recent developer discussion exposed the practical surprise that matters here: a perfectly shaped object can still contain invented values, so schema-valid is not the same as safe to execute.</p><p>The central question is simple: <strong>what does the decoder actually guarantee?</strong> The compact answer is that it can guarantee membership in a supported output language, such as a JSON Schema, by blocking illegal continuations token by token. It does not prove that a legal value came from the input, reflects reality, satisfies a business rule, or deserves permission to trigger an action.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aQnP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aQnP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!aQnP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!aQnP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!aQnP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aQnP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1354408,&quot;alt&quot;:&quot;Two schema-valid refund objects pass the same grammar check, but only the object containing 4250 cents matches the source message.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Two schema-valid refund objects pass the same grammar check, but only the object containing 4250 cents matches the source message." title="Two schema-valid refund objects pass the same grammar check, but only the object containing 4250 cents matches the source message." srcset="https://substackcdn.com/image/fetch/$s_!aQnP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!aQnP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!aQnP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!aQnP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1085f3f-3983-456c-afd4-f324e3874914_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The grammar can reject a broken object. It cannot distinguish the stated amount from a plausible but false amount. Step by step, we will see why.</figcaption></figure></div><p>We will follow one support request through the complete mechanism. The request says: <code>Please refund order A-17. The charge was $42.50.</code> The desired output is a small object containing a status, an order identifier, and a refund amount in cents. First we need to separate three ideas that are often collapsed into the word &#8220;valid.&#8221; Then we can compile the schema, watch the token mask change, and see exactly where truth leaves the decoder's jurisdiction.</p><h2>Three different promises hide inside &#8220;valid JSON&#8221;</h2><p>JSON is a text format. A JSON parser checks punctuation and nesting: braces balance, keys are quoted, commas occur in legal places, and values have valid JSON forms. This object is valid JSON:</p><p><code>{"status":"ready","order_id":"A-17","refund_cents":4500}
</code></p><p>A <strong>schema</strong> asks a narrower question about the parsed value. It can require an object, name its allowed properties, require selected keys, restrict a field to an integer, or limit a value to an enumeration. If our schema allows any non-negative integer for <code>refund_cents</code>, then <code>4500</code> passes. The schema has no memory of the user's <code>$42.50</code>.</p><p>Finally, the application asks whether the object means something acceptable in its real environment. Does order A-17 exist? Was the charge really $42.50? Is it refundable? Is this user authorized? Those are evidence, policy, and permission questions. They are not punctuation questions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z8-S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z8-S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Z8-S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Z8-S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Z8-S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z8-S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1553733,&quot;alt&quot;:&quot;Four sequential gates distinguish parseable JSON, schema validity, grounded values, and an authorized action.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Four sequential gates distinguish parseable JSON, schema validity, grounded values, and an authorized action." title="Four sequential gates distinguish parseable JSON, schema validity, grounded values, and an authorized action." srcset="https://substackcdn.com/image/fetch/$s_!Z8-S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Z8-S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Z8-S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Z8-S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae21b19-b913-4fe0-af8f-eb6e44d3ae9b_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Each outer check answers a question the inner check cannot answer.</figcaption></figure></div><p>The checks therefore form a hierarchy:</p><ol><li><p><strong>Parseable</strong> means the text is legal JSON.</p></li><li><p><strong>Schema-valid</strong> means the parsed value also obeys the declared structural rules.</p></li><li><p><strong>Grounded and actionable</strong> means the values are supported by evidence and pass application policy.</p></li></ol><p>Each level can remove failures that the previous level accepts. None can be silently substituted for the next.</p><p>Our refund extractor also needs a way to say that the message is incomplete. If a successful decode must complete a contract where every field is required and <code>refund_cents</code> must be an integer, every successful path puts <em>some</em> integer there even when no amount appears in the input. A better output contract exposes two branches:</p><p><code>{
  "anyOf": [
    {
      "status": "ready",
      "order_id": "string",
      "refund_cents": "non-negative integer"
    },
    {
      "status": "insufficient_info",
      "order_id": null,
      "refund_cents": null
    }
  ]
}
</code></p><p>This is a readable sketch of the contract, not a literal complete JSON Schema. The important move is structural: uncertainty is now a legal output rather than an instruction the model must squeeze into fields that forbid 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_!qTzE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qTzE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!qTzE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!qTzE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!qTzE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!qTzE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1101244,&quot;alt&quot;:&quot;A refund schema branches into a ready object with non-null fields and an insufficient-information object with null fields.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A refund schema branches into a ready object with non-null fields and an insufficient-information object with null fields." title="A refund schema branches into a ready object with non-null fields and an insufficient-information object with null fields." srcset="https://substackcdn.com/image/fetch/$s_!qTzE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!qTzE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!qTzE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!qTzE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca52c8-6a60-4c7a-bae7-ade45dbd91a3_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A useful contract makes uncertainty a legal destination instead of forcing the model to guess.</figcaption></figure></div><p>Here is the first design rule worth keeping: <strong>a schema should represent the failure states your application expects</strong>. Constrained decoding can only choose paths you make legal. If the contract requires a confident answer, the decoder cannot invent an abstention branch on your behalf.</p><div id="youtube2-zKO3-1JkmJI" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;zKO3-1JkmJI&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/zKO3-1JkmJI?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-constrained-decoding-makes-llm-outputs">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Sparse Attention Makes Long-Context LLMs Cheaper, and What It Misses]]></title><description><![CDATA[Full reach, sliding windows, and learned selectors turn the same prompt into three different evidence sets.]]></description><link>https://newsletter.theaiedge.io/p/how-sparse-attention-makes-long-context-llms</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-sparse-attention-makes-long-context-llms</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Wed, 16 Sep 2026 15:01:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/80097b49-e39a-4fe2-bfb2-60ed2d3e0959_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An LLM can accept a very long prompt without treating every earlier piece the same way. The model represents each piece as an internal token state. Inside each attention layer, an eligibility rule determines which earlier states are available to the current token. Only then does the layer decide how much weight to give the available ones.</p><p>That first decision is the hidden trade-off behind <strong>sparse attention</strong>. The name suggests that the model merely turns down unimportant history. In many designs, it does something more consequential: it prevents most of the history from entering the main attention calculation at all.</p><p>A late-August 2026 Transformers release added Qwen Sparse Attention, while an open-weight Qwen model built on the same block-selection idea prompted immediate questions about long-context latency and cache placement; as more models save work this way, the durable question is which evidence they stop reading.</p><p>So here is the question we will answer: <strong>When sparse attention makes a long context cheaper, what does an LLM stop looking at?</strong></p><p>The compact answer is that every attention pattern creates an eligible set of earlier token states. Full attention admits the whole past. A sliding window admits only nearby history. Content-selected sparse attention uses a cheaper scoring step to choose a small subset that can include distant history, then runs ordinary attention on that subset. Fewer eligible states mean less work, but a clue excluded at this point cannot be rescued by a larger attention weight later.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!83pM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!83pM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!83pM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!83pM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!83pM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!83pM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png" width="1942" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1186630,&quot;alt&quot;:&quot;One question token faces a long row of earlier tokens, but three gates expose all tokens, only nearby tokens, or a few selected distant tokens.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One question token faces a long row of earlier tokens, but three gates expose all tokens, only nearby tokens, or a few selected distant tokens." title="One question token faces a long row of earlier tokens, but three gates expose all tokens, only nearby tokens, or a few selected distant tokens." srcset="https://substackcdn.com/image/fetch/$s_!83pM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!83pM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!83pM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!83pM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0865d28c-0aa9-4345-ad41-2472076f01ca_1942x809.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The main attention calculation can only weigh the history that its eligibility rule exposes.</figcaption></figure></div><p>We will follow one question through all three patterns. A long incident report contains the deployed database proxy setting, <code>port 6432</code>, near the beginning. Much later, a diagnostic note mentions the default database port, <code>5432</code>. At the end, the reader asks: <strong>Which port did the incident's database proxy actually use?</strong></p><p>This is a useful test because the answer is a tiny exact value separated from the question by a lot of plausible noise. We will hold the tokens, model layer, and question fixed. Only the rule that exposes earlier states to attention will change.</p><h2>Attention makes two decisions, not one</h2><p>An LLM processes text as <strong>tokens</strong>, which are words or pieces of words converted into numerical states. At one layer, every token state is transformed into three useful roles.</p><p>Every token produces all three. When the layer updates the current token, its <strong>query</strong> represents what information it is seeking. The current token and earlier tokens provide <strong>keys</strong>, which can be compared with that query, and <strong>values</strong>, the information that can be carried forward. The query-key comparisons become weights; the weighted values become the context added to the current token's state. The diagram focuses on earlier sources, but causal attention also allows the current token to attend to 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_!jp_y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jp_y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!jp_y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!jp_y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!jp_y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!jp_y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png" width="1942" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1050096,&quot;alt&quot;:&quot;A current token becomes a query, earlier token states supply keys and values, and query-key scores control which values are mixed into context.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A current token becomes a query, earlier token states supply keys and values, and query-key scores control which values are mixed into context." title="A current token becomes a query, earlier token states supply keys and values, and query-key scores control which values are mixed into context." srcset="https://substackcdn.com/image/fetch/$s_!jp_y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!jp_y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!jp_y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!jp_y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F854442c8-dbe4-43fd-813c-2bdea8e64620_1942x809.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The query asks, keys are compared, and values carry information forward.</figcaption></figure></div><p>There is a prerequisite hiding before those comparisons. An attention rule supplies a mask or selection pattern that says which keys and values are eligible. A future token is ineligible in a causal language model because generation cannot look ahead. Sparse patterns add more exclusions among the past.</p><p>It helps to separate two questions:</p><ol><li><p><strong>Eligibility:</strong> may the current token connect to this earlier state?</p></li><li><p><strong>Importance:</strong> among eligible states, how much weight should this one receive?</p></li></ol><p>Full, windowed, and content-selected attention mainly differ on the first question. Once a subset is eligible, the main attention operation can still compare queries with keys and mix values in the familiar way.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_eVw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_eVw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!_eVw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!_eVw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!_eVw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!_eVw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1347856,&quot;alt&quot;:&quot;A two-stage diagram first masks candidate token states as eligible or excluded, then assigns attention weights only to the eligible states.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A two-stage diagram first masks candidate token states as eligible or excluded, then assigns attention weights only to the eligible states." title="A two-stage diagram first masks candidate token states as eligible or excluded, then assigns attention weights only to the eligible states." srcset="https://substackcdn.com/image/fetch/$s_!_eVw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!_eVw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!_eVw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!_eVw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125b523d-f31d-41dc-9142-27299d0f1af8_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Eligibility happens before importance; excluded states never receive an attention weight.</figcaption></figure></div><p>Apply that distinction to our incident report. Full attention places both <code>6432</code> and <code>5432</code> in the candidate set. A four-block sliding window includes only the late diagnostic note and loses the deployed setting. A good content selector reaches back to the configuration block containing <code>6432</code>, while ignoring most of the middle.</p><p>The model still has to interpret the candidates correctly. Full attention could overweight the distracting <code>5432</code>. A selector could choose the wrong block. Eligibility does not guarantee a correct answer; it defines which answer evidence remains possible at this layer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W76c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W76c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!W76c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!W76c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!W76c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!W76c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png" width="1942" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af39ebba-1020-4699-8605-d1468b5c365b_1942x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1127772,&quot;alt&quot;:&quot;The same incident-report question sees both port values under full attention, only the late default under a window, and selected early and late evidence under content selection.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same incident-report question sees both port values under full attention, only the late default under a window, and selected early and late evidence under content selection." title="The same incident-report question sees both port values under full attention, only the late default under a window, and selected early and late evidence under content selection." srcset="https://substackcdn.com/image/fetch/$s_!W76c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 424w, https://substackcdn.com/image/fetch/$s_!W76c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 848w, https://substackcdn.com/image/fetch/$s_!W76c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 1272w, https://substackcdn.com/image/fetch/$s_!W76c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf39ebba-1020-4699-8605-d1468b5c365b_1942x809.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Changing only the eligibility pattern changes which answer evidence remains possible.</figcaption></figure></div><p>That is the first complete mental model: <strong>sparse attention saves work before importance is calculated</strong>. The rest of the article explains how each eligibility rule buys its saving, and the distinct miss it creates.</p><div id="youtube2-E_CLKTsVuE8" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;E_CLKTsVuE8&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/E_CLKTsVuE8?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-sparse-attention-makes-long-context-llms">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Four Retrieval Techniques for Video Search]]></title><description><![CDATA[Why frame rate, change detection, temporal hierarchy, and targeted rewatching fail in different ways]]></description><link>https://newsletter.theaiedge.io/p/how-ai-searches-hours-of-video-without-seeing</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/how-ai-searches-hours-of-video-without-seeing</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Mon, 14 Sep 2026 15:21:26 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/12e08956-2a68-43a6-916d-6b266d5d7d63_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Video looks like one input, but an AI cannot inspect it as one indivisible object. A two-hour recording is a sequence of changing images, sound, speech, and timestamps. Before a model can answer a question, some system has to decide which pieces of that sequence deserve space in its limited working context.</p><p>The surprising part is that a longer context window does not remove this decision. Each retained frame expands into many pieces the model must process, each second of audio adds more, and the relationships across time still have to be computed. Keeping more evidence can preserve a brief event, but it can also bury that event inside thousands of irrelevant moments.</p><p>Google's September 2026 agentic video mode now lets a model search a timeline and adjust frame rate, resolution, and modality around promising moments, making evidence selection a practical product choice rather than a hidden preprocessing detail.</p><p>So the useful question is: <strong>How can an AI answer a precise question about hours of video without placing every frame in context?</strong></p><p>The compact answer is to treat long video as a budgeted search for evidence. Fixed-rate sampling buys predictable coverage. Change-aware sampling keeps moments when the picture moves or cuts. A temporal hierarchy narrows a long recording to a few candidate intervals. Query-adaptive rewatching then spends dense frames, higher resolution, or audio only where the question needs 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_!3K6W!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3K6W!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 424w, https://substackcdn.com/image/fetch/$s_!3K6W!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 848w, https://substackcdn.com/image/fetch/$s_!3K6W!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 1272w, https://substackcdn.com/image/fetch/$s_!3K6W!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3K6W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png" width="2043" height="770" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/996c8990-8097-419c-998b-fab946454f22_2043x770.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:770,&quot;width&quot;:2043,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1308991,&quot;alt&quot;:&quot;A two-hour warehouse timeline is narrowed to a tiny evidence window at 10:04.3 before selected frames enter an evidence packet.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A two-hour warehouse timeline is narrowed to a tiny evidence window at 10:04.3 before selected frames enter an evidence packet." title="A two-hour warehouse timeline is narrowed to a tiny evidence window at 10:04.3 before selected frames enter an evidence packet." srcset="https://substackcdn.com/image/fetch/$s_!3K6W!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 424w, https://substackcdn.com/image/fetch/$s_!3K6W!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 848w, https://substackcdn.com/image/fetch/$s_!3K6W!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 1272w, https://substackcdn.com/image/fetch/$s_!3K6W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F996c8990-8097-419c-998b-fab946454f22_2043x770.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Long-video understanding begins by deciding which tiny part of the timeline deserves detailed inspection.</figcaption></figure></div><p>We will follow one realistic request through all four techniques. A warehouse camera records aisle 7 for two hours. A worker enters at 10:00. A red forklift first touches shelf B at 10:04.3, then backs away. The question is not merely whether both objects appeared. It is: <strong>When did the forklift first touch the shelf after the worker entered?</strong></p><p>That wording matters. The answer needs an identity, an order, and a brief physical relation. A transcript may confirm that a worker called for help. A single frame may show the forklift beside the shelf. Only a short sequence can establish the first contact.</p><div id="youtube2-YJyhrfID9u0" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;YJyhrfID9u0&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/YJyhrfID9u0?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>A video becomes a budgeted evidence packet</h2><p>A <strong>frame</strong> is one still image from the video timeline. In a common transformer-based path, a vision encoder splits that image into patches and converts the patches into numerical representations the language model can process. I will call those representations <strong>visual tokens</strong>. One frame is therefore not one token; it expands into a small field of spatial evidence.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!udbN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!udbN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 424w, https://substackcdn.com/image/fetch/$s_!udbN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 848w, https://substackcdn.com/image/fetch/$s_!udbN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 1272w, https://substackcdn.com/image/fetch/$s_!udbN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!udbN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png" width="2020" height="778" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:778,&quot;width&quot;:2020,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1170456,&quot;alt&quot;:&quot;One warehouse video frame is divided into image patches and converted into many visual tokens aligned to a timestamp.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="One warehouse video frame is divided into image patches and converted into many visual tokens aligned to a timestamp." title="One warehouse video frame is divided into image patches and converted into many visual tokens aligned to a timestamp." srcset="https://substackcdn.com/image/fetch/$s_!udbN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 424w, https://substackcdn.com/image/fetch/$s_!udbN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 848w, https://substackcdn.com/image/fetch/$s_!udbN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 1272w, https://substackcdn.com/image/fetch/$s_!udbN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ebea03d-0ad5-4465-b004-0952a2058e1f_2020x778.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A frame expands into multiple visual tokens, so retaining one more image consumes more than one context position.</figcaption></figure></div><p>Video adds a second requirement. The model must connect what appears in one frame with what changes in later frames. That temporal relationship distinguishes "forklift near shelf" from "forklift moves toward shelf, makes contact, then reverses." The model's attention mechanism can compare retained visual tokens across time, but it cannot reconstruct a moment that the input pipeline never kept.</p><p>Audio and transcripts form separate evidence streams. Audio preserves nonverbal signals such as a metallic impact. A transcript is cheaper to search and excellent for spoken names or instructions, but it omits silent motion. Timestamps align the streams so a clue in one can point to a region in another.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eKqq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eKqq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!eKqq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!eKqq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!eKqq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!eKqq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1124673,&quot;alt&quot;:&quot;Frames, audio, and transcript appear as aligned evidence tracks connected by shared timestamps.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Frames, audio, and transcript appear as aligned evidence tracks connected by shared timestamps." title="Frames, audio, and transcript appear as aligned evidence tracks connected by shared timestamps." srcset="https://substackcdn.com/image/fetch/$s_!eKqq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!eKqq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!eKqq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!eKqq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F342bd03d-9eae-4c21-8509-de128b053d32_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Timestamps let a clue in one modality point the system toward evidence in another.</figcaption></figure></div><p>Now imagine sampling the warehouse video once each second. The system keeps frames at 10:04.0 and 10:05.0. The actual touch at 10:04.3 may fall between them. Raising the rate to ten frames per second makes the event much more likely to appear, but it multiplies the visual evidence for the entire two-hour recording.</p><p>This is the first useful insight: <strong>temporal detail is purchased with context.</strong> The family of techniques differs mainly in who decides where to spend that detail, and when.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ha22!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ha22!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Ha22!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Ha22!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Ha22!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ha22!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png" width="1774" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1255990,&quot;alt&quot;:&quot;The same long video is represented with sparse low-detail samples or dense high-detail samples under a fixed context budget.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same long video is represented with sparse low-detail samples or dense high-detail samples under a fixed context budget." title="The same long video is represented with sparse low-detail samples or dense high-detail samples under a fixed context budget." srcset="https://substackcdn.com/image/fetch/$s_!Ha22!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!Ha22!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!Ha22!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!Ha22!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7f5a07-d2a6-4e54-81cb-8b8046b99118_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Temporal detail is purchased with context, so the budget must be concentrated somewhere.</figcaption></figure></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/how-ai-searches-hours-of-video-without-seeing">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Deep Dive: How AI Text Watermarks Work]]></title><description><![CDATA[How a language model leaves a detectable pattern in its word choices, and why copying the text preserves it.]]></description><link>https://newsletter.theaiedge.io/p/deep-dive-how-ai-text-watermarks</link><guid isPermaLink="false">https://newsletter.theaiedge.io/p/deep-dive-how-ai-text-watermarks</guid><dc:creator><![CDATA[Damien Benveniste]]></dc:creator><pubDate>Fri, 11 Sep 2026 15:01:39 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9cab6be4-8baf-4906-97b3-93cf6ae2c7f7_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An AI text watermark leaves detectable evidence in the words a model chooses. During generation, a secret scoring rule helps select the next piece of text. Later, a detector with the matching key can reconstruct that rule and check whether the finished passage agrees with it unusually often.</p><p>The surprising part is that an exact copy into a plain-text document can preserve the evidence. There is no hidden character to carry along. The ordinary words preserve the choices.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kh9x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kh9x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!kh9x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!kh9x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!kh9x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kh9x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png" width="1536" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1147291,&quot;alt&quot;:&quot;An exact copy of the support reply preserves the same six reconstructed scores, shown separately from the text.&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An exact copy of the support reply preserves the same six reconstructed scores, shown separately from the text." title="An exact copy of the support reply preserves the same six reconstructed scores, shown separately from the text." srcset="https://substackcdn.com/image/fetch/$s_!kh9x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!kh9x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!kh9x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!kh9x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9458877f-92ec-44ef-8db7-4451d6f5c850_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The dots are a detector overlay. Copying the same text preserves the inputs to that check.</figcaption></figure></div><p>If you use AI to draft, proofread, or rewrite, the distinction matters: those operations leave different amounts of freedom for a watermark. And when someone says a passage was &#8220;detected,&#8221; the test matters too. A keyed watermark check measures a deliberately introduced pattern; it does not infer AI use from a writer's style.</p><div id="youtube2-x8SIojReCHI" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;x8SIojReCHI&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/x8SIojReCHI?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>
      <p>
          <a href="https://newsletter.theaiedge.io/p/deep-dive-how-ai-text-watermarks">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>