<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anuj Sadani</title>
    <description>The latest articles on DEV Community by Anuj Sadani (@anuj-sadani).</description>
    <link>https://dev.to/anuj-sadani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4202888%2F6844b643-7509-49b0-8798-eade0d8a416b.png</url>
      <title>DEV Community: Anuj Sadani</title>
      <link>https://dev.to/anuj-sadani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anuj-sadani"/>
    <language>en</language>
    <item>
      <title>Open Weights, Closed Economics: What It Might Cost to Self-Host Amazon Ergo</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sat, 05 Dec 2026 11:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/open-weights-closed-economics-what-it-might-cost-to-self-host-amazon-ergo-442d</link>
      <guid>https://dev.to/anuj-sadani/open-weights-closed-economics-what-it-might-cost-to-self-host-amazon-ergo-442d</guid>
      <description>&lt;p&gt;A transparent 10 RPS cost model compares Amazon Bedrock pricing with an illustrative B200 self-hosting fleet for Amazon Ergo.&lt;/p&gt;

&lt;p&gt;This is an adapted edition of the original article. It preserves the section argument and evidence; use the source link for the published version and any interactive material.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tech.anujsadani.in/open-weights-closed-economics-amazon-ergo/" rel="noopener noreferrer"&gt;Read the original article&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does “open weights” make accessible?
&lt;/h2&gt;

&lt;p&gt;Amazon describes Ergo as an open-weights mixture-of-experts model. Its announcement lists 1.1 trillion total parameters, 55 billion active parameters per token, a one-million-token context window, and a 128,000-token maximum output. The Hugging Face Transformers documentation shows a loading path for &lt;code&gt;Amazon-FMR/Ergo&lt;/code&gt;. These facts establish that the weights are accessible; they do not establish that most organizations can operate the model economically. &lt;a href="https://www.aboutamazon.com/amazon-ergo" rel="noopener noreferrer"&gt;Amazon’s model announcement&lt;/a&gt; · &lt;a href="https://huggingface.co/docs/transformers/model_doc/ergo" rel="noopener noreferrer"&gt;Transformers Ergo documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Open weights” also does not mean “no conditions.” Amazon's FAQ says a separate written agreement is required when a company offers Ergo (or a customized version) as a model-as-a-service API or hosted endpoint and the company plus affiliates exceeds $20 million gross revenue in any consecutive 12-month period. Check the current license and acceptable-use policy before commercial deployment. This is a licensing condition on larger hosted-service operators; it does not make Ergo AWS-exclusive. Also check the checkpoint formats and confirm that the chosen runtime supports the architecture and quantization format you intend to use. &lt;a href="https://aws.amazon.com/products/ergo/" rel="noopener noreferrer"&gt;Amazon's license FAQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon publishes three official checkpoint formats on Hugging Face: MXFP4 at 626 GB, MXFP8 at 1.17 TB, and BF16 at 2.22 TB. For B200 hardware, SGLang's current guide lists eight GPUs for MXFP4 and MXFP8, and sixteen for BF16. It also lists a four-GB300 MXFP4 configuration and two DGX Station systems with host-backed experts. These are checkpoint download sizes and runtime topologies, not an end-to-end memory or cost quote for a production workload. The guide notes that only routed experts are quantized in the MXFP4 and MXFP8 checkpoints, while some other tensors remain in native precision. &lt;a href="https://huggingface.co/Amazon-FMR/Ergo" rel="noopener noreferrer"&gt;Amazon’s official checkpoints&lt;/a&gt; · &lt;a href="https://docs.sglang.io/cookbook/autoregressive/Amazon/Ergo" rel="noopener noreferrer"&gt;SGLang’s Ergo deployment and sizing guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The published sizes are a better basis than multiplying total parameters by nominal bits per parameter, but they still are not throughput benchmarks. A serving deployment also needs room for KV cache, runtime buffers, activations, and communication. MoE models activate only some experts per token, but a serving system still needs to make the relevant expert weights available. “55B active” therefore should not be read as “only 55B parameters need to be stored.”&lt;/p&gt;

&lt;h2&gt;
  
  
  What workload are we estimating?
&lt;/h2&gt;

&lt;p&gt;The model uses a steady 10 requests per second. Each request carries 4,000 input tokens and generates 1,000 output tokens on average. This is a workload assumption, not a claim about a typical customer’s traffic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Requests&lt;/strong&gt;: &lt;strong&gt;Derivation:&lt;/strong&gt; 10 × 730 hours × 3,600 seconds; &lt;strong&gt;Monthly value:&lt;/strong&gt; 26.28 million&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input tokens&lt;/strong&gt;: &lt;strong&gt;Derivation:&lt;/strong&gt; 26.28M × 4,000; &lt;strong&gt;Monthly value:&lt;/strong&gt; 105.12 billion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output tokens&lt;/strong&gt;: &lt;strong&gt;Derivation:&lt;/strong&gt; 26.28M × 1,000; &lt;strong&gt;Monthly value:&lt;/strong&gt; 26.28 billion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input rate&lt;/strong&gt;: &lt;strong&gt;Derivation:&lt;/strong&gt; 10 × 4,000; &lt;strong&gt;Monthly value:&lt;/strong&gt; 40,000 tokens/sec&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output rate&lt;/strong&gt;: &lt;strong&gt;Derivation:&lt;/strong&gt; 10 × 1,000; &lt;strong&gt;Monthly value:&lt;/strong&gt; 10,000 tokens/sec&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 730-hour month follows the common cost-estimation convention; it is not an exact calendar month. The model treats the output average as including whatever reasoning tokens are billed or generated. Real traffic may have longer prompts, variable output lengths, retries, tool calls, bursts, and cache hits. Those details can move the result substantially.&lt;/p&gt;

&lt;h2&gt;
  
  
  What would a managed Bedrock bill look like?
&lt;/h2&gt;

&lt;p&gt;The Amazon Bedrock model card lists global cross-region standard rates of &lt;strong&gt;$1 per million input tokens&lt;/strong&gt; and &lt;strong&gt;$3 per million output tokens&lt;/strong&gt;. It lists US cross-region rates of $1.10 and $3.30 respectively. Cache reads are listed separately at $0.03 per million tokens for global cross-region inference. Prices and availability can change, so check the live pricing page before using this estimate for a decision. &lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html" rel="noopener noreferrer"&gt;AWS model card and pricing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the global rates, without cache discounts or cache-write costs:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;105,120 million input tokens × $1.00 = $105,120
 26,280 million output tokens × $3.00 =  $78,840
                                      ---------
                                        $183,960 per 730-hour month
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That equals &lt;strong&gt;$0.007 per request&lt;/strong&gt; for this exact 4,000-in/1,000-out token mix. This is token-metered service cost only. It omits application infrastructure, networking, observability, taxes, and any other charges. The US cross-region rate pair would make the same token volume &lt;strong&gt;$202,356&lt;/strong&gt; before other charges.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a self-hosting estimate require?
&lt;/h2&gt;

&lt;p&gt;The key unknown is not parameter count. It is the &lt;strong&gt;sustained aggregate throughput per serving replica while meeting the desired latency target&lt;/strong&gt;. A single-stream speed figure does not answer that question. Aggregate throughput depends on prompt prefill, concurrent sequences, batching, context lengths, quantization, KV-cache use, software kernels, and the latency SLO.&lt;/p&gt;

&lt;p&gt;To avoid pretending this unknown is known, the table below varies it. Each hypothetical replica is one eight-B200 &lt;code&gt;p6-b200.48xlarge&lt;/code&gt; instance. AWS lists 1,432 GiB of aggregate GPU memory for this instance and currently lists a US Capacity Blocks rate of &lt;strong&gt;$113.666 per instance-hour&lt;/strong&gt;. The monthly calculation is 730 hours at that rate. Capacity Blocks are a particular purchase option; this is not a universal on-demand quote, and actual availability, commitments, and other purchasing terms matter. &lt;a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ac.html" rel="noopener noreferrer"&gt;EC2 instance specifications&lt;/a&gt; · &lt;a href="https://aws.amazon.com/ec2/capacityblocks/pricing/" rel="noopener noreferrer"&gt;Capacity Blocks pricing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The estimate assumes 70% target utilization and one spare replica for N+1 redundancy:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;active replicas = ceil(10,000 output tokens/sec ÷ (replica throughput × 0.70))
total replicas  = active replicas + 1 spare
GPU bill        = total replicas × $113.666/hour × 730 hours
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The eight-GPU replica choice matches SGLang's listed minimum NVIDIA footprint for the MXFP4 checkpoint on B200. The estimate still assumes that each replica can sustain the scenario's stated aggregate output throughput, that 70% is a sustainable target after satisfying latency requirements, and that a spare replica is enough redundancy. The runtime guide's topology is not evidence for those throughput assumptions; none of the throughput rows below is a measured Ergo benchmark.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftech.anujsadani.in%2Fopen-weights-closed-economics-amazon-ergo%2Fcharts%2Fmonthly-cost-scenarios.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftech.anujsadani.in%2Fopen-weights-closed-economics-amazon-ergo%2Fcharts%2Fmonthly-cost-scenarios.png" alt="Estimated monthly B200 Capacity Blocks cost at different assumed aggregate output throughputs per replica, compared with the $183,960 Bedrock token estimate. All throughput values are hypothetical; GPU costs exclude non-GPU infrastructure and staffing." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chart 1. Sensitivity to assumed replica throughput. The horizontal line is the Bedrock token estimate for the same modeled traffic. See the table for exact values.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;500&lt;/strong&gt;: &lt;strong&gt;Active + spare replicas:&lt;/strong&gt; 29 + 1 = 30; &lt;strong&gt;B200 GPUs:&lt;/strong&gt; 240; &lt;strong&gt;Monthly GPU bill:&lt;/strong&gt; $2,489,285&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1,000&lt;/strong&gt;: &lt;strong&gt;Active + spare replicas:&lt;/strong&gt; 15 + 1 = 16; &lt;strong&gt;B200 GPUs:&lt;/strong&gt; 128; &lt;strong&gt;Monthly GPU bill:&lt;/strong&gt; $1,327,619&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2,000&lt;/strong&gt;: &lt;strong&gt;Active + spare replicas:&lt;/strong&gt; 8 + 1 = 9; &lt;strong&gt;B200 GPUs:&lt;/strong&gt; 72; &lt;strong&gt;Monthly GPU bill:&lt;/strong&gt; $746,786&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3,000&lt;/strong&gt;: &lt;strong&gt;Active + spare replicas:&lt;/strong&gt; 5 + 1 = 6; &lt;strong&gt;B200 GPUs:&lt;/strong&gt; 48; &lt;strong&gt;Monthly GPU bill:&lt;/strong&gt; $497,857&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5,000&lt;/strong&gt;: &lt;strong&gt;Active + spare replicas:&lt;/strong&gt; 3 + 1 = 4; &lt;strong&gt;B200 GPUs:&lt;/strong&gt; 32; &lt;strong&gt;Monthly GPU bill:&lt;/strong&gt; $331,905&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10,000&lt;/strong&gt;: &lt;strong&gt;Active + spare replicas:&lt;/strong&gt; 2 + 1 = 3; &lt;strong&gt;B200 GPUs:&lt;/strong&gt; 24; &lt;strong&gt;Monthly GPU bill:&lt;/strong&gt; $248,929&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the 3,000-token/s scenario, adding a flat 15% planning allowance for non-GPU costs gives &lt;strong&gt;about $572,536 per month&lt;/strong&gt;, or approximately &lt;strong&gt;$0.0218 per request&lt;/strong&gt;. The 15% is only a placeholder—not an AWS estimate—and it is not a substitute for pricing storage, networking, load balancing, logging, support, engineering, and disaster recovery individually. The GPU-only estimate is already about 2.71 times the modeled Bedrock token bill; with that placeholder it is about 3.11 times. Even the most optimistic throughput row shown—10,000 aggregate output tokens per second per replica—leaves a GPU-only bill of about $249,000 per month. These scenarios do not prove that no one can make self-hosting work; they show that the economics depend on throughput far beyond any result established in this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftech.anujsadani.in%2Fopen-weights-closed-economics-amazon-ergo%2Fcharts%2Fcost-per-request.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftech.anujsadani.in%2Fopen-weights-closed-economics-amazon-ergo%2Fcharts%2Fcost-per-request.png" alt="For the modeled 10 RPS, 4,000-input/1,000-output workload, estimated Bedrock token cost is $0.007 per request. The six-replica self-hosted scenario is about $0.019 per request for GPUs alone and $0.022 with an illustrative 15 percent allowance." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chart 2. Per-request comparison at the 3,000 output tok/s-per-replica assumption. The self-hosted figures are allocated monthly fleet cost divided by modeled monthly requests; they are not a metered customer price.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What do the estimates leave out?
&lt;/h2&gt;

&lt;p&gt;They leave out the hardest operational questions. Can the chosen runtime load the current Ergo checkpoint in the intended format? Does the model fit with the KV cache and buffers at the target context lengths? Can a replica sustain the assumed aggregate decode rate while meeting time-to-first-token and inter-token latency targets under realistic prompt mixes? How quickly can a replacement instance be provisioned and warmed? These require measurements on the actual stack.&lt;/p&gt;

&lt;p&gt;The table also treats a spare replica as if it were always ready. A cold spare could take time to provision and load. Conversely, a shared fleet serving many customers may spread idle capacity and redundancy across tenants, improving economics compared with a dedicated single-tenant deployment. A deployment with strict regional failover or rolling-upgrade requirements may need more than one spare. There is no universal replica count from “10 RPS” alone.&lt;/p&gt;

&lt;p&gt;Amazon advertises Ergo at over 400 output tokens per second on Bedrock, served on Trainium3, and describes a 2,200-token/s Turbo mode in limited preview. Those are vendor-published service performance claims, not a B200 self-hosting throughput measurement. They also cannot be multiplied by request count to derive fleet capacity without knowing the measurement conditions and whether the figure is per stream or aggregate. &lt;a href="https://www.aboutamazon.com/amazon-ergo" rel="noopener noreferrer"&gt;Amazon’s performance description&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Startup latency matters as well. If a replacement replica takes minutes to acquire, load, initialize, and warm, reactive scaling cannot immediately absorb a sharp traffic spike. That does not make autoscaling useless; it means capacity planning may need warm replicas, predictive scaling, bounded queues, admission control, fallback routes, or scheduled capacity. The actual scale-out time should be measured rather than borrowed from a generic range.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is positioned to get practical value from this model?
&lt;/h2&gt;

&lt;p&gt;For a small business, the obstacle is more than buying accelerators. Someone has to deploy the distributed model, keep it loaded, manage upgrades, monitor latency, handle failures, and pay for capacity that may sit idle. The Bedrock token estimate in this article is far below the modeled cost of keeping the illustrative B200 fleet available. A small business may still use Ergo through Bedrock, but that is access to a managed AWS service rather than an independently operated open-weight model.&lt;/p&gt;

&lt;p&gt;For a startup, the same infrastructure can be difficult to finance before demand is predictable. A startup also needs engineering time for inference operations, capacity planning, and reliability. If the reason to choose an open-weight model is to gain control or lower costs, those benefits have to outweigh the operational burden.&lt;/p&gt;

&lt;p&gt;Large companies can afford more infrastructure, but their requirements are not simply “more of the same.” They may need multi-region availability, failure isolation, compliance controls, large traffic peaks, high concurrency, and consistent latency across services. The single-region, one-spare fleet in this estimate is a simplified starting point, not that kind of production footprint. Larger operators may solve the problem through custom fleets or pooled infrastructure, but doing so is a separate systems and economics challenge.&lt;/p&gt;

&lt;p&gt;This is why a smaller open-weight model that performs very well on one or two relevant benchmarks can be more valuable to many users than a much larger model with broader capability. If it runs on a manageable number of accelerators—or even commodity hardware—then a small business or startup can actually test, adapt, and serve it. Benchmark wins alone are not enough; task quality, license, latency, and total cost still matter. But a model that fits the user's operating budget and deployment skill is useful in a way a downloadable checkpoint may not be.&lt;/p&gt;

&lt;p&gt;Ergo is not available only on AWS. Amazon publishes the weights on Hugging Face, says customers can run or fine-tune them on another cloud or their own infrastructure, and points to SGLang and vLLM support. As of this draft's research date, OpenRouter also lists multiple inference hosts for Ergo alongside Amazon Bedrock. This separates two kinds of availability: the model weights and compatible serving software are available beyond AWS, while Bedrock is Amazon's directly managed API and integrated enterprise offering. &lt;a href="https://aws.amazon.com/products/ergo/" rel="noopener noreferrer"&gt;Amazon’s deployment FAQ&lt;/a&gt; · &lt;a href="https://huggingface.co/Amazon-FMR/Ergo" rel="noopener noreferrer"&gt;Hugging Face model card&lt;/a&gt; · &lt;a href="https://openrouter.ai/amazon/ergo-1.0" rel="noopener noreferrer"&gt;Current OpenRouter provider listing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftech.anujsadani.in%2Fopen-weights-closed-economics-amazon-ergo%2Fcharts%2Faccess-paths.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftech.anujsadani.in%2Fopen-weights-closed-economics-amazon-ergo%2Fcharts%2Faccess-paths.png" alt="Diagram comparing the self-hosted path from Hugging Face weights through SGLang or vLLM with the hosted API path through Bedrock or other inference providers." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Diagram. Open weights create a self-hosting route; hosted APIs trade some control for less infrastructure work.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;AWS may still be especially well placed to capture value from Ergo. It can aggregate demand, manage capacity, and expose the model through Bedrock at token prices that are lower than the dedicated-fleet scenario modeled here. That makes the API a more accessible route for customers while keeping this managed path inside AWS. My interpretation is that this could be a win for AWS even though self-hosting and third-party inference are also possible. It is an inference about the business model, not evidence of Amazon’s stated intent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should you measure before committing?
&lt;/h2&gt;

&lt;p&gt;Run a representative benchmark before choosing a fleet size. Record aggregate prefill and decode throughput separately; time to first token; inter-token latency; p50, p95, and p99 request latency; KV-cache occupancy; errors and out-of-memory events; and performance across prompt and output-length buckets. Include concurrent requests and burst traffic, not just a single prompt loop.&lt;/p&gt;

&lt;p&gt;Then time a cold start from the storage path you will use, repeat it with local caching, and test scale-out while requests are arriving. Measure the cost of warm idle capacity and the behavior during failure, draining, rolling upgrades, and fallback. Finally, compare the resulting cost per successful task—not only cost per generated token—with the managed API at current region-specific rates.&lt;/p&gt;

&lt;p&gt;Open weights reduce a real barrier: the model is not confined to one hosted endpoint. That is valuable, and in Ergo's case the weights and compatible runtimes are available beyond AWS. But practical value depends on who can run it, at what scale, and for what price. For many small businesses and startups, I suspect a smaller open-weight model with strong results on the tasks they actually need would be more useful. For enterprises, the managed Bedrock API may still be the more realistic way to consume Ergo—and that could make the release a strategic win for AWS despite the broader deployment options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method and limitations
&lt;/h2&gt;

&lt;p&gt;Prices were checked on 2026-12-05. The Bedrock comparison uses global cross-region standard token rates and no cache benefit. The self-hosting scenarios use the listed US Capacity Blocks rate for a p6-b200.48xlarge, 730 hours/month, 70% utilization, and one spare instance. Replica throughputs are sensitivity assumptions, not observations. No Ergo self-hosting benchmark was run for this article. Taxes, discounts, support, storage, networking, staffing, and disaster recovery are excluded or represented only by the clearly labeled illustrative allowance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.aboutamazon.com/amazon-ergo" rel="noopener noreferrer"&gt;Amazon: Introducing Amazon Ergo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html" rel="noopener noreferrer"&gt;AWS: Amazon Ergo model card, features, and pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ac.html" rel="noopener noreferrer"&gt;AWS: EC2 accelerated computing instance specifications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/ec2/capacityblocks/pricing/" rel="noopener noreferrer"&gt;AWS: EC2 Capacity Blocks for ML pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://huggingface.co/docs/transformers/model_doc/ergo" rel="noopener noreferrer"&gt;Hugging Face Transformers: Ergo model documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.sglang.io/cookbook/autoregressive/Amazon/Ergo" rel="noopener noreferrer"&gt;SGLang: Amazon Ergo checkpoint formats and deployment sizing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openrouter.ai/amazon/ergo-1.0" rel="noopener noreferrer"&gt;OpenRouter: current Amazon Ergo inference providers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://tech.anujsadani.in/open-weights-closed-economics-amazon-ergo/" rel="noopener noreferrer"&gt;Read the original on Anuj Sadani | Tech&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Best Open-Source Tools for AI-Drawn Architecture Diagrams to Know Before 2027</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:55:04 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/best-open-source-tools-for-ai-drawn-architecture-diagrams-to-know-before-2027-jfm</link>
      <guid>https://dev.to/anuj-sadani/best-open-source-tools-for-ai-drawn-architecture-diagrams-to-know-before-2027-jfm</guid>
      <description>&lt;p&gt;&lt;em&gt;Eight open-source tools that let a coding agent draw your architecture: what each one solves, what it is missing, and when to use it.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Architecture diagrams go out of date. Updating them is manual work, nobody has time for it, and a few months later the diagram describes a system that no longer exists. A wrong diagram is worse than no diagram, because people still trust it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What These Tools Solve
&lt;/h2&gt;

&lt;p&gt;They let a coding agent such as Claude Code, Codex or Cursor draw the diagram for you, from a prompt or from the code itself. The better ones go further: they protect the edits you make by hand, or they tell you when the diagram no longer matches the code.&lt;/p&gt;

&lt;p&gt;Not every tool tries to do all of that. They fall into three groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Draw it well.&lt;/strong&gt; A polished diagram for a post, a deck or a review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Draw it live.&lt;/strong&gt; You and the agent work on the same canvas in one session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep it current.&lt;/strong&gt; The diagram lives in the repo and has to follow the code for months.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every version, license and star count below is from each repository's latest commit, checked on 28 November 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. diagram-design
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; An agent skill that turns a plain-language request into one self-contained HTML file with inline SVG. &lt;a href="https://github.com/cathrynlavery/diagram-design" rel="noopener noreferrer"&gt;cathrynlavery/diagram-design&lt;/a&gt;, v2.6.181, MIT, about 74,500 stars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; AI-generated diagrams usually look generic. This one gives the agent a written design system, so the output looks like it came from a designer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;52 diagram types, from architecture and sequence diagrams to quadrants and fishbones.&lt;/li&gt;
&lt;li&gt;A strict editorial style: one accent colour, 1px lines, no shadows, everything on a 4px grid, with CI checks for overlaps and contrast.&lt;/li&gt;
&lt;li&gt;Brand onboarding: give it your website and later diagrams use your colours and fonts.&lt;/li&gt;
&lt;li&gt;Redraws existing draw.io, Mermaid, Excalidraw and PlantUML files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; Its own README is clear about this. The same prompt can produce a different layout twice, and the output is not an editable source: nothing to diff in a pull request, no canvas to drag. For diagrams that change every sprint, the README recommends Mermaid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you need one diagram to publish.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Archify
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; An agent skill that turns an idea, plan or repository into an interactive HTML page. &lt;a href="https://github.com/tt-a1i/archify" rel="noopener noreferrer"&gt;tt-a1i/archify&lt;/a&gt;, v3.3.2, Apache-2.0 (earlier releases MIT), about 101,000 stars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; Explaining a system to someone else. It builds pages you can click through, not a single static picture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;10 diagram types, one-page "explainer" answers, story walkthroughs exported as 1080p video, and PR walkthroughs.&lt;/li&gt;
&lt;li&gt;Architecture Diagnosis for JS/TS, Python, Java, Go, Rust, C and C++: dependency cycles, tight coupling, complexity hotspots and layer-rule breaks, each linked to the source. Paired with a diagram, it shows issue counts per component, including dependencies the diagram is missing.&lt;/li&gt;
&lt;li&gt;Source evidence on repository-backed nodes, pinned to a commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; The diagram is a delivered artifact. Diagnosis can tell you the diagram is out of date, but only when you ask for it; nothing keeps the diagram current between runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you need to understand a codebase or walk someone through it.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Excalidraw MCP (official)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; The Excalidraw team's MCP App. It streams a hand-drawn diagram straight into the chat, in Claude, ChatGPT, VS Code and other clients that support MCP Apps. &lt;a href="https://github.com/excalidraw/excalidraw-mcp" rel="noopener noreferrer"&gt;excalidraw/excalidraw-mcp&lt;/a&gt;, v0.3.2, MIT, about 5,700 stars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; Getting a quick sketch without leaving the conversation. Nothing to install if you use the hosted server at &lt;code&gt;mcp.excalidraw.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The diagram draws itself in the chat with smooth camera movement, and opens fullscreen for editing.&lt;/li&gt;
&lt;li&gt;Simple model interface: the model gets a format reference (&lt;code&gt;read_me&lt;/code&gt;) and one drawing tool (&lt;code&gt;create_view&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Checkpoints, and a share link to excalidraw.com.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; The diagram lives in the chat, not in your repo. The model cannot edit one element at a time; it re-sends the scene. Nothing connects the drawing to your code. The last commit was in March 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you want a sketch in the middle of a conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. mcp_excalidraw
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; A community MCP server, CLI and agent skill that gives a coding agent a live Excalidraw canvas. &lt;a href="https://github.com/yctimlin/mcp_excalidraw" rel="noopener noreferrer"&gt;yctimlin/mcp_excalidraw&lt;/a&gt;, v2.2.0, MIT, about 2,700 stars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; One-shot diagrams come out with clipped labels and overlapping arrows. Here the agent can look at its own result and fix it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;27 MCP tools to create, read, update and delete single elements, plus align, distribute, group and lock.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;describe_scene&lt;/code&gt; and &lt;code&gt;get_canvas_screenshot&lt;/code&gt;, so the agent sees what it drew.&lt;/li&gt;
&lt;li&gt;Named snapshots with rollback, Mermaid conversion, and &lt;code&gt;.excalidraw&lt;/code&gt; export to commit next to your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; The canvas is in memory unless you set &lt;code&gt;EXCALIDRAW_DATA_DIR&lt;/code&gt;. Its REST and WebSocket APIs have no authentication; the README says to keep it on 127.0.0.1. Nothing links a shape to the code it describes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you want to build a diagram with the agent, live, in Excalidraw.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. zumen
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; A diagrams-as-code tool: one YAML file is the source of truth, with a small desktop editor and an MCP server. &lt;a href="https://github.com/meta-taro/zumen" rel="noopener noreferrer"&gt;meta-taro/zumen&lt;/a&gt;, v0.7.0, MIT, about 1 star.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; When the AI redraws a diagram, it throws away your manual fixes. zumen stops that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Positions you set go in a &lt;code&gt;pins:&lt;/code&gt; block that the AI is not allowed to write.&lt;/li&gt;
&lt;li&gt;Every AI change arrives as a diff. Nothing changes until a person presses apply.&lt;/li&gt;
&lt;li&gt;Its README reports that 10 of 10 real AI round trips kept every human edit, and that pins survived regeneration in 427 of 427 example drawings.&lt;/li&gt;
&lt;li&gt;A validator with 176 checks, a Git merge driver, and a GUI limited to the eight operations needed to approve or reject changes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# pins is the human-only channel. The AI must never write here.
&lt;/span&gt;&lt;span class="na"&gt;pins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;reception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;x:&lt;/span&gt; &lt;span class="mi"&gt;240&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;y:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="na"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;reception&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Reception&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; It does not look at your code, so it cannot tell when the diagram is wrong. Its own README says layouts become unreadable past about 30 nodes. It is general purpose, from subway maps to dental charts, not built for software architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you edit diagrams together with an AI and need your edits to stay.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. OpenFlowKit
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; A local-first diagram app (browser and CLI) with a text DSL, a canvas and an MCP server. &lt;a href="https://github.com/openflowkit/openflowkit" rel="noopener noreferrer"&gt;openflowkit/openflowkit&lt;/a&gt;, v2.2.0, MIT, about 1,000 stars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; Diagrams drawn from memory are guesses. OpenFlowKit draws from the repository and shows where each part comes from.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Map mode: give it &lt;code&gt;owner/repo&lt;/code&gt; and it draws the system, with the &lt;code&gt;file:line&lt;/code&gt; behind every arrow.&lt;/li&gt;
&lt;li&gt;Text and canvas are the same diagram. Imports Mermaid, Structurizr and D2.&lt;/li&gt;
&lt;li&gt;29 MCP tools, including &lt;code&gt;discover_architecture&lt;/code&gt;, &lt;code&gt;drift_report&lt;/code&gt; and &lt;code&gt;explain_element&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A GitHub Action that comments on pull requests with the diagram diff and drift.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; Its docs are upfront about the drift check: it matches by element name and technology only, so a renamed service looks like a deletion plus an addition. There is no watcher; you re-run discovery yourself. The Action runs on pull requests that change diagram files, so a pull request that changes only code does not trigger it by default. Agent edits on the canvas apply directly, each as one undo step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you want a diagram generated from the code, with sources you can click.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. drawio-skill
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; An agent skill and CLI (&lt;code&gt;diagramctl&lt;/code&gt;) that produces editable &lt;code&gt;.drawio&lt;/code&gt; files from prompts and from real sources. &lt;a href="https://github.com/Agents365-ai/drawio-skill" rel="noopener noreferrer"&gt;Agents365-ai/drawio-skill&lt;/a&gt;, v3.5.0, MIT, about 11,000 stars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; Regenerating a diagram from code wipes out the layout you tuned. Its &lt;code&gt;sync&lt;/code&gt; command updates the diagram and keeps the layout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Imports from Python, JS/TS, Go and Rust code, Terraform, Kubernetes, docker-compose, SQL, OpenAPI, AsyncAPI, Protobuf and GraphQL.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sync&lt;/code&gt; keeps positions and styles, adds new parts below the canvas, shows removals as faded red, and writes to a new file for review. When you and the source both changed the same label, it keeps yours and reports a conflict.&lt;/li&gt;
&lt;li&gt;Architecture rules as CI tests: internet-to-database access, cycles, orphans, trust boundaries.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/diagramctl.py sync architecture.drawio ./infra \
  --from terraform -o architecture.next.drawio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt; Sync only knows what its importers can parse: imports and infrastructure, not the component boundaries a person decided on. Native export needs the draw.io desktop app. The surface is large, with eleven CLI subcommands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; your architecture is your infrastructure code or your import graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. design-loop
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is.&lt;/strong&gt; A typed design map stored in the repo (&lt;code&gt;.design/&lt;/code&gt;), with an MCP server for the agent, a CLI and a local viewer for the human, and a Claude Code Stop hook. &lt;a href="https://github.com/asadani/design-loop" rel="noopener noreferrer"&gt;asadani/design-loop&lt;/a&gt;, MIT, 0 stars, first published in November 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem it solves.&lt;/strong&gt; The diagram falls behind the code during normal agent work, and nobody notices until it is wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each node cites the folders or files it describes, and stores a hash of that code.&lt;/li&gt;
&lt;li&gt;The agent can read the map and propose changes. It has no tool to apply them. A person applies or rejects each proposal in the CLI or the viewer.&lt;/li&gt;
&lt;li&gt;Positions live in a &lt;code&gt;pins.yaml&lt;/code&gt; the agent cannot write (the same idea as zumen).&lt;/li&gt;
&lt;li&gt;After every agent turn, the Stop hook checks the code and raises signals:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cite-moved     code a node cites changed since the map last matched it
cite-missing   a cited path no longer exists
uncovered      new code in a watched folder that no node covers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there is a signal, the agent is stopped once and asked to propose an update.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good at.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The check runs on every agent turn without anyone asking, and every change waits for a person.&lt;/li&gt;
&lt;li&gt;The project's own benchmark replays 195 real commits of gopass (June to November 2026) in 13 checkpoints, two of them controls with no architectural change. It reports that the signals flagged 35 of 42 architectural changes with 2 false alarms, and that an agent updating the map fixed 31 of 33 drift cases in the checkpoint they appeared, across three runs, with nothing changed on the controls.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Missing.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Very new, with no users or stars yet. The benchmark is the author's own, on one Go repository, three runs per setup.&lt;/li&gt;
&lt;li&gt;A new dependency inside an existing file does not trigger a signal; in the benchmark the agent drew only 44 to 50% of new dependencies.&lt;/li&gt;
&lt;li&gt;The automatic check is a Claude Code hook. Other MCP clients get the map and proposals, but not the per-turn check.&lt;/li&gt;
&lt;li&gt;The viewer is basic: no polished layout or styling. Reviewing every proposal is extra work on each change.&lt;/li&gt;
&lt;li&gt;It maps architecture only, with no other diagram types.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use it when&lt;/strong&gt; you work with a coding agent every day and want the architecture map to stay current, with every change reviewed by you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Side by Side
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Group&lt;/th&gt;
&lt;th&gt;Stored as&lt;/th&gt;
&lt;th&gt;Linked to code?&lt;/th&gt;
&lt;th&gt;Human approves changes?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;diagram-design&lt;/td&gt;
&lt;td&gt;draw well&lt;/td&gt;
&lt;td&gt;HTML + SVG&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;n/a, one-shot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Archify&lt;/td&gt;
&lt;td&gt;draw well&lt;/td&gt;
&lt;td&gt;interactive HTML&lt;/td&gt;
&lt;td&gt;source pinned, on ask&lt;/td&gt;
&lt;td&gt;n/a, artifact&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Excalidraw MCP&lt;/td&gt;
&lt;td&gt;draw live&lt;/td&gt;
&lt;td&gt;chat widget&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mcp_excalidraw&lt;/td&gt;
&lt;td&gt;draw live&lt;/td&gt;
&lt;td&gt;live canvas&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no, agent edits directly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;zumen&lt;/td&gt;
&lt;td&gt;keep current&lt;/td&gt;
&lt;td&gt;YAML + pins&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;yes, diff then apply&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenFlowKit&lt;/td&gt;
&lt;td&gt;keep current&lt;/td&gt;
&lt;td&gt;DSL / .openflow.json&lt;/td&gt;
&lt;td&gt;file:line on arrows&lt;/td&gt;
&lt;td&gt;no, undo step per edit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;drawio-skill&lt;/td&gt;
&lt;td&gt;keep current&lt;/td&gt;
&lt;td&gt;.drawio + IR&lt;/td&gt;
&lt;td&gt;via importers&lt;/td&gt;
&lt;td&gt;sync writes a new file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;design-loop&lt;/td&gt;
&lt;td&gt;keep current&lt;/td&gt;
&lt;td&gt;YAML + hashed cites&lt;/td&gt;
&lt;td&gt;checked every turn&lt;/td&gt;
&lt;td&gt;yes, propose then apply&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Where This Is Heading in 2027
&lt;/h2&gt;

&lt;p&gt;Today, three of these tools can compare a diagram with the code: OpenFlowKit's &lt;code&gt;drift_report&lt;/code&gt;, drawio-skill's &lt;code&gt;sync&lt;/code&gt; and Archify's diagnosis. Two make a person approve every AI change: zumen and design-loop. Only design-loop does both, and it is also the newest and least proven of the eight. I expect checking against the code and keeping a human in charge of changes to be what these tools compete on in 2027, more than how the first diagram looks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Short Version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For a diagram to publish: diagram-design. To explain a codebase: Archify.&lt;/li&gt;
&lt;li&gt;For a quick sketch in chat: Excalidraw MCP. To build one live with the agent: mcp_excalidraw.&lt;/li&gt;
&lt;li&gt;To keep diagrams current: drawio-skill for infrastructure and import graphs, OpenFlowKit for code-cited maps, zumen when your manual edits must survive, design-loop when you want the code checked every agent turn and every change approved by you.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Test Whether Your Documentation Helps Someone Understand</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:41:21 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/how-to-test-whether-your-documentation-helps-someone-understand-4o4a</link>
      <guid>https://dev.to/anuj-sadani/how-to-test-whether-your-documentation-helps-someone-understand-4o4a</guid>
      <description>&lt;p&gt;A reader spending ten minutes on an explanation might be learning carefully, struggling, or leaving the tab open. Reading time alone cannot tell you which.&lt;/p&gt;

&lt;p&gt;If the goal is understanding, ask the reader to do something that requires it: trace a request, identify a failure boundary, or choose where a change belongs. Then retain the answer and explain how it was scored.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/asadani/comprehension-bench" rel="noopener noreferrer"&gt;Comprehension Bench&lt;/a&gt; is a local tool for organizing that kind of small comparison. The shipped study is synthetic. It demonstrates the bookkeeping without claiming that one explanation actually teaches better than another.&lt;/p&gt;

&lt;h2&gt;
  
  
  Begin with a task and a rubric
&lt;/h2&gt;

&lt;p&gt;The example compares two artifact conditions, ordinary documentation and an interactive explanation, using three tasks about a document preview flow. Participants have pseudonymous IDs and explicit assignments.&lt;/p&gt;

&lt;p&gt;A reviewer scores submitted answers against declared rubric items. Scores need a rationale, and later corrections append a revision rather than erasing the earlier observation.&lt;/p&gt;

&lt;p&gt;This makes an important distinction visible: the participant's answer is an observation; the reviewer's score is an interpretation of it. Keeping both lets someone inspect the reasoning behind a summary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preserve the missing work
&lt;/h2&gt;

&lt;p&gt;A participant can be assigned a task but never start it. Another can start without submitting. A submitted answer can remain unscored. A scored answer can receive zero.&lt;/p&gt;

&lt;p&gt;Those states are different data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;What it contributes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Never started&lt;/td&gt;
&lt;td&gt;An expected observation that is still missing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Started, not submitted&lt;/td&gt;
&lt;td&gt;An incomplete attempt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Submitted, unscored&lt;/td&gt;
&lt;td&gt;An answer awaiting review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scored zero&lt;/td&gt;
&lt;td&gt;A completed scoring observation with a zero value&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Dropping incomplete rows makes a study look more complete than it is. Replacing missing scores with zero changes the meaning of the result. The tool retains the expected participant-by-task grid so those choices remain inspectable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect the synthetic summary
&lt;/h2&gt;

&lt;p&gt;Use Python 3.11 or newer, with no third-party runtime dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/asadani/comprehension-bench.git
&lt;span class="nb"&gt;cd&lt;/span&gt; comprehension-bench
&lt;span class="nv"&gt;out_dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(mktemp -d)"&lt;/span&gt;

python -m comprehension_bench validate fixtures/study.json

python -m comprehension_bench summarize fixtures/study.json \
  --ledger fixtures/completed-run.json \
  --out &lt;span class="s2"&gt;"$out_dir/summary.json"&lt;/span&gt;

python -m comprehension_bench &lt;span class="kd"&gt;export&lt;/span&gt; fixtures/study.json \
  --ledger fixtures/completed-run.json \
  --out &lt;span class="s2"&gt;"$out_dir/observations.csv"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The summary contains all twelve expected primary rows. For the documentation condition's request-tracing task, the fixture combines a manually scored &lt;code&gt;3/4&lt;/code&gt; with an explicit &lt;code&gt;0/4&lt;/code&gt;. Its mean normalized score is therefore &lt;code&gt;0.375&lt;/code&gt; across two scored observations.&lt;/p&gt;

&lt;p&gt;That number is an arithmetic example, not an experimental finding. Every participant, answer, timestamp, and score in the bundled study is demonstration data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Account for practice and repeated exposure
&lt;/h2&gt;

&lt;p&gt;If someone answers the same question after reading a second explanation, they have also encountered the question before. They may remember their earlier answer or have learned what the task asks.&lt;/p&gt;

&lt;p&gt;Comprehension Bench labels first, practice, and repeat attempts. Primary summaries use first attempts by default and retain information about earlier exposure. These labels make a potential interpretation problem visible; they do not remove it through a statistical correction.&lt;/p&gt;

&lt;p&gt;The study definition is also bound to its ledger through a hash of canonical JSON. Changing the rubric or assignments changes that binding, while changing whitespace does not. A revised study needs a separate ledger rather than silently reinterpreting old observations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design the comparison before collecting answers
&lt;/h2&gt;

&lt;p&gt;Choose a few questions whose answers matter for the reader's actual work. Write a scoring rubric before looking at the responses. Decide how participants encounter the artifacts and how you will handle previous exposure, missing work, and score revisions.&lt;/p&gt;

&lt;p&gt;The tool does not randomize participants, grade free text automatically, establish causality, or report statistical significance. Its condition summaries average scored participant-task observations; they should not be mistaken for balanced participant-level estimates.&lt;/p&gt;

&lt;p&gt;For a small exploratory run, exact answers, visible denominators, and honest uncertainty can be more useful than a single impressive-looking score. A stronger claim about one artifact improving comprehension needs an appropriate study design and real evidence.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/asadani/comprehension-bench" rel="noopener noreferrer"&gt;MIT-licensed repository&lt;/a&gt; includes the synthetic study, ledger, recording commands, and exports. Use it to make the evaluation inspectable before treating the result as persuasive.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI disclosure: This article was drafted with AI assistance using the project source and fixtures. It is a methods walkthrough, not a report of a human-participant study.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>documentation</category>
      <category>testing</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Run a Feature Decision Table Before Writing the Implementation</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:40:34 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/run-a-feature-decision-table-before-writing-the-implementation-38l7</link>
      <guid>https://dev.to/anuj-sadani/run-a-feature-decision-table-before-writing-the-implementation-38l7</guid>
      <description>&lt;p&gt;A feature can sound settled until someone asks about a specific combination of inputs.&lt;/p&gt;

&lt;p&gt;An editor can share a document. Inactive members cannot share. What happens when an editor's membership is inactive?&lt;/p&gt;

&lt;p&gt;That question can surface in a planning meeting, during implementation, or after release. &lt;a href="https://github.com/asadani/intent-workbench" rel="noopener noreferrer"&gt;Intent Workbench&lt;/a&gt; provides a small place to examine such cases before the rules are embedded in application code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the disagreement executable
&lt;/h2&gt;

&lt;p&gt;The inputs are explicit facts such as role, visibility, and membership status. The model is a bounded decision table supplied by the team. The evaluator shows which rules match and whether they resolve to a consistent outcome.&lt;/p&gt;

&lt;p&gt;The important distinction is between a model that can be parsed and a model whose rules cover a particular case. A structurally valid table can contain conflicting behavior.&lt;/p&gt;

&lt;p&gt;For the editor with inactive membership, the bundled v1 model matches rules that produce conflicting outcomes. The evaluator returns a conflict, with the relevant rule IDs and no chosen prediction. It does not use the order of the rules to conceal the disagreement.&lt;/p&gt;

&lt;p&gt;Other outcomes need their own explanations. Missing input is different from a case where every required fact is present but no rule matches. A useful feature conversation should be able to distinguish those states.&lt;/p&gt;

&lt;h2&gt;
  
  
  Explore the conflict
&lt;/h2&gt;

&lt;p&gt;Use Python 3.11 or newer. The CLI runtime uses only the standard library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/asadani/intent-workbench.git
&lt;span class="nb"&gt;cd&lt;/span&gt; intent-workbench
&lt;span class="nv"&gt;out_dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(mktemp -d)"&lt;/span&gt;

python -m intent_workbench validate fixtures/sharing-v1.json

python -m intent_workbench evaluate fixtures/sharing-v1.json \
  --input fixtures/input.json --out &lt;span class="s2"&gt;"$out_dir/evaluation.json"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validation succeeds. Evaluation exits with status &lt;code&gt;1&lt;/code&gt;, which is expected for the deliberately conflicting case. The resulting JSON has a conflict status, a null outcome, and the matching rules.&lt;/p&gt;

&lt;p&gt;Next, compare the proposed revision against saved cases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python -m intent_workbench compare \
  fixtures/sharing-v1.json fixtures/sharing-v2.json \
  fixtures/cases.json --out &lt;span class="s2"&gt;"$out_dir/comparison.json"&lt;/span&gt;

python -m intent_workbench build fixtures/sharing-v2.json \
  --out &lt;span class="s2"&gt;"$out_dir/workbench.html"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The comparison identifies the prediction change for the editor/inactive case. The HTML output is a self-contained workbench for adjusting input values and inspecting outcomes in a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep expected behavior separate from predictions
&lt;/h2&gt;

&lt;p&gt;A rule engine can tell you what a table predicts. It cannot tell you whether the product team intended that prediction.&lt;/p&gt;

&lt;p&gt;Saved cases therefore distinguish human-confirmed expectations from model predictions. Exporting a case should not promote whichever result the evaluator happened to produce into an approved requirement.&lt;/p&gt;

&lt;p&gt;This separation is especially useful when a revision changes several cases. A team can inspect each change, agree on the intended behavior, and retain that expectation for implementation work. A changed prediction is an invitation to discuss the requirement, not an automatic update to the acceptance criteria.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use a deliberately small language
&lt;/h2&gt;

&lt;p&gt;The current rules support equality, membership, integer bounds, and conjunction across a rule's conditions. They do not contain arbitrary expressions, priorities, prose extraction, or production enforcement.&lt;/p&gt;

&lt;p&gt;That boundary keeps the table reviewable. It also means teams must supply the meaning of the inputs. If group inheritance determines membership, another system or discussion must establish that fact. The workbench does not implement the inheritance semantics itself.&lt;/p&gt;

&lt;p&gt;The model is useful only if the people responsible for the feature can inspect and accept it. A large table no one understands would move the ambiguity into a different file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bring three awkward cases to planning
&lt;/h2&gt;

&lt;p&gt;Start with one feature and a few combinations that could plausibly cause disagreement. Include a normal case, a boundary case, and a case where two rules appear to compete. Inspect the matching rules together before discussing code structure.&lt;/p&gt;

&lt;p&gt;The test of value is whether this reveals unresolved decisions early and leaves reusable, confirmed cases. A deterministic answer is easy to produce; an agreed answer is the artifact worth keeping.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/asadani/intent-workbench" rel="noopener noreferrer"&gt;MIT-licensed repository&lt;/a&gt; includes the two model revisions, case fixtures, CLI commands, and offline HTML builder.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI disclosure: This article was drafted with AI assistance using the implementation and documented examples. The sharing policy is a synthetic demonstration, not a report of a production authorization system.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>testing</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Decision Firewall: what building an AI governance framework taught me</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 22 Nov 2026 09:37:44 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/decision-firewall-what-building-an-ai-governance-framework-taught-me-k2n</link>
      <guid>https://dev.to/anuj-sadani/decision-firewall-what-building-an-ai-governance-framework-taught-me-k2n</guid>
      <description>&lt;p&gt;A refund-recovery example, measured comparisons and lessons from building Decision Firewall, an open-source reference for AI action authorization and audit.&lt;/p&gt;

&lt;p&gt;This is an adapted edition of the original article. It preserves the section argument and evidence; use the source link for the published version and any interactive material.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tech.anujsadani.in/decision-firewall-building-and-narrowing/" rel="noopener noreferrer"&gt;Read the original article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;01 / The starting problem&lt;/p&gt;

&lt;h2&gt;
  
  
  A refund is small enough to explain
&lt;/h2&gt;

&lt;p&gt;I picked subscription refunds because the facts are inspectable. A duplicate-charge claim needs two payment records. Cancellation eligibility depends on timing and usage. A prior refund reduces the amount still available.&lt;/p&gt;

&lt;p&gt;The example policy allowed verified duplicates and unused subscriptions cancelled within seven days. Eligible amounts up to ₹1,000 could proceed automatically; larger amounts needed review. A ₹10,000 daily automated limit sent excess demand to review. These were demonstration rules, with simulated payments.&lt;/p&gt;

&lt;p&gt;Here is an illustrative ₹800 duplicate refund, using the recovery contract I built. The amount is an example, not an additional benchmark result.&lt;/p&gt;

&lt;p&gt;Follow one refund through a lost response&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; 1*&lt;em&gt;Interpret the request.&lt;/em&gt;* The model classifies “I was charged twice” as a duplicate-charge claim. That supplies no proof that a second payment exists.&lt;/li&gt;
&lt;li&gt; 2*&lt;em&gt;Authorize the exact action.&lt;/em&gt;* The ledger verifies the duplicate and ₹800 remaining. Policy checks eligibility and budget. Permission binds the duplicate payment, amount and original destination to the evidence and policy versions.&lt;/li&gt;
&lt;li&gt; 3*&lt;em&gt;Dispatch, then lose the response.&lt;/em&gt;* The runtime reserves the balance and claims the authorization. The simulator records a successful refund under its idempotency key, but the caller receives no definitive outcome.&lt;/li&gt;
&lt;li&gt; 4*&lt;em&gt;Recover without a second refund.&lt;/em&gt;* The attempt stays unresolved and retains its reservation. Reconciliation asks the payment adapter about the same key, discovers success and records the outcome. It does not create a new key and try again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A timeout tells me the response is missing. It does not tell me the refund failed. That distinction survives a process restart only if the key and execution state are durable. The customer’s refund request also needs a status separate from a failed or malformed execution attempt.&lt;/p&gt;

&lt;p&gt;This is useful application engineering. A framework can package it; it does not own the idea. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/framework/executors.md" rel="noopener noreferrer"&gt;Executor contract&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;02 / How the plan grew&lt;/p&gt;

&lt;h2&gt;
  
  
  Every next layer sounded reasonable
&lt;/h2&gt;

&lt;p&gt;I wanted developers to bring their own decision models and business rules. Refunds became a domain pack, with access control and simulated deployment examples testing whether the core travelled beyond payments.&lt;/p&gt;

&lt;p&gt;Each next request sounded reasonable. Import old decisions. Keep reviewed labels separate from historical approvals. Compare policies offline. Retrieve examples without leaking evaluation data. I had LangChain’s abstractions and Langfuse’s observability experience in mind.&lt;/p&gt;

&lt;p&gt;The plan grew into history ingestion, dataset snapshots and named Python rules, with optional context retrieval and telemetry. Preparation before inference could request missing evidence before spending a model call. All of it had a plausible use.&lt;/p&gt;

&lt;p&gt;I had not yet established that another developer benefited from adopting the runtime underneath it. A coherent feature list had become my substitute for that evidence.&lt;/p&gt;
The project changed direction when the comparator changed. Scroll the map on small screens. Follow a branch: start · expand · compare · observe · repair · narrow.



&lt;p&gt;03 / What I actually built with&lt;/p&gt;

&lt;h2&gt;
  
  
  The laptop put useful limits on the design
&lt;/h2&gt;

&lt;p&gt;My GTX 1650 had 4 GB VRAM, alongside roughly 8 GB system RAM. I chose Laya for typed assessments, left Jev out, and required a fixture path that worked without model downloads. That made the control lifecycle testable before inference was available.&lt;/p&gt;

&lt;p&gt;I used Python 3.12 and Pydantic for contracts, SQLite for durable authorization state, and a separate simulated payment ledger for effects. Integer minor units kept financial arithmetic out of model output. Ed25519 signatures and canonical JSON supported verifiable audit records. Typer exposed the CLI; FastAPI and Jinja powered an optional refund inspector.&lt;/p&gt;

&lt;p&gt;The model adapter could return an assessment but held no execution credentials. Domain code resolved trusted evidence and evaluated policy. The executor owned the downstream effect. Optional OpenTelemetry export sat alongside the required local audit path.&lt;/p&gt;

&lt;p&gt;The recorded Laya run used CUDA in FP32: 28.42 seconds to load and 47.45 ms median inference across 34 assessments, including the first. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/benchmarks/post-review-refund/summary.md" rel="noopener noreferrer"&gt;The report pins the checkpoint and SDK&lt;/a&gt;. Small hardware shaped the implementation; those timings did not establish model accuracy.&lt;/p&gt;

&lt;p&gt;04 / The question I asked too late&lt;/p&gt;

&lt;h2&gt;
  
  
  Compared with what?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Is the same foot just sitting at two different places, or genuinely there is some distinction?”&lt;/p&gt;

&lt;p&gt;My question during the build conversation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I asked for numbers with and without the framework. The hard part was choosing “without.” A model directly triggering refunds is an easy opponent. A competent application already validates the ledger and handles uncertain execution.&lt;/p&gt;

&lt;p&gt;The synthetic comparison used a deliberately minimal model-directed arm and two governed arms, sharing evidence, fault schedules and a simulator with its own protections. With fixture assessments, both application controls and Decision Firewall produced zero contract-violating effects and zero unresolved attempts after recovery. The minimal arm produced 95 violating effects across 170 request trials.&lt;/p&gt;

&lt;p&gt;That established the value of controls. It did not distinguish the two ways of implementing them.&lt;/p&gt;

&lt;p&gt;On the matched straightforward-success subset, application p95 latency was 26.52 ms versus 67.89 ms for the framework. The paired median added cost was 23.23 ms across 25 pairs. The full run repeated 32 frozen scenarios five times; those repetitions measured runtime variation, not independent business situations. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/benchmarks/post-review-refund/summary.md" rel="noopener noreferrer"&gt;Refund comparison&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My next question should have been about integration effort: if both enforce the same contract, does the package make that contract easier to implement and maintain?&lt;/p&gt;

&lt;p&gt;05 / More rows, then a different question&lt;/p&gt;

&lt;h2&gt;
  
  
  A classifier cannot demonstrate authorization value
&lt;/h2&gt;

&lt;p&gt;Instead, I first asked for more data. The classification comparison accounted for 39,955 BANKING77 and Bitext source rows using a CPU naive Bayes classifier. Wrapping the same classifier left its predictions unchanged. BANKING77 official-test accuracy was 78.60% in every arm; the prepared path added 13.527 ms paired median latency.&lt;/p&gt;

&lt;p&gt;There was no consequential action to authorize. I had measured overhead on a task that could not demonstrate the central benefit. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/benchmarks/paired-public/summary.md" rel="noopener noreferrer"&gt;Full counts and separate out-of-fold results&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A later tool-use pilot used &lt;code&gt;openai/gpt-oss-20b&lt;/code&gt; through OpenRouter because Laya could not fill the conversational roles. It scheduled 90 selected τ-bench and AgentDojo episodes; 78 completed and 12 remained incomplete.&lt;/p&gt;

&lt;p&gt;On the attacked AgentDojo subset, the baseline had eight attacker successes in nine completed episodes. Both controlled arms had zero in ten, but completed the legitimate task in only four of those ten. A blocked attack and a completed user task needed separate columns. This selected development pilot was not a full-suite score. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/benchmarks/agent-pilot/summary.md" rel="noopener noreferrer"&gt;Agent pilot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;06 / Where there was supplied functionality&lt;/p&gt;

&lt;h2&gt;
  
  
  Audit was useful. Telemetry was not a free win.
&lt;/h2&gt;

&lt;p&gt;I thought audit and observability might justify reuse even when decisions matched. The application baseline needed eight explicit event call sites and four operation decorators. The framework integration supplied an observer with no application event hooks.&lt;/p&gt;

&lt;p&gt;That was supplied functionality. It also had gaps: the measured framework spans omitted the evaluation ID, policy version, disposition and reasons. The manually instrumented application exported the first three. Neither exported the sensitive canaries. Exporter failure allowed execution to continue; required local audit failure blocked it. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/benchmarks/post-review-observability/summary.md" rel="noopener noreferrer"&gt;Measured observability report&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the lost-response refund, telemetry helps locate the attempt. The durable record and downstream ledger establish what happened. I can tolerate a missing diagnostic span; I cannot safely forget the unresolved refund and release its reservation.&lt;/p&gt;

&lt;p&gt;Signed receipts add a check that recorded content has not changed under a trusted key. They do not prove that the original evidence was true. I kept that distinction, while recognising that telemetry alone did not justify adopting the whole runtime.&lt;/p&gt;

&lt;p&gt;07 / Letting another build challenge it&lt;/p&gt;

&lt;h2&gt;
  
  
  The comparison that changed the recommendation
&lt;/h2&gt;

&lt;p&gt;I had no human participants, so I commissioned a separate Claude Code agent evaluation. One builder used the framework; another implemented equivalent application controls for the same purchase-order requirements. Both then handled a policy change and an investigation.&lt;/p&gt;

&lt;p&gt;This was one paired pilot, independent of the framework builder, using the same model for both arms. It gave me a concrete integration comparison:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visible acceptance tests&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 26/26; &lt;strong&gt;Application:&lt;/strong&gt; 26/26&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Held-out acceptance tests&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 114/115; &lt;strong&gt;Application:&lt;/strong&gt; 114/115&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy-change tests&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 15/15; &lt;strong&gt;Application:&lt;/strong&gt; 15/15&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Investigation score&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 48/48; &lt;strong&gt;Application:&lt;/strong&gt; 48/48&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build tool calls&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 45; &lt;strong&gt;Application:&lt;/strong&gt; 34&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy-change tool calls&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 32; &lt;strong&gt;Application:&lt;/strong&gt; 20&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Library-contract workarounds&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 8; &lt;strong&gt;Application:&lt;/strong&gt; 0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Held-out suite time&lt;/strong&gt;: &lt;strong&gt;Framework:&lt;/strong&gt; 39.6 s; &lt;strong&gt;Application:&lt;/strong&gt; 4.5 s&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The framework required eight library-contract workarounds and seven core-change requests. The builder duplicated checks to obtain specific refusal reasons before calling it. Reuse was fighting the integration.&lt;/p&gt;

&lt;p&gt;Both failed the same held-out approval-after-outage case because the spec was ambiguous; no downstream effect occurred. The baseline’s zero workarounds refers to library contracts, not its two test/path adjustments.&lt;/p&gt;

&lt;p&gt;The 374-line spec supplied much of the lifecycle design. Investigators had downstream exports and a harness problem prevented operator-CLI use. A spend-limit interruption also affected the framework build. Tool calls are not developer hours, and these conditions limit generalisation. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/evaluations/2026-09-29/COMPARISON.md" rel="noopener noreferrer"&gt;Full comparison and deviations&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Stop feature expansion and adoption/migration claims.”&lt;/p&gt;

&lt;p&gt;The independent evaluator’s &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/evaluations/2026-09-29/COMPARISON.md" rel="noopener noreferrer"&gt;recommendation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;08 / What passing tests had missed&lt;/p&gt;

&lt;h2&gt;
  
  
  I fixed the defects without rewriting the study
&lt;/h2&gt;

&lt;p&gt;The review found four confirmed defects among 21 findings. Approval could execute against evidence the reviewer had not seen. Deactivating a rejecting reviewer could revive an older approval. Oversized integer metadata could strand an already-executed action. The repository tests missed six of nine injected runtime faults.&lt;/p&gt;

&lt;p&gt;The mutation result mattered: downstream protections had hidden missing guarantees in the layer I meant to test. A green end-to-end suite was insufficient evidence that each boundary enforced its contract.&lt;/p&gt;

&lt;p&gt;The 0.3.1 fixes bound review to the inspected evaluation, preserved rejection and handled large integers losslessly. Direct invariant tests detected all nine targeted mutations; recorded Windows verification had 298 passing tests, including 22 corrective tests. &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/verification/0.3.1/README.md" rel="noopener noreferrer"&gt;Corrective release&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I fixed the defects and kept the earlier comparison unchanged. Repairing correctness did not retroactively demonstrate easier integration.&lt;/p&gt;

&lt;p&gt;09 / Where I would spend less&lt;/p&gt;

&lt;h2&gt;
  
  
  A useful control can still be an expensive abstraction
&lt;/h2&gt;

&lt;p&gt;The global SQLite write lock still spans adapter I/O. It explains the roughly ninefold suite-time difference in the pilot, not a universal per-request slowdown. Fixing it safely would require a different concurrency and recovery design.&lt;/p&gt;

&lt;p&gt;I chose to document the limit rather than start another architecture project to rescue the adoption argument. History ingestion and model-context budgets could wait too. I had built those surrounding features before proving the central abstraction helped an unfamiliar integrator.&lt;/p&gt;

&lt;p&gt;The review exposed assumptions inside the supposedly generic interface: a message-shaped submission contract, one caller identity per runtime instance and a fixed approval lifetime. Moving code into a shared package had moved those assumptions into someone else’s application.&lt;/p&gt;

&lt;p&gt;That is the distinction I now look for. The refund needs recovery after a lost response. Whether recovery belongs in this dependency is a separate engineering decision.&lt;/p&gt;

&lt;p&gt;10 / What I kept&lt;/p&gt;

&lt;h2&gt;
  
  
  A reference implementation is a legitimate outcome
&lt;/h2&gt;

&lt;p&gt;I kept Decision Firewall as an open-source reference implementation and conformance kit. The review verified action/evidence binding and recovery without replacement dispatch. A capacity-one resource admitted exactly one dispatch across eight operating-system processes. Historical replay called neither the evidence resolver nor the executor.&lt;/p&gt;

&lt;p&gt;Those are useful behaviours to inspect in runnable code. The &lt;a href="https://github.com/asadani/decision-firewall" rel="noopener noreferrer"&gt;repository&lt;/a&gt; includes the reports and failure cases, so a builder can study the contract without accepting an adoption recommendation.&lt;/p&gt;

&lt;p&gt;Start with the model-free path using Python 3.12, the tested runtime. Activate the virtual environment for your shell before installing:&lt;/p&gt;

&lt;p&gt;Local, simulated effects only&lt;/p&gt;

&lt;p&gt;git&amp;nbsp;clone&amp;nbsp;&lt;a href="https://github.com/asadani/decision-firewall.git%5C" rel="noopener noreferrer"&gt;https://github.com/asadani/decision-firewall.git\&lt;/a&gt;&lt;br&gt;
cd&amp;nbsp;decision-firewall\&lt;br&gt;
python&amp;nbsp;-m&amp;nbsp;venv&amp;nbsp;.venv\&lt;br&gt;
#&amp;nbsp;Activate&amp;nbsp;.venv&amp;nbsp;for&amp;nbsp;your&amp;nbsp;shell,&amp;nbsp;then:\&lt;br&gt;
python&amp;nbsp;-m&amp;nbsp;pip&amp;nbsp;install&amp;nbsp;-r&amp;nbsp;requirements-core.lock\&lt;br&gt;
python&amp;nbsp;-m&amp;nbsp;pip&amp;nbsp;install&amp;nbsp;--no-deps&amp;nbsp;-e&amp;nbsp;.\&lt;br&gt;
firewall&amp;nbsp;framework&amp;nbsp;--domain&amp;nbsp;refunds&amp;nbsp;demo\&lt;br&gt;
firewall&amp;nbsp;conformance&amp;nbsp;decision_firewall.conformance_fixtures:deployments&amp;nbsp;--save&amp;nbsp;conformance.json&lt;/p&gt;

&lt;p&gt;After running it, inspect which exact action the authorization binds and how the execution attempt connects to its receipt. Then read the &lt;a href="https://github.com/asadani/decision-firewall/blob/a9b9a52/docs/framework/release-tools.md" rel="noopener noreferrer"&gt;17 declared deployment conformance checks&lt;/a&gt;: which cases pass, which are unsupported, and what the adapter must guarantee.&lt;/p&gt;

&lt;p&gt;For an application of my own, I would turn the lost-response example into a test: restart after downstream success, reconcile the original key, then assert one effect and no remaining reservation once success is resolved. Passing a happy-path refund would not answer that question. Production identity and protection against bypassing the controls still need deployment integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  October 5 follow-up: checks without the runtime
&lt;/h3&gt;

&lt;p&gt;After publishing this, someone asked whether the conformance checks could run against plain application controls without the runtime. They couldn’t. That exposed a gap in calling the project a conformance kit: running its checks still meant using my framework.&lt;/p&gt;

&lt;p&gt;I extracted a small independent package covering stale approval, duplicate effects and recovery after a lost response. In the &lt;a href="https://github.com/asadani/decision-firewall/blob/9ed7457/docs/benchmarks/independent-conformance/summary.md" rel="noopener noreferrer"&gt;new development pilot&lt;/a&gt;, both the existing application and Decision Firewall passed all three scenarios. Six deliberately injected behavioural faults, three in each implementation, were detected. These are separate results from the earlier paired study.&lt;/p&gt;

&lt;p&gt;The package needs no Decision Firewall runtime or model. From a repository checkout, in a Python 3.12 virtual environment, this runs the plain application's simulated example:&lt;/p&gt;

&lt;p&gt;Independent checks, simulated application&lt;/p&gt;

&lt;p&gt;python&amp;nbsp;-m&amp;nbsp;pip&amp;nbsp;install&amp;nbsp;./conformance\&lt;br&gt;
python&amp;nbsp;-m&amp;nbsp;control_conformance&amp;nbsp;benchmarks.control_conformance.adapters:application&amp;nbsp;--output&amp;nbsp;report.json&lt;/p&gt;

&lt;p&gt;Testing another application still takes work: its test adapter must expose the controls and an independent record of downstream effects. The &lt;a href="https://github.com/asadani/decision-firewall/blob/9ed7457/conformance/README.md" rel="noopener noreferrer"&gt;adapter guide&lt;/a&gt; defines that contract. The examples use one simulated export domain; recovery reconstructs state in a fresh interpreter, without testing an operating-system crash. Three scenarios do not establish complete conformance coverage or production safety.&lt;/p&gt;

&lt;p&gt;This doesn’t establish that the framework saves work. It makes a smaller contribution available: someone can test these behaviours without adopting my runtime. That feels like a better fit for where the evidence led me.&lt;/p&gt;

&lt;p&gt;11 / What I would change next time&lt;/p&gt;

&lt;h2&gt;
  
  
  Write the comparison before the expansion
&lt;/h2&gt;

&lt;p&gt;Next time I would build one consequential workflow and a competent application comparator before adding the developer platform. I would write down the proposed benefit first, then choose a measurement capable of finding it.&lt;/p&gt;

&lt;p&gt;If the claim is easier integration, classification accuracy cannot establish it. If the claim is faster investigation, giving both investigators an answer-bearing export makes a weak test. Several integrations and human participants would be needed to investigate human-productivity benefits.&lt;/p&gt;

&lt;p&gt;My useful contribution was pressing those questions, although I asked them late. I started by separating a model’s assessment from permission to act. I ended by separating a useful control from an unproven reason to adopt a framework.&lt;/p&gt;

&lt;p&gt;The refund still needs to survive a lost response. The library around that behaviour has to earn its place.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://tech.anujsadani.in/decision-firewall-building-and-narrowing/" rel="noopener noreferrer"&gt;Read the original on Anuj Sadani | Tech&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>opensource</category>
      <category>security</category>
    </item>
    <item>
      <title>Human, for Now: The Adjective Is Changing Sides</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 22 Nov 2026 09:34:58 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/human-for-now-the-adjective-is-changing-sides-34h5</link>
      <guid>https://dev.to/anuj-sadani/human-for-now-the-adjective-is-changing-sides-34h5</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frtfscv28kdbv9nia5480.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frtfscv28kdbv9nia5480.png" alt=" " width="800" height="1000"&gt;&lt;/a&gt;Two years ago that trailer was the interesting part. It flagged the unusual thing. I think we're close to the point where the interesting line is the other one: what did the &lt;em&gt;human&lt;/em&gt; do?&lt;/p&gt;

&lt;p&gt;Cambridge Dictionary seems to agree. On 17 November 2026 it named &lt;strong&gt;human&lt;/strong&gt; its Word of the Year. Lexicographer Colin McIntosh's reason: "AI is changing how we talk about being human." (&lt;a href="https://www.cam.ac.uk/news/cambridge-dictionary-reveals-word-of-the-year-2026" rel="noopener noreferrer"&gt;announcement&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  The adjective is changing sides
&lt;/h2&gt;

&lt;p&gt;For centuries, human creation needed no disclaimer. It was simply creation.&lt;/p&gt;

&lt;p&gt;Then AI arrived, and we labeled the exception: AI-generated, AI-written, AI-edited, AI art, AI slop.&lt;/p&gt;

&lt;p&gt;Now the exception is becoming ordinary, and the ordinary is becoming exceptional. So we're beginning to label the human: human-written, human-created, human-edited, human-reviewed.&lt;/p&gt;

&lt;p&gt;Linguists call this markedness. The default is unmarked. The exception carries the label. Nobody writes "typed" on a letter, but "handwritten" is worth saying. When the default changes, the label moves:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Assumed (no label)&lt;/th&gt;
&lt;th&gt;Labeled&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Early generative AI&lt;/td&gt;
&lt;td&gt;made by a person&lt;/td&gt;
&lt;td&gt;&lt;code&gt;AI-generated&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Now, in more places&lt;/td&gt;
&lt;td&gt;drafted with a model&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Human Authored&lt;/code&gt;, &lt;code&gt;human-reviewed&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Cambridge's own examples show it. The Authors Guild launched a "Human Authored" mark for books. Bill Gates writes about "human reserved jobs." Andy Weir wonders if he's among the last "fully human writers." In each phrase, "human" is a qualifier on something nobody used to qualify.&lt;/p&gt;

&lt;p&gt;The handwriting comparison has a limit worth stating. A typewriter changes the &lt;em&gt;method&lt;/em&gt;; the person still picks every word. A model can change the &lt;em&gt;author&lt;/em&gt;. So "human" is being asked to do a harder job than "handwritten" ever did.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Human" is four claims in one word
&lt;/h2&gt;

&lt;p&gt;When I see "human" next to AI work, it means one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Human-authored&lt;/strong&gt;: a person wrote the substance. Doesn't promise it's good.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-reviewed&lt;/strong&gt;: a person checked it. Doesn't promise they wrote any of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-loop&lt;/strong&gt;: a person has a step. Doesn't promise they could stop anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-accountable&lt;/strong&gt;: a named person answers for it. Doesn't promise they did the work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every developer has seen the gap. An approved PR can be 100% model-written. A "human-in-the-loop" pipeline can be someone clicking Approve on hundreds of items an hour. The bare adjective lets the reader assume the strongest claim.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git already solved half of this
&lt;/h2&gt;

&lt;p&gt;We've had a convention for separating roles for a long time. The Linux kernel workflow uses trailers like &lt;code&gt;Signed-off-by:&lt;/code&gt; and &lt;code&gt;Reviewed-by:&lt;/code&gt; so that writing a change and checking it are recorded separately. AI tools slotted &lt;code&gt;Co-Authored-By:&lt;/code&gt; into the same pattern.&lt;/p&gt;

&lt;p&gt;What's missing is the human side at the same precision. Something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix retry backoff in ingestion worker

Co-Authored-By: Claude Opus 5.5 &amp;lt;noreply@anthropic.com&amp;gt;
Reviewed-by: Anuj Sadani
Human-Edits: rewrote error handling, kept generated tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Human-Edits:&lt;/code&gt; isn't a git convention. I'm proposing the shape, not reporting a standard.&lt;/p&gt;

&lt;p&gt;For non-code artifacts (docs, reports, generated summaries) I'd put the same thing in a provenance block in the output spec:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;provenance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;drafted_by&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;model&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;claude-opus-5-5&lt;/span&gt;
  &lt;span class="na"&gt;authored_by_human&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;partial&lt;/span&gt;      &lt;span class="c1"&gt;# none | partial | full
&lt;/span&gt;  &lt;span class="na"&gt;human_edits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"restructured sections 2-4, rewrote conclusion"&lt;/span&gt;
  &lt;span class="na"&gt;reviewed_by&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;anuj&lt;/span&gt;
  &lt;span class="na"&gt;review_scope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"facts and sources checked; tone not reviewed"&lt;/span&gt;
  &lt;span class="na"&gt;accountable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;anuj&lt;/span&gt;               &lt;span class="c1"&gt;# a person, never a team
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two fields do most of the work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;authored_by_human: partial&lt;/code&gt; admits the middle ground where most real work lives. The adjective can't.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;review_scope&lt;/code&gt; forces the reviewer to say what they &lt;em&gt;didn't&lt;/em&gt; check. That's the part every label leaves blank.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What a real label looks like
&lt;/h2&gt;

&lt;p&gt;The Authors Guild mark is a good model because it has a process behind it. You register the work and accept a license. It covers text "fully authored by one or more human beings and not generated by AI," with a de minimis exception for spelling and grammar tools (&lt;a href="https://authorsguild.org/human-authored/usage-guidelines/" rel="noopener noreferrer"&gt;guidelines&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Threshold, registration, named exception. That's a spec. "Human-crafted" on a landing page is a sticker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Human, for now
&lt;/h2&gt;

&lt;p&gt;My bet: in routine work the label fades the way "typed" did. Nobody will tag a generated test fixture. Where provenance carries risk (production code, legal, medical, published writing) it hardens into fields and certifications, because an adjective can't say &lt;em&gt;partial&lt;/em&gt; and can't name a reviewer.&lt;/p&gt;

&lt;p&gt;We used to label what machines could do. Now we're labeling what humans still do. The useful version of that label won't live in the copy. It'll live in the metadata.&lt;/p&gt;

&lt;p&gt;Perhaps the biggest sign of AI becoming normal isn't that we stop calling it artificial. It's that we start calling ourselves human.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Drafted with AI assistance. The argument, the edits and the responsibility for every claim are mine. Long-form version with tables on &lt;a href="https://tech.anujsadani.in/human-word-of-the-year/" rel="noopener noreferrer"&gt;my site&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>writing</category>
      <category>git</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Meter Is Not the Money</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 01 Nov 2026 23:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/the-meter-is-not-the-money-51kg</link>
      <guid>https://dev.to/anuj-sadani/the-meter-is-not-the-money-51kg</guid>
      <description>&lt;p&gt;A payments company bought a router for a price it never disclosed, and its chief executive justified it by calling tokens the central currency of companies building with AI. The company being bought does not agree in the only place that counts: its own documentation says the credit balance is denominated in US dollars. A token is a meter reading, not a unit of account, and every AI credit that ships is a conversion layer over dollars.&lt;/p&gt;

&lt;p&gt;This is an adapted edition of the original article. It preserves the section argument and evidence; use the source link for the published version and any interactive material.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tech.anujsadani.in/the-meter-is-not-the-money/" rel="noopener noreferrer"&gt;Read the original article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;01&lt;/p&gt;

&lt;h2&gt;
  
  
  The meter is not the money
&lt;/h2&gt;

&lt;p&gt;A chief executive says tokens are a currency. His own company's products are built as though they are not.&lt;/p&gt;

&lt;p&gt;On 19 August 2026, Stripe announced it had agreed to acquire OpenRouter.&lt;sup&gt;c-001&lt;/sup&gt; The press release described the target in a single line — a platform that routes and optimizes token usage across more than four hundred models from more than eighty providers&lt;sup&gt;c-011&lt;/sup&gt; — and then handed the microphone to Patrick Collison, who explained what the company thought it was buying.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tokens are the central currency for companies building with AI, and it’s clear that the real-world economic potential will depend on making good use of scarce compute resources.&lt;sup&gt;c-009&lt;/sup&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is a good sentence, and I suspect it is the sentence that sold the deal internally. It is also wrong in a specific way that the rest of this book is about — and the strange thing is that Stripe’s own products appear to know it, because not one of them is built as though it were true.&lt;/p&gt;

&lt;p&gt;Consider the thing Stripe just paid billions for. OpenRouter runs a credit system: you load money in, you spend it down on inference. In what unit is that balance held? The documentation answers without ceremony. OpenRouter uses a credit system in which the base currency is US dollars.&lt;sup&gt;c-015&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Not tokens. Dollars.&lt;/p&gt;

&lt;p&gt;The competition does the same. Vercel’s AI Gateway sells credits too, and bases its rates on the provider’s list price, with charges deducted from a dollar balance.&lt;sup&gt;c-047&lt;/sup&gt; And Stripe’s own AI billing product, which shipped before this acquisition, is the clearest tell of all: it lets a business define an “AI Credit” and then configure how usage of each model &lt;em&gt;converts&lt;/em&gt; to credits.&lt;sup&gt;c-018&lt;/sup&gt; Converts. From one thing into a different thing, at a rate somebody has to set. That verb is carrying the entire argument.&lt;/p&gt;

&lt;p&gt;Every serious system in this market meters in tokens and settles in dollars. Nobody has built one that does otherwise, and it is not for want of ambition. &lt;strong&gt;The token is the meter. The dollar is still the money.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What a currency has to do&lt;/p&gt;

&lt;p&gt;The reason is less about finance than about measurement, and it starts with a property so basic that it usually goes unstated: a unit of account has to mean the same thing to both parties at the moment they agree to a trade.&lt;/p&gt;

&lt;p&gt;A dollar is a dollar when you commit to spend it. A kilowatt-hour is a kilowatt-hour, which is why your electricity bill works — you do not know in advance how many you will burn, but you know what one &lt;em&gt;is&lt;/em&gt;, and you know its price before you use it. That is the whole trick of a meter. The quantity floats; the unit does not.&lt;/p&gt;

&lt;p&gt;A token fails this, and it fails it in four different ways at once, none of them exotic and all of them documented by the vendors themselves in the pages they expect their own customers to read.&lt;/p&gt;

&lt;p&gt;The first is that a token’s price depends on who serves it. For open-weight models the weights and the hardware come apart: a lab publishes a model, and then dozens of companies run it on their own machines, at their own prices, with their own throughput. The output is identical. The invoice is not. OpenRouter’s routing documentation puts the spread in its own worked example — Provider A at one dollar per million tokens, Provider B at two, Provider C at three.&lt;sup&gt;c-025&lt;/sup&gt; A factor of three, for the same tokens out of the same model.&lt;/p&gt;

&lt;p&gt;The second is that you do not get to choose which of them serves you, and neither, quite, does the router. You might reasonably assume it picks the cheapest and moves on. It does not. The documented default is to load balance requests across providers, prioritizing price&lt;sup&gt;c-024&lt;/sup&gt; — balance, note, not minimize — and the balancing is probabilistic, with candidates weighted by the inverse square of their price. In the documentation’s own example that makes the cheapest provider nine times likelier to be selected than the dearest.&lt;sup&gt;c-026&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Nine times more likely still sends roughly one request in ten to a costlier supplier. The die is loaded; it remains a die. Which means that at the instant you press send, the price of that request is not yet a number — it is a distribution, and it will not collapse into a number until after the work is done.&lt;/p&gt;

&lt;p&gt;This is the load-bearing fact of the book and it is worth slowing down for, because it is stronger than the thing people usually say. The complaint is not that AI pricing is hard to predict, or that it varies by workload. It is that the price &lt;em&gt;does not exist yet&lt;/em&gt; at the moment of purchase. It gets settled afterwards, by a draw you neither control nor observe.&lt;/p&gt;

&lt;p&gt;There is a good reason for the design, and it is worth stating plainly rather than treating the nondeterminism as a flaw somebody should fix. Routing every request to the single cheapest provider would pile load onto one supplier, wreck tail latency, and hand that supplier the power to reprice at will. Spreading traffic across a price-weighted field is how a router keeps its own supply side honest. The nondeterminism is deliberate, and it is load-bearing for the market’s health. It is simply fatal to using the token as a unit of account.&lt;/p&gt;

&lt;p&gt;The third failure is that not all tokens are the same kind of token. Prompt caching lets a provider hold part of your context so that repeated calls do not reprocess it, which makes it the single largest lever on real-world inference cost — and which splits one token into several priced categories. On recent OpenAI models, cache &lt;em&gt;writes&lt;/em&gt; are charged at 1.25 times the price of the original input pricing.&lt;sup&gt;c-027&lt;/sup&gt; Cache &lt;em&gt;reads&lt;/em&gt; are charged at a quarter or a half of it, depending on the model.&lt;sup&gt;c-028&lt;/sup&gt; So a token going into the cache costs a quarter more than an ordinary input token, and the same token coming back out costs a half or a quarter of one. Same word, same model, same request, three prices, decided by which side of a cache boundary it happened to fall on.&lt;/p&gt;

&lt;p&gt;If those categories were at least consistent between vendors, a conversion table would rescue the situation. They are not, and that is the fourth failure. The same documentation records that some providers — Anthropic among them — carry a &lt;em&gt;negative&lt;/em&gt; discount on cache writes and a positive one on cache reads.&lt;sup&gt;c-029&lt;/sup&gt; A negative discount is a surcharge. One vendor’s cache write is a rebate and another’s is a penalty, with no shared sign convention to appeal to. And because caching and routing are entangled — the router pins a session to a provider only when that provider’s cache-read price beats its ordinary prompt price&lt;sup&gt;c-030&lt;/sup&gt; — the caching behavior changes the routing, which changes the price, which changes whether the caching was worth doing.&lt;/p&gt;

&lt;p&gt;Where this bites&lt;/p&gt;

&lt;p&gt;Put the four together and you arrive somewhere uncomfortable: you cannot quote a fixed price for a request before it is routed. Not because the tooling is young. Because there is no fixed price there to quote.&lt;/p&gt;

&lt;p&gt;Anyone who has tried to reconcile an AI bill has already met this, usually without having a name for it. The most honest acknowledgment I have found sits in the documentation of LiteLLM, the open-source gateway that a great many teams use to track their spend. It carries a section headed, without euphemism, “Cost does not match your provider bill?” — and beneath it a debugging workflow instructing you to align time ranges, compare token categories including cache, and then decide whether the gap is ingestion, formula, or model-map pricing.&lt;sup&gt;c-031&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Read that last clause again. Three named ways your own meter can disagree with your supplier’s, catalogued by a mature tool that does this for a living. Metering AI spend is a genuinely hard measurement problem rather than a solved one waiting on a better implementation, and the software that does it best is candid about that.&lt;/p&gt;

&lt;p&gt;The cost of getting this wrong is rarely a catastrophe. It is a slow tax, and it comes due in four places. Budgets drift, because a forecast built on average cost per token moves as the routing mix moves — and the drift is invisible, since the token count was right all along. Margins erode quietly: if you resell inference at a fixed price per unit while your own cost is a distribution, you have written somebody an option and handed it over for free. Reconciliation becomes permanent, a monthly ritual of comparing two numbers that will never agree and deciding how much disagreement is tolerable. And optimization goes after the wrong quarry, because cutting token count is not the same as cutting cost once cache reads are a quarter price and cache writes are a surcharge. Teams tune the meter when they meant to tune the bill.&lt;/p&gt;

&lt;p&gt;None of that is exotic. It is just what happens when you denominate something in a unit that will not hold still.&lt;/p&gt;

&lt;p&gt;What got built instead&lt;/p&gt;

&lt;p&gt;So the interesting question is not why nobody has minted a token currency. It is what the people closest to the problem built once they worked out that they could not.&lt;/p&gt;

&lt;p&gt;They built a conversion layer. Stripe’s billing product does not sell tokens; it lets a business define an abstract AI Credit, specify how each model’s usage converts into that unit, and then sell prepaid packs of it.&lt;sup&gt;c-018&lt;/sup&gt; The metering underneath is fine-grained enough to carry every distinction this section has been describing, segmented by model and by token type including cached tokens.&lt;sup&gt;c-019&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;That is the right architecture, and it concedes the whole argument. The credit is a synthetic unit rather than a token, with an exchange rate against real tokens that is configured per model and can be changed by whoever is selling it. The complexity does not vanish. It moves behind an interface, where one business absorbs it so that its customers never have to look at it. At the time of writing, that product was not generally available; access sat behind a waiting list.&lt;sup&gt;c-020&lt;/sup&gt; The idea has run further ahead than the shipping.&lt;/p&gt;

&lt;p&gt;If you take one thing into your own systems from this section, make it the discipline of keeping the two units apart. Store budgets in dollars and derive tokens, never the reverse — any internal system holding a budget as a token count has a bug that will stay hidden until the routing mix shifts under it. Stamp an access date on every price you rely on, because vendors reprice without changelogs and a price page is evidence about a day rather than a standing fact. Capture the cached-versus-uncached split in your own telemetry from the beginning, since retrofitting it after a surprising invoice means reprocessing logs that may never have kept the field. And decide in advance how much drift between your meter and your supplier’s you are willing to accept, then write the number down — teams that skip this end up settling it during a month-end close, where the answer gets decided by whoever is most tired.&lt;/p&gt;

&lt;p&gt;02&lt;/p&gt;

&lt;h2&gt;
  
  
  What a payments company saw
&lt;/h2&gt;

&lt;p&gt;Four reported prices, none of them disclosed, and one fee structure that explains the interest better than any of them.&lt;/p&gt;

&lt;p&gt;Nobody knows what Stripe paid for OpenRouter.&lt;/p&gt;

&lt;p&gt;That is worth stating flatly at the outset, because the number gets repeated in conversation as though it were settled, and it is not. Stripe disclosed no terms.&lt;sup&gt;c-003&lt;/sup&gt; What exists instead is four figures from four outlets, each citing a source it does not name. Bloomberg reported more than seven billion dollars.&lt;sup&gt;c-004&lt;/sup&gt; The &lt;em&gt;New York Times&lt;/em&gt;, via CNBC, put it at about \$7.5 billion, with \$1.5 billion of that allocated to OpenRouter’s founders.&lt;sup&gt;c-005&lt;/sup&gt; Semafor said eight billion.&lt;sup&gt;c-006&lt;/sup&gt; And earlier, while the talks were still running, The Information had the figure at ten billion.&lt;sup&gt;c-007&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The temptation is to average these and move on. Resist it. They are not four measurements of one quantity, and averaging them would produce a number that nobody reported and no document supports. They are snapshots of a negotiation taken at different moments by different people with different access. If you need a number for an argument, use a range and say whose it is. If your argument only works at eight billion, it is a weaker argument than you think, because eight billion is the loosest of the four.&lt;/p&gt;

&lt;p&gt;What is not in dispute is the shape of the jump. Less than three months before the acquisition, OpenRouter had raised \$113 million at a valuation of about \$1.3 billion.&lt;sup&gt;c-008&lt;/sup&gt; Whatever the closing figure, the company was worth something on the order of five to six times more in August than it had been in May, and nothing about the product had changed in the interval.&lt;/p&gt;

&lt;p&gt;One more thing was true at the time of writing and may not be by the time you read this: the acquisition had not closed. It remained subject to customary closing conditions, with the parties expecting to close within weeks.&lt;sup&gt;c-002&lt;/sup&gt; Everything in this book describes an agreed deal rather than a completed one.&lt;/p&gt;

&lt;p&gt;So the question is what the buyer saw.&lt;/p&gt;

&lt;p&gt;The shape of the take&lt;/p&gt;

&lt;p&gt;The usual answer is distribution: OpenRouter sits in front of a great deal of traffic, and traffic is valuable. That is true but incomplete, and it misses the detail that should make a payments company sit up.&lt;/p&gt;

&lt;p&gt;Look at how OpenRouter actually earns. It does not mark up inference. Its documentation is explicit that there is no markup on inference pricing, and that it charges a fee when you purchase credits instead.&lt;sup&gt;c-012&lt;/sup&gt; What you pay for tokens is what the underlying provider charges for tokens. The business is instead a percentage taken at the moment money enters the system: the published platform fee on the pay-as-you-go plan is 5.5%.&lt;sup&gt;c-013&lt;/sup&gt; For customers bringing their own provider keys the arrangement shifts but does not change character — free up to \$25,000 of list-price inference per month, then a 5% fee above that.&lt;sup&gt;c-014&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Sit with the structure rather than the numbers. A software company charges for the software. A reseller buys wholesale and sells retail, and lives on the spread. OpenRouter does neither. It passes the goods through at cost and takes a percentage of the money moved.&lt;/p&gt;

&lt;p&gt;That is a take rate. It is the economic signature of a payment processor, and it is a genuinely unusual thing to find in an infrastructure company. The fee does not scale with how much compute you consume, or how many models you call, or how many seats you have. It scales with &lt;strong&gt;how much money you put in.&lt;/strong&gt; Whether you spend that balance on one enormous batch job or ten million small requests, whether you burn it in a day or leave it sitting for a quarter, the 5.5% was collected at the door.&lt;/p&gt;

&lt;p&gt;A company whose entire business is understanding money at the door would recognize that instantly.&lt;/p&gt;

&lt;p&gt;The economics that come with it are the kind payments people find familiar. OpenRouter was reported to be generating roughly \$140 million in annualized revenue by mid-2026,&lt;sup&gt;c-016&lt;/sup&gt; with the cost of serving the routing product at 28.5% of revenue and gross margin around 70%.&lt;sup&gt;c-040&lt;/sup&gt; That margin is not the product of clever pricing on inference, because there is no pricing on inference. It is what falls out of taking a percentage of transaction value while paying only for the infrastructure that moves the transaction.&lt;/p&gt;

&lt;p&gt;The part that was already there&lt;/p&gt;

&lt;p&gt;The strongest evidence that Stripe understood this is that Stripe had already started building it.&lt;/p&gt;

&lt;p&gt;The press release says so, in a clause that reads like housekeeping and is not: since the previous year, Stripe had been working to help companies optimize their token costs and route tokens efficiently, having launched products including Token Billing.&lt;sup&gt;c-017&lt;/sup&gt; Before any of this, Stripe was already metering AI tokens as a billing primitive. It had shipped the meter. What it lacked was the thing that knows, request by request, which of eighty providers served the work and what that provider charged — and that knowledge is not something you can build from the outside, because it lives in the routing decision itself.&lt;/p&gt;

&lt;p&gt;Read the acquisition that way and it stops looking like a payments company wandering into AI infrastructure. It looks like a metering business acquiring the instrument its meter was missing.&lt;/p&gt;

&lt;p&gt;There is a further clue in how Stripe describes the difficulty. The release frames the problem not as cost but as combinatorial complexity — which model to use for which tasks, at which speed and at what price — and notes that the challenge is exacerbated by the pace at which models are released and repriced.&lt;sup&gt;c-075&lt;/sup&gt; That is a description of an unstable unit of account written by someone who has clearly stared at the problem. And the stated ambition is to help businesses maximize profitability by routing their requests intelligently and spending their tokens efficiently.&lt;sup&gt;c-010&lt;/sup&gt; Revenue and cost. Money in and money out. The two sides of a ledger, which is the one thing Stripe has always sold.&lt;/p&gt;

&lt;p&gt;Where the argument gets uncomfortable&lt;/p&gt;

&lt;p&gt;All of which supports the reading that this was a payments acquisition, and I think that reading is right. But it does not support the further claim that gets attached to it — that the token is therefore becoming a currency, and that owning the router is owning the mint.&lt;/p&gt;

&lt;p&gt;The same company that charges a payment processor’s take rate settles it in dollars. OpenRouter’s credit balance has US dollars as its base currency.&lt;sup&gt;c-015&lt;/sup&gt; The 5.5% is levied on dollars entering, not on tokens leaving. At no point in the flow does a token function as money. It functions as the thing being measured so that dollars can be moved correctly, which is exactly what a meter is for.&lt;/p&gt;

&lt;p&gt;What this section can and cannot carry&lt;/p&gt;

&lt;p&gt;Everything here about the &lt;em&gt;rationale&lt;/em&gt; comes from parties with an obvious interest in the rationale sounding coherent. A press release is a first-rate source for the fact that a deal happened and a poor one for why. Both companies had every reason to present a legible strategic story in August 2026, and neither had any reason to say that they paid a large multiple because the asset was scarce and someone else might have taken it.&lt;/p&gt;

&lt;p&gt;The take-rate structure is different, and it is why this section leans on it. That is not a story anyone told me. It is on a price page, it was there before the deal, and it would be there whether or not the acquisition made sense.&lt;/p&gt;

&lt;p&gt;What follows from it is a question rather than a conclusion. If the position is genuinely a payments position, the 5.5% should be defensible — rents at a chokepoint usually are. Section 4 tests that, and finds the picture considerably messier than the number suggests. Before that, though, it is worth understanding what the router is actually doing when it decides where your request goes.&lt;/p&gt;

&lt;p&gt;03&lt;/p&gt;

&lt;h2&gt;
  
  
  The router as price maker
&lt;/h2&gt;

&lt;p&gt;A component that selects suppliers by price, at volume, is not observing a market. It is setting one.&lt;/p&gt;

&lt;p&gt;A router looks like plumbing. Requests arrive, requests leave, and the interesting work is assumed to be happening at the ends. That framing survives right up until you notice that the router is choosing, on every single request, which supplier gets paid — and that it makes the choice on price.&lt;/p&gt;

&lt;p&gt;Once a component selects suppliers by price and controls enough volume, it stops being a passive observer of a market. Supplier revenue is now a function of the router’s weighting. That is the argument of this section, and the way to see it is to look closely at what the routing decision actually involves, because there are far more priced dimensions in it than most people building on top of it realize.&lt;/p&gt;

&lt;p&gt;More dials than anyone expects&lt;/p&gt;

&lt;p&gt;Start with the one from Section 1: provider selection weighted by the inverse square of price, so that the cheapest candidate is nine times likelier than the dearest in the documentation’s own three-provider example.&lt;sup&gt;c-026&lt;/sup&gt; That alone makes the cost of a request a distribution rather than a number.&lt;/p&gt;

&lt;p&gt;But price is only the default sort. A caller can filter on measured performance first and &lt;em&gt;then&lt;/em&gt; sort on price, and the filtering is empirical rather than advertised — OpenRouter will select hosts that have sustained at least 40 tokens per second for 90% of requests over the last five minutes, and route to the cheapest provider within that qualified group.&lt;sup&gt;c-064&lt;/sup&gt; That is a rolling five-minute window over a ninetieth percentile. The set of providers eligible to serve you changes continuously, based on how they have been performing against other people’s traffic in the last few minutes. Two identical requests, sent ninety seconds apart, can face different candidate sets and therefore different price distributions, without anything in your code changing and without any provider having announced a price change.&lt;/p&gt;

&lt;p&gt;Then consider what else carries a multiplier once you look beyond the router at the vendors underneath.&lt;/p&gt;

&lt;p&gt;Latency tolerance is priced. Amazon Bedrock offers selected models for batch inference at a 50% lower price than on-demand inference.&lt;sup&gt;c-063&lt;/sup&gt; Half price, for agreeing to wait. If your workload can tolerate a delay and you have not told anyone, you are paying twice what you need to.&lt;/p&gt;

&lt;p&gt;Geography is priced. Anthropic applies a 1.1x multiplier across all token pricing categories when a caller specifies US-only inference.&lt;sup&gt;c-060&lt;/sup&gt; Not a surcharge on a line item — a ten percent uplift across input, output, cache writes and cache reads alike. A compliance requirement, expressed as a coefficient.&lt;/p&gt;

&lt;p&gt;The cache is the economy&lt;/p&gt;

&lt;p&gt;Section 1 gave the OpenAI figures: cache writes at 1.25x input on recent models, cache reads at a quarter or a half. Those figures belong to one vendor rather than to the industry, and the others differ.&lt;/p&gt;

&lt;p&gt;Anthropic’s published table runs on three multipliers rather than two, because it sells cache duration as a product. A five-minute cache write costs 1.25x base input price. A one-hour cache write costs 2x. A cache read costs 0.1x.&lt;sup&gt;c-058&lt;/sup&gt; Bedrock, meanwhile, prices cache reads at 75% below its on-demand input price&lt;sup&gt;c-062&lt;/sup&gt; — a 0.25x multiplier, which is neither Anthropic’s 0.1x nor the 0.5x that some OpenAI models carry.&lt;/p&gt;

&lt;p&gt;Three vendors, three different discounts for the identical operation of reading a cached token. There is no convergence here and no sign of any, which means a tool that wants to predict cost across vendors cannot hold a single number for “cache read.” It has to hold a table, and keep it current, against vendors who reprice without changelogs.&lt;/p&gt;

&lt;p&gt;Anthropic, to its credit, publishes the break-even directly: caching pays off after one cache read for the five-minute duration, or after two cache reads for the one-hour duration.&lt;sup&gt;c-059&lt;/sup&gt; That is an unusually honest piece of documentation and it is worth dwelling on, because it makes the decision structure visible. Whether to cache is not a performance question with a cost side effect. It is a bet on reuse. Write to the five-minute cache and you need one hit to break even. Buy the hour and you need two. Get the reuse pattern wrong and caching costs you money — which is the opposite of how almost everyone describes caching in every other part of computing.&lt;/p&gt;

&lt;p&gt;Now couple that back to routing, because the two are not independent. A cache lives on a specific provider’s hardware. To benefit from it, subsequent requests have to reach the same provider, which is why the router pins sessions — and pins them conditionally, activating sticky routing only when the provider’s cache-read price beats its ordinary prompt price.&lt;sup&gt;c-030&lt;/sup&gt; The router is running the break-even calculation on your behalf and changing its routing policy based on the answer.&lt;/p&gt;

&lt;p&gt;The entanglement produces failure modes that look like nothing at all in a diff. Changing a model slug mid-conversation — appending a latency-oriented variant suffix, say — invalidates the sticky key.&lt;sup&gt;c-065&lt;/sup&gt; A one-word change to a configuration string, made to improve latency, silently discards a warm cache and re-routes the conversation. The latency probably does improve. The bill moves in a direction nobody predicted, because the person who made the change was reasoning about speed and the system was also reasoning about cache residency.&lt;/p&gt;

&lt;p&gt;What this makes the router&lt;/p&gt;

&lt;p&gt;Assemble the dials: price-weighted probabilistic selection, rolling throughput filters, batch tiers, geographic multipliers, three-way cache multipliers that differ per vendor, and sticky sessions that engage conditionally on a price comparison. Every one of those is a lever on what a request costs, and the router holds most of them.&lt;/p&gt;

&lt;p&gt;A component holding that many pricing levers over that much volume is not a neutral pipe. When a router weights by inverse square of price, it is not merely finding the cheap provider — it is &lt;em&gt;manufacturing&lt;/em&gt; demand elasticity. A provider that drops its price does not simply win the requests where it is cheapest; it wins a larger share of a probabilistic draw across the whole eligible set, immediately, with no sales cycle and no contract renegotiation. And a provider that raises its price does not lose its customers, because it never had customers in the retail sense. It loses weight in a distribution.&lt;/p&gt;

&lt;p&gt;That is a real market mechanism, and it is a better one than the alternative in most respects. It is also, from the perspective of anyone trying to answer “what will this cost,” an active adversary. The very properties that make the routing layer good at disciplining suppliers are the properties that make a fixed price impossible to quote.&lt;/p&gt;

&lt;p&gt;Mechanism established, magnitude not&lt;/p&gt;

&lt;p&gt;Everything above describes documented mechanism, not measured outcome. I have not seen data on how much the price distribution actually moves in practice for a typical workload, and I am not aware of any published study that measures it. It is entirely possible that for most applications the variance is small enough to ignore, and that the practical answer is to use a trailing average and stop worrying.&lt;/p&gt;

&lt;p&gt;The mechanism is certain; the magnitude is not, and nobody should take a claim about magnitude from this book, because this book does not have one.&lt;/p&gt;

&lt;p&gt;What the mechanism does establish is where the leverage sits. If a supplier’s revenue depends on a weighting function held by an intermediary, the intermediary is the most commercially valuable component in the chain — regardless of whether it charges anything for the privilege. Which raises the question the next section has to answer: given that position, what does the market actually charge for standing in it?&lt;/p&gt;

&lt;p&gt;The answer turns out to be four incompatible things at once.&lt;/p&gt;

&lt;p&gt;04&lt;/p&gt;

&lt;h2&gt;
  
  
  Who charges for standing in the middle
&lt;/h2&gt;

&lt;p&gt;Five firms, one function, and prices that range from 5.5% of everything you spend to nothing at all.&lt;/p&gt;

&lt;p&gt;If the routing layer is as valuable a position as the last two sections suggest, the market should agree on what it is worth. Markets usually do converge on a price for a well-understood function, even a contested one — card acquiring settled into a band, cloud storage settled into a band, and you can predict what a new entrant will charge to within a few basis points.&lt;/p&gt;

&lt;p&gt;The AI gateway market has not converged. It has not even nearly converged. The same function — sit between an application and a set of model providers, route the request, meter the spend — is monetized four incompatible ways by five serious companies, and the prices are not close.&lt;sup&gt;c-069&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;OpenRouter charges a share of the money you load: 5.5% on the pay-as-you-go plan.&lt;sup&gt;c-013&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Vercel charges nothing on the tokens. Its documentation states plainly that the AI Gateway charges no markup and no platform fee on tokens, with the customer paying the provider’s list price and Vercel deducting from a credit balance.&lt;sup&gt;c-021&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Portkey charges a subscription. Its production plan is \$49 a month with a quota of 100,000 recorded logs&lt;sup&gt;c-067&lt;/sup&gt; — a software license with usage-based logging, entirely decoupled from how much inference flows through it. Below that sits a permanently free tier, explicitly not suitable for production workloads.&lt;sup&gt;c-068&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Cloudflare charges nothing at all. Its AI Gateway’s core features are offered free on all plans, and the core it names is not a stub: dashboard analytics, caching, and rate limiting.&lt;sup&gt;c-066&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;And beneath all of them, LiteLLM gives the metering away as open-source software you run yourself, tracking spend for keys, users, and teams across more than a hundred models.&lt;sup&gt;c-023&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Five providers. A percentage of funds, zero, a flat monthly fee, zero again, and free source code.&lt;/p&gt;

&lt;p&gt;What a spread like that means&lt;/p&gt;

&lt;p&gt;A price dispersion this wide is not noise. It is a signal that the participants disagree about what business they are in.&lt;/p&gt;

&lt;p&gt;Take a percentage of money loaded and you have declared yourself a financial intermediary whose revenue scales with customer spend. Charge a flat subscription and you have declared yourself a software vendor whose revenue scales with customer count. Charge nothing and you have declared the gateway a feature of something else you sell — hosting, in Vercel’s case; the broader network, in Cloudflare’s. Publish the source and you have declared it infrastructure that should not be a business at all.&lt;/p&gt;

&lt;p&gt;Those are four different businesses wearing the same coat. And it means the 5.5% is not the market price for routing. It is one firm’s answer to a question the market has not settled, and it is the highest answer on the board by a wide margin — infinitely higher than three of the four alternatives, which charge nothing for the gateway itself.&lt;/p&gt;

&lt;p&gt;I want to be careful about what this does and does not establish. It does not establish that the 5.5% is doomed. Prices persist above zero-priced alternatives all the time, for reasons that are perfectly rational: switching costs, breadth of model coverage, reliability, the fact that the free options make you operate them yourself. OpenRouter’s fee buys access to a catalogue and an operational burden somebody else carries, and plenty of teams will consider that a bargain at 5.5% of spend. The presence of a free competitor does not refute a paid one; if it did, nobody would sell databases.&lt;/p&gt;

&lt;p&gt;What it does establish is that the fee is a &lt;strong&gt;business-model choice rather than a property of the position.&lt;/strong&gt;&lt;sup&gt;c-051&lt;/sup&gt; Occupying the routing layer does not entitle you to a take rate. Two of the largest firms in this list occupy the same layer and have decided the correct rent is nothing, because they monetize elsewhere and would rather have the traffic.&lt;/p&gt;

&lt;p&gt;And it complicates the payments framing from Section 2 in a specific way. A payment processor’s take rate is defensible because moving regulated money at scale is genuinely hard, genuinely licensed, and genuinely not something a competitor can give away as a loss leader. A routing fee has none of those protections. Cloudflare can zero it out on Tuesday and absorb the cost inside a network business, and there is no regulator, no license, and no settlement obligation standing in the way.&lt;/p&gt;

&lt;p&gt;The other pressure&lt;/p&gt;

&lt;p&gt;The competitive squeeze is the visible half. The other half is that the thing being charged for does not work perfectly, and its own practitioners say so.&lt;sup&gt;c-054&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Section 1 quoted LiteLLM’s documentation on reconciliation. Read in the context of this section that admission carries more weight. If metering were both hard &lt;em&gt;and&lt;/em&gt; reliable, it would be a defensible service. If it were easy and reliable, it would be a commodity but at least a working one. What the documentation describes is a capability that is available for free and does not fully work — which is close to the worst possible configuration for anyone hoping to charge rent on it.&lt;/p&gt;

&lt;p&gt;Sacra’s analysis of OpenRouter names the pressure directly, observing that open-source alternatives such as LiteLLM let enterprises self-host routing infrastructure, reducing willingness to pay for standalone routing.&lt;sup&gt;c-045&lt;/sup&gt; That is a private-market research firm modeling a company it does not have access to, so treat it as a considered opinion rather than a finding. But it is the same conclusion the price list arrives at from the other direction.&lt;/p&gt;

&lt;p&gt;Five data points are not a distribution&lt;/p&gt;

&lt;p&gt;I have five prices, gathered because they were reachable, and no systematic survey of the gateway market. There are more gateways than these — hyperscalers bundling routing into existing contracts, observability vendors extending into it, enterprise platforms building it internally. I do not know the shape of the whole distribution, only that its visible members disagree violently.&lt;/p&gt;

&lt;p&gt;A proper market survey would strengthen or overturn the argument here, and it has not been done.&lt;/p&gt;

&lt;p&gt;What can be said with the evidence in hand is narrower and still useful. The fee at this layer is contested, several well-capitalized firms have set it to zero, the underlying capability is available as free software, and that software concedes it does not always agree with the invoice. Whatever Stripe bought, it was not an uncontested toll booth.&lt;/p&gt;

&lt;p&gt;Which leads directly to the strongest argument against this entire book — the possibility that everyone involved already knows all of this, and that the routing fee going to zero was never the point.&lt;/p&gt;

&lt;p&gt;05&lt;/p&gt;

&lt;h2&gt;
  
  
  The loss leader
&lt;/h2&gt;

&lt;p&gt;The strongest case against this book, presented without a rebuttal appended, because I could not build one.&lt;/p&gt;

&lt;p&gt;Everything so far has built toward a conclusion: that the routing layer matters because it is where compute becomes a billable quantity, and that a payments company bought it for that reason. This section sets out the strongest case that the conclusion is wrong, or at least that it is right for reasons that make it far less interesting than it sounds.&lt;/p&gt;

&lt;p&gt;I am not going to answer it. I could not, with the evidence I gathered, and appending a rebuttal I cannot support would be worse than leaving it standing.&lt;/p&gt;

&lt;p&gt;The case that routing is meant to be worthless&lt;/p&gt;

&lt;p&gt;Start with the version Semafor published two days after the announcement, which is the sharpest reading of the deal I have seen anywhere.&lt;/p&gt;

&lt;p&gt;The observation is that OpenRouter’s business could be destined for commoditization, and that this is actually kind of the point.&lt;sup&gt;c-041&lt;/sup&gt; The reasoning follows from the market structure described in Section 4 rather than contradicting it. If routing collapses into finding the cheapest provider that clears a quality and reliability bar, then routing is a solved problem with a shrinking margin, and everyone in it is heading for zero. But zero is survivable — attractive, even — if you are not trying to earn there: Stripe can afford to let routing become low-margin, because it can monetize everything surrounding it, from billing and tax and fraud through to stablecoin settlement, treasury and possibly financing.&lt;sup&gt;c-042&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Take that seriously and the thesis of this book inverts. The routing layer is not the valuable position; it is the &lt;em&gt;entry point&lt;/em&gt; to a set of valuable positions, none of which is routing. Stripe does not need a take rate on inference because it has billing, tax, fraud, settlement and treasury waiting on the other side of the relationship, all of which are businesses it already knows how to run at scale. Under this reading, buying OpenRouter is buying distribution into every AI-native company’s financial stack, and the fact that the acquired product happens to route tokens is almost incidental.&lt;/p&gt;

&lt;p&gt;Notice what this does to Section 4’s argument. I presented the four-way price dispersion as a problem for the payments framing — evidence that the fee is contested and might go to zero. Semafor’s reading takes the identical fact and calls it the plan. Under this account the 5.5% is not a rent to be defended but a legacy price that a rational owner will happily compete away, because the customer relationship is worth more than the fee ever was. The same evidence, pointing the opposite direction. I do not have a way to distinguish the two from outside.&lt;/p&gt;

&lt;p&gt;The case that it is an expense-management deal&lt;/p&gt;

&lt;p&gt;The second reading is less dramatic and possibly more likely.&lt;/p&gt;

&lt;p&gt;TechCrunch noted that Stripe’s large acquisitions had historically been about helping companies collect and manage incoming money, and that this one looked different — a move to the other side of the ledger, into expense management, beginning with AI expenses.&lt;sup&gt;c-043&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;That reframes the deal as being about &lt;em&gt;cost control software&lt;/em&gt;, which is a real and large category with nothing much to do with payment rails. And the competitive evidence supports it, because that category was already filling up before Stripe arrived: Databricks developed its own AI gateway, Rippling launched one focused on employee AI spend, and Ramp launched one for AI expense management too.&lt;sup&gt;c-044&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Rippling and Ramp are not infrastructure companies. They are spend-management companies, and they built AI gateways because AI spend is a line item their customers cannot see clearly. If the natural competitor set for this product is Ramp rather than Cloudflare, then the position Stripe bought is a seat in the expense-management market, and the elaborate argument about units of account is a description of a technical problem rather than an explanation of a purchase.&lt;/p&gt;

&lt;p&gt;The uncomfortable part, for me, is that this reading explains the price better than mine does. Expense management is a proven category with known multiples and an obvious buyer synergy. Owning the settlement layer for a future compute economy is a story that requires several things to happen that have not happened yet.&lt;/p&gt;

&lt;p&gt;The case that the price was simply too high&lt;/p&gt;

&lt;p&gt;And then there is the arithmetic, which is unkind whichever story you prefer.&lt;/p&gt;

&lt;p&gt;At the figure floated during the talks, Stripe would have been paying roughly seventy times OpenRouter’s annualized revenue.&lt;sup&gt;c-038&lt;/sup&gt; Seventy times. The same reporting describes that price as high compared to other AI acquisitions when calculated as a multiple of forward revenue.&lt;sup&gt;c-039&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The defense is that the unit economics are unusually good for the category, and they are — Section 2 set out the margin structure. But a strong margin on \$140 million of revenue does not obviously justify a price several dozen times that revenue unless you believe the revenue is about to become very much larger, which brings you back to needing the strategic story to be true.&lt;/p&gt;

&lt;p&gt;There is also a piece of evidence about the buyer’s state of mind that is hard to categorize and too good to omit. A leaked letter from Stripe’s founders to investors explained the company’s operating posture by saying it had decided that 1 January marked the beginning of the singularity and it had been operating on that basis.&lt;sup&gt;c-076&lt;/sup&gt; The reporting is careful to note the phrase is tongue-in-cheek and that Patrick Collison had used it in that spirit publicly.&lt;sup&gt;c-077&lt;/sup&gt; I am not going to build an argument on a joke in a letter. But a firm operating on an explicitly stated assumption that the technological curve has gone vertical is a firm whose acquisition multiples should be read in that light, and it is at least worth knowing that the assumption was written down.&lt;/p&gt;

&lt;p&gt;What would have to be true for this book to be right&lt;/p&gt;

&lt;p&gt;Set the three counter-readings side by side and the honest position is that all of them are consistent with the evidence I have.&lt;sup&gt;c-052&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;For the argument in this book to hold, the metering-and-settlement position has to be worth more than the expense-management seat, and the router has to remain the place where the metering happens rather than being reduced to a commodity component inside somebody else’s billing stack. Neither is established. Both are assertions about a market that is roughly eighteen months old.&lt;/p&gt;

&lt;p&gt;What I can say is that the counter-arguments are about &lt;em&gt;where the value accrues&lt;/em&gt;, not about the mechanism. Nothing in this section disputes that the token is a poor unit of account, that prices are nondeterministic at submission, or that the credit is a conversion layer over dollars. Semafor, TechCrunch and PYMNTS are arguing about who captures the value created by that mess. They are not arguing that the mess is imaginary.&lt;/p&gt;

&lt;p&gt;So the mechanical claims of Sections 1 and 3 survive this section intact. The commercial claim of Section 2 — that this was a payments acquisition in the meaningful sense rather than the metaphorical one — does not survive it cleanly, and I would not want a reader to finish this book believing it had been demonstrated. It is the reading I find most persuasive. It is not the only one the facts allow.&lt;/p&gt;

&lt;p&gt;One small thing cuts the other way, and it deserves a mention because it is the only piece of post-deal evidence anyone has. OpenRouter’s own announcement commits to neutrality in unusually specific language: routing decisions will remain driven by one thing, which is what is best for the user.&lt;sup&gt;c-046&lt;/sup&gt; If routing were merely a funnel into a financial-services relationship, that commitment would be an odd thing to make and an expensive one to keep.&lt;/p&gt;

&lt;p&gt;06&lt;/p&gt;

&lt;h2&gt;
  
  
  What can be built
&lt;/h2&gt;

&lt;p&gt;Prepaid credits, gifted compute, and the regulatory line that explains why you cannot buy a friend a hundred thousand tokens.&lt;/p&gt;

&lt;p&gt;The practical question underneath all of this is whether you can sell someone a quantity of AI compute the way you can sell them a quantity of anything else. A gift card. A prepaid balance. A coffee bought for a stranger on the internet.&lt;/p&gt;

&lt;p&gt;The answer turns out to be yes, with a conversion layer, inside a closed loop — and the three qualifications are doing all the work.&lt;/p&gt;

&lt;p&gt;The unit everybody invents&lt;/p&gt;

&lt;p&gt;By now the pattern should be familiar, but it is worth seeing how far it extends, because the conversion layer is not a Stripe peculiarity. It is what everyone builds when they need a stable number.&lt;/p&gt;

&lt;p&gt;Stripe’s billing product, as established, lets a business define an AI Credit and configure how each model’s usage converts into it, then sell prepaid packs of that unit.&lt;sup&gt;c-018&lt;/sup&gt; The metering underneath tracks model and token type including cached tokens,&lt;sup&gt;c-019&lt;/sup&gt; and the product was not yet generally available at the time of writing.&lt;sup&gt;c-020&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Anthropic has already shipped the same idea, and almost nobody has noticed. When Claude is sold through the AWS or Azure marketplaces, Anthropic rates the token usage in USD at standard per-model rates, applies any negotiated discount, and converts the result to Claude Consumption Units at one cent each.&lt;sup&gt;c-061&lt;/sup&gt; A CCU is worth a penny. It exists because a cloud marketplace needs a single countable line item and cannot express a charge such as &lt;em&gt;1.25x base input price for a five-minute cache write&lt;/em&gt;, so the vendor rates everything in dollars, converts to a synthetic unit at a fixed rate, and reports a quantity.&lt;/p&gt;

&lt;p&gt;That is the whole thesis of this book, shipped as a production billing integration by a model vendor, for reasons that have nothing to do with any acquisition. Dollars are the unit of account. The synthetic unit is a presentation layer over dollars, invented because the underlying quantity would not sit still. And note the direction of the conversion — usage is rated &lt;em&gt;in USD first&lt;/em&gt;, then converted. The dollars are not derived from the units. The units are derived from the dollars.&lt;/p&gt;

&lt;p&gt;Anyone building a credit product is going to reinvent this, and should. The design question is not whether to have a conversion layer but who absorbs the risk in it. If you sell a credit today and the underlying provider reprices tomorrow, either your margin moves or your customer’s balance quietly buys less than it did. Someone eats that. Fixing the exchange rate is a promise about a price you do not control, and Section 3 is a long argument for why you should be nervous about making it.&lt;/p&gt;

&lt;p&gt;The expiry problem&lt;/p&gt;

&lt;p&gt;There is a second feature of every prepaid AI product currently shipping, and it is one customers dislike: the value goes away.&lt;/p&gt;

&lt;p&gt;OpenRouter’s terms provide for expiry of unused credits after one year of purchase.&lt;sup&gt;c-036&lt;/sup&gt; Anthropic’s gift subscriptions expire 365 days after the purchase date.&lt;sup&gt;c-035&lt;/sup&gt; These are not outliers; they are the standard shape.&lt;/p&gt;

&lt;p&gt;Flagged, not analyzed&lt;/p&gt;

&lt;p&gt;Expiry is where prepaid products stop being a pricing decision and start being a regulated one. Money taken now for a service delivered later is a liability on the seller’s balance sheet, and unredeemed value is revenue only under specific accounting conditions. Consumer protection rules in many jurisdictions constrain when prepaid value may expire and what fees may be charged against it.&lt;/p&gt;

&lt;p&gt;I gathered no sources on the accounting or the consumer-protection treatment. This is a prompt to get advice, not advice.&lt;/p&gt;

&lt;p&gt;Buying someone else compute&lt;/p&gt;

&lt;p&gt;Which brings us to the consumer version, and the reason it is harder than it looks.&lt;/p&gt;

&lt;p&gt;The patronage model is well established and boringly profitable. Buy Me a Coffee charges a 5% transaction fee, creators keep 95% of the earnings, and payouts go directly to a bank account.&lt;sup&gt;c-032&lt;/sup&gt; It is a thin layer over a payment processor, and the processor is Stripe: the platform states that payment processing is handled by Stripe and Wise.&lt;sup&gt;c-033&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;So the obvious product suggests itself. Instead of buying a writer a coffee, buy them the inference to write with. Both legs already exist and both already terminate at the same company — the patronage rail runs on Stripe, and Stripe supplies the token-metering primitive.&lt;sup&gt;c-055&lt;/sup&gt; There is no missing infrastructure.&lt;/p&gt;

&lt;p&gt;And yet nobody sells it, while two adjacent things do ship. Anthropic will sell you a gift, but the gift is a plan: you choose a tier and a duration, and the recipient receives full access to the features of the selected plan.&lt;sup&gt;c-034&lt;/sup&gt; It is a subscription with a bow on it, not a balance. You cannot gift someone eighty thousand tokens and let them spend it where they like.&lt;/p&gt;

&lt;p&gt;The reason is not technical, and I think it is not squeamishness about the product either. It is that a transferable balance spendable across unaffiliated vendors is a different kind of object in law from a subscription to one vendor’s service.&lt;/p&gt;

&lt;p&gt;The line that actually matters&lt;/p&gt;

&lt;p&gt;Here I have to correct a framing I nearly used, because it is the sort of error that survives in a book for years.&lt;/p&gt;

&lt;p&gt;The natural place to reach for is FinCEN’s guidance on stored value, which held that the agency does not currently interpret the definition of stored value to include closed system products such as a mall-wide gift card program.&lt;sup&gt;c-037&lt;/sup&gt; That is a clean statement of the closed-versus-open distinction, and it is tempting to quote and move on.&lt;/p&gt;

&lt;p&gt;It is also from 2003,&lt;sup&gt;c-056&lt;/sup&gt; the same document warns that FinCEN intends to engage in further rulemaking on the definition of stored value,&lt;sup&gt;c-057&lt;/sup&gt; and — decisively — that rulemaking happened. FinCEN’s 2011 final rule amended the Bank Secrecy Act regulations by renaming stored value as prepaid access, defining that term, and deleting the terms issuer and redeemer of stored value.&lt;sup&gt;c-070&lt;/sup&gt; The vocabulary the 2003 ruling operates in no longer exists in the regulations. The rule was framed as addressing regulatory gaps that had resulted from the proliferation of prepaid innovations over the preceding twelve years&lt;sup&gt;c-073&lt;/sup&gt; — precisely the category a cross-vendor compute credit would fall into.&lt;/p&gt;

&lt;p&gt;The 2011 regime imposes suspicious activity reporting and recordkeeping requirements on both providers and sellers of prepaid access, plus registration for providers,&lt;sup&gt;c-071&lt;/sup&gt; while exempting certain lower-risk categories from certain requirements&lt;sup&gt;c-072&lt;/sup&gt; — and it retains closed loop prepaid access as a defined category.&lt;sup&gt;c-074&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The shape of the answer is therefore visible even from outside: closed loop is treated as lower risk and carries lighter obligations; open loop does not. A gift card for one vendor’s service sits comfortably on one side of that line. A transferable balance spendable across eighty inference providers sits on the other, or at minimum sits close enough to it that you would need a lawyer before you shipped.&lt;sup&gt;c-053&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Where this book’s competence ends&lt;/p&gt;

&lt;p&gt;I have read a 2011 final rule and the definitions it amended. I have not researched the exemption thresholds in detail, state money-transmitter licensing, the CFPB’s prepaid account rules under Regulation E, the CARD Act’s gift-card provisions, or anything outside the United States. Several of those could be decisive.&lt;/p&gt;

&lt;p&gt;What I can say is narrow: the reason you cannot buy your friend a hundred thousand tokens is not that the payments plumbing is missing. It is that the object you would be selling them is a regulated instrument, and the closed-loop products that ship today are shaped the way they are because that shape avoids the question.&lt;/p&gt;

&lt;p&gt;What would change my mind&lt;/p&gt;

&lt;p&gt;The argument of this book comes down to one claim: that tokens are a meter reading, that every credit is a conversion layer over dollars,&lt;sup&gt;c-049&lt;/sup&gt; and that the interesting position is therefore the exchange desk rather than the mint.&lt;/p&gt;

&lt;p&gt;Here is what would falsify it, and what I would watch.&lt;/p&gt;

&lt;p&gt;If a vendor began quoting a &lt;strong&gt;fixed price per token guaranteed at submission time&lt;/strong&gt; — absorbing the routing variance itself, the way an insurer absorbs risk — the central mechanical claim would weaken considerably.&lt;sup&gt;c-048&lt;/sup&gt; The variance would still exist; it would simply have found someone willing to be paid to hold it, which is a real product and one I would expect to see before I expect to see a token currency.&lt;/p&gt;

&lt;p&gt;If a &lt;strong&gt;transferable, cross-vendor balance shipped and survived&lt;/strong&gt;, the argument in this section is wrong, and the constraint I have attributed to regulation was really just nobody having bothered.&lt;/p&gt;

&lt;p&gt;If the &lt;strong&gt;cache multipliers converged&lt;/strong&gt; across vendors — if 0.1x and 0.25x and 0.5x became one number the way transaction fees converged into a band — then a common unit becomes tractable, and the mess described in Section 3 turns out to have been an artifact of an immature market rather than a structural feature.&lt;/p&gt;

&lt;p&gt;And the single most informative thing, the one that costs nothing to observe: whether OpenRouter’s commitment that routing decisions will remain driven by what is best for the user holds under its new ownership.&lt;sup&gt;c-046&lt;/sup&gt; If in three years the router quietly prefers providers that settle through its parent’s rails, then the exchange desk was the point, and it was worth more than the eight billion dollars nobody will confirm was paid for it.&lt;/p&gt;

&lt;p&gt;If it does not, then Section 5 was right, and I will have written a book about the plumbing of a business that turned out to be about something else. That would be a fine outcome. The plumbing is real either way, and the bills still have to be reconciled by someone on a Tuesday afternoon, holding two numbers that do not match.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://tech.anujsadani.in/the-meter-is-not-the-money/" rel="noopener noreferrer"&gt;Read the original on Anuj Sadani | Tech&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>devtools</category>
      <category>programming</category>
    </item>
    <item>
      <title>Clone Your Voice Locally With Qwen3-TTS: Recordings, Mic Checks, and Reference Audio</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 01 Nov 2026 19:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/clone-your-voice-locally-with-qwen3-tts-recordings-mic-checks-and-reference-audio-4o2n</link>
      <guid>https://dev.to/anuj-sadani/clone-your-voice-locally-with-qwen3-tts-recordings-mic-checks-and-reference-audio-4o2n</guid>
      <description>&lt;p&gt;Qwen3-TTS can produce narration in a cloned voice offline. My first three recording sessions mostly taught me what not to trust: Bluetooth headsets and laptop microphones can cap capture at 8 kHz while the exported file still reports 48 kHz. In this workflow, four seconds of clean reference audio beat ninety seconds of poor capture.&lt;/p&gt;

&lt;p&gt;The guide focuses on recording and measurement as much as on the model, so you can diagnose the input before judging the generated voice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow the practical steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/#why-yours" rel="noopener noreferrer"&gt;Why use your own voice&lt;/a&gt;: what voice cloning adds to a personal narration workflow.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/#passage" rel="noopener noreferrer"&gt;Choose the passage&lt;/a&gt;: why the reference text affects the sample.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/#microphone" rel="noopener noreferrer"&gt;Check what the microphone captured&lt;/a&gt;: find hidden sample-rate limits instead of trusting file metadata.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/#measure" rel="noopener noreferrer"&gt;Measure before you trust the take&lt;/a&gt;: inspect the signal before running inference.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/#shorter" rel="noopener noreferrer"&gt;Use a shorter reference&lt;/a&gt;: compare a clean short clip with a longer reference.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/#pace" rel="noopener noreferrer"&gt;Check the speaking pace&lt;/a&gt;: decide whether the generated narration is usable for long listening.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://tech.anujsadani.in/clone-your-voice-qwen3-tts/" rel="noopener noreferrer"&gt;Open the complete Qwen3-TTS walkthrough&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Narrate Your Writing Locally With Kokoro: Voices, Acronyms, and Silence</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 01 Nov 2026 15:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/narrate-your-writing-locally-with-kokoro-voices-acronyms-and-silence-3dn3</link>
      <guid>https://dev.to/anuj-sadani/narrate-your-writing-locally-with-kokoro-voices-acronyms-and-silence-3dn3</guid>
      <description>&lt;p&gt;Kokoro is an 82M-parameter text-to-speech model that can make a written article listenable on a laptop. Getting a model to speak is straightforward. Getting the result to sound consistent across a long piece takes more care.&lt;/p&gt;

&lt;p&gt;This guide focuses on the practical details that changed the output: voice styles are vectors you can blend, the espeak frontend needs help with acronyms, and two silence settings matter more than another model parameter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The learning path:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/narrate-writing-kokoro/#why-local" rel="noopener noreferrer"&gt;A narration you can re-run&lt;/a&gt;: why keep the pipeline local and repeatable?&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/narrate-writing-kokoro/#blending" rel="noopener noreferrer"&gt;Voices are vectors&lt;/a&gt;: combine voice characteristics rather than switching voices abruptly.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/narrate-writing-kokoro/#acronyms" rel="noopener noreferrer"&gt;The words the model actually reads&lt;/a&gt;: handle acronyms as the speech frontend sees them.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/narrate-writing-kokoro/#silence" rel="noopener noreferrer"&gt;Silence is a parameter&lt;/a&gt;: tune pauses and pacing for an article, not a short sample.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/narrate-writing-kokoro/#caching" rel="noopener noreferrer"&gt;Re-renders should cost nothing&lt;/a&gt;: make iteration cheaper with cached segments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The piece also documents loudness, file size, and the limits of the setup. &lt;a href="https://tech.anujsadani.in/narrate-writing-kokoro/" rel="noopener noreferrer"&gt;Read the full Kokoro narration guide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Run Small AI Models on an Old GPU: Fix the Software Path First</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 01 Nov 2026 11:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/run-small-ai-models-on-an-old-gpu-fix-the-software-path-first-3m91</link>
      <guid>https://dev.to/anuj-sadani/run-small-ai-models-on-an-old-gpu-fix-the-software-path-first-3m91</guid>
      <description>&lt;p&gt;A six-year-old GTX 1650 with 4 GB of VRAM can still run small models. In my case, the obstacles were mostly software: a CPU-only PyTorch wheel, a missing PATH entry, a dtype unsupported by Turing, and a batch size that pushed data into system RAM.&lt;/p&gt;

&lt;p&gt;This field guide walks through the investigation rather than promising that every old GPU will run every workload. It is especially useful if your device appears capable on paper but your framework reports that it cannot see CUDA.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The main sections:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/#the-card" rel="noopener noreferrer"&gt;The card nobody recommends&lt;/a&gt;: establish the constraints before choosing a model.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/#driver" rel="noopener noreferrer"&gt;The driver and CPU wheel&lt;/a&gt;: check what the installed driver and PyTorch build actually support.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/#path" rel="noopener noreferrer"&gt;Why CUDA looks broken on Windows&lt;/a&gt;: verify the executable and library paths.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/#dtype" rel="noopener noreferrer"&gt;Why fp16 crashes on Turing&lt;/a&gt;: choose a precision mode the hardware can handle.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/#batch" rel="noopener noreferrer"&gt;Tune against memory, not the clock&lt;/a&gt;: avoid misleading speed measurements caused by memory spill.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/#payoff" rel="noopener noreferrer"&gt;What the old card actually does&lt;/a&gt;: see the practical result and limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The guide also covers DirectML, watchdog resets, and interrupted runs. &lt;a href="https://tech.anujsadani.in/revive-old-gpu-small-models/" rel="noopener noreferrer"&gt;Read the complete walkthrough&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Attention Invoice</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 01 Nov 2026 07:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/the-attention-invoice-58ao</link>
      <guid>https://dev.to/anuj-sadani/the-attention-invoice-58ao</guid>
      <description>&lt;p&gt;How AI slop transfers its cost to everyone else. LinkedIn's own definition is the right one: not whether a machine helped, but whether anyone exercised enough judgment to make the result worth someone else's attention. Eight chapters on what changed when generation got cheap, why detection is the wrong question, and what to do about it on Monday. Includes a downloadable designed PDF.&lt;/p&gt;

&lt;p&gt;This is an adapted edition of the original article. It preserves the section argument and evidence; use the source link for the published version and any interactive material.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tech.anujsadani.in/ai-slop/" rel="noopener noreferrer"&gt;Read the original article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;§ 01 · Definitions&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is AI Slop?
&lt;/h2&gt;

&lt;p&gt;LinkedIn now has a feedback option called “Seems like AI slop.” Open the menu on a post, choose it, and LinkedIn treats that as a signal that the post did not feel valuable. It does not remove the post or make a policy finding about its author.&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The feature is useful because it names a feeling that has become familiar. A person opens a post promising an insight about leadership, AI agents, or the future of work. The prose is smooth. The paragraphs are clean. There is a confident opening, a tidy list, and a final lesson. Then the reader reaches the end and realizes that no one has actually said anything.&lt;/p&gt;

&lt;p&gt;But the label also creates a confusion. People hear “AI slop” and infer “text that an AI wrote.” That is too broad to be useful. An AI can help a person research, outline, translate, edit, test an argument, or make a difficult idea clearer. None of those acts makes the result slop.&lt;/p&gt;

&lt;p&gt;The real question is harder: &lt;strong&gt;did someone exercise enough judgment to make this worth another person’s attention?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The distinction LinkedIn gets right
&lt;/h3&gt;

&lt;p&gt;LinkedIn’s own definition is better than the name of its button. It describes AI slop as low-effort, likely AI-generated content that sounds polished on the surface but lacks a point of view, unique perspective, or substance. It says the distinction is not how content was created, but whether it adds value and reflects a person’s perspective, experience, or expertise.&lt;sup&gt;2&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;That is the right center of gravity. The generated sentence is not the offense. The unexamined sentence is.&lt;/p&gt;

&lt;p&gt;Imagine three people publishing an article about AI agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate → publish&lt;/strong&gt;: &lt;strong&gt;What happened:&lt;/strong&gt; A model produces 1,500 words and the author pastes them into a post.; &lt;strong&gt;Slop?:&lt;/strong&gt; Usually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human idea → AI draft → human edit&lt;/strong&gt;: &lt;strong&gt;What happened:&lt;/strong&gt; The author supplies a thesis, examples, corrections, and a real rewrite.; &lt;strong&gt;Slop?:&lt;/strong&gt; Usually not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human research → AI synthesis → human judgment&lt;/strong&gt;: &lt;strong&gt;What happened:&lt;/strong&gt; The author decides which sources matter, checks the claims, and stands behind the conclusion.; &lt;strong&gt;Slop?:&lt;/strong&gt; No.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The table is intentionally about process rather than style. The visible artifact is a weak signal. A heavily directed and carefully edited piece can retain the rhythm of a model. A person can write generic, derivative, attention-seeking prose without touching an AI. Manual typing has never been a reliable measure of thought.&lt;/p&gt;

&lt;p&gt;Two articles can therefore look similar while being fundamentally different. One may be prompt, generate, publish. The other may contain an idea, reporting, context construction, criticism, correction, and verification before the final generation. A reader cannot reliably see that history from punctuation, em dashes, headings, or an AI-detection score.&lt;/p&gt;

&lt;p&gt;Calling both pieces slop because both contain generated tokens collapses authorship into keystrokes. Authorship is better understood as the work of choosing: choosing the question, the evidence, the examples, the omissions, and the words one is prepared to defend.&lt;/p&gt;

&lt;h3&gt;
  
  
  A family resemblance, not a test
&lt;/h3&gt;

&lt;p&gt;There is no settled technical definition of AI slop. A recent scholarly paper argues that it has resisted formal definition and proposes three recurring properties instead: superficial competence, asymmetric effort, and mass producibility.&lt;sup&gt;3&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Those properties explain why the phrase feels precise even when its boundary is fuzzy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Superficial competence&lt;/strong&gt; is the polished shell. The grammar works. The image looks plausible. The memo has the expected headings. Underneath, the claims are unsupported, the summary never gets specific, or the apparent conclusion is just the premise repeated in better phrasing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Asymmetric effort&lt;/strong&gt; is the production problem. It takes seconds to make a convincing-looking artifact and much longer for another person to decide whether it is accurate, useful, or original. The producer gets the convenience; the reader, reviewer, customer, or colleague inherits the verification cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mass producibility&lt;/strong&gt; is the ecosystem problem. One mediocre image or awkward paragraph is not necessarily what people mean by slop. The term becomes more apt when a system can make thousands of near-substitutes for search rankings, ad impressions, engagement, or the appearance of output. Reporting on the rise of the term has repeatedly connected it to low-quality text, images, videos, and entire sites produced cheaply for search traffic.&lt;sup&gt;4&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;None of these is a pass-fail test. A personalized surreal image can be silly and still mean something to the person who made it. A concise generated answer to a narrow question can be exactly what someone needs. The scholarly account makes this point too: so-called slop can meet demand for niche or personalized content and can carry aesthetic or social value.&lt;sup&gt;5&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;That is why “I dislike it” and “it is AI slop” should not be interchangeable. The term is most useful when it names a failure that affects someone beyond the author: an output that asks for attention, trust, or review without having been given enough thought to earn any of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  The missing word is judgment
&lt;/h3&gt;

&lt;p&gt;The usual list of tells is familiar: generic language, repeated ideas, unnecessary length, fake profundity, too many headings, confident claims with no evidence. Those are symptoms. They matter because they suggest an absence of judgment, but none proves it.&lt;/p&gt;

&lt;p&gt;A person can use every fashionable AI writing habit and still make an original, careful argument. Another can avoid every tell and publish a confident falsehood they wrote alone. The important difference is whether someone took responsibility for the content: checked what could be checked, removed what did not hold up, supplied the context a model could not know, and decided that the piece had a reason to exist.&lt;/p&gt;

&lt;p&gt;This makes a better working definition:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI slop is generated output whose cost of production has fallen much faster than the effort spent deciding whether it deserves to exist.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or, in the shortest form: &lt;strong&gt;AI slop is a failure of judgment, not a method of generation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The definition does not let every AI-assisted author off the hook. It raises the bar in the place that matters. If a model makes drafting cheap, then choosing, checking, and editing become more valuable, not less. The person who publishes the result still owns the claim.&lt;/p&gt;

&lt;h3&gt;
  
  
  The software version of the same problem
&lt;/h3&gt;

&lt;p&gt;This is not only a problem for feeds. Generative AI can produce code, documentation, tests, issue comments, design notes, and pull requests much faster than a team can understand them. The same asymmetry appears: generating an artifact is cheap; reviewing it, maintaining it, and recovering its rationale are expensive.&lt;/p&gt;

&lt;p&gt;The danger is not that AI wrote a function. A well-directed model can remove drudgery and leave more time for work that needs judgment. The danger arrives when a team measures generated volume as if it were progress, accepts code that nobody can explain, or creates documentation that no one has verified against the system it describes.&lt;/p&gt;

&lt;p&gt;That is engineering slop: artifacts that create the appearance of movement while increasing uncertainty about why they exist, whether they are correct, and who understands them. The technical debt is not simply AI-generated code. It is the gap between what the repository contains and what its humans can account for.&lt;/p&gt;

&lt;p&gt;The practical response is ordinary, even if the tools are new. Ask before publishing or merging: What is the point? What is new here? What did we verify? Who will own this when it breaks? If those questions do not have good answers, the artifact is not finished merely because it looks finished.&lt;/p&gt;

&lt;p&gt;LinkedIn’s button cannot reconstruct the invisible process behind a post. No detector can do that reliably either. But the phrase can still be useful if it reminds us what readers are reacting to: not the presence of a machine, but the absence of a mind that cared enough to decide.&lt;/p&gt;

&lt;p&gt;§ 02 · The Debate&lt;/p&gt;

&lt;h2&gt;
  
  
  The Argument About the Word
&lt;/h2&gt;

&lt;p&gt;“Slop” is a hostile word. That is part of its usefulness and part of its risk. It carries the picture of something poured into a trough: plentiful, uniform, barely worth choosing. It is not a neutral description of a production method.&lt;/p&gt;

&lt;p&gt;That matters because the word is now used for at least four different complaints. Sometimes it means false information. Sometimes it means ugly or derivative culture. Sometimes it means a volume problem: too much content competing for the same attention. And sometimes it means a moral complaint about a creator who outsourced too much of the work.&lt;/p&gt;

&lt;p&gt;Those are related, but they are not the same.&lt;/p&gt;

&lt;p&gt;A fabricated local-news story is dangerous because it can be false. A hundred perfectly grammatical product descriptions can be useless because they add no information. A strange AI video made for one family may be neither useful nor dangerous; it may simply be a new form of play. If every one of these is called slop, the word stops helping us decide what to do next.&lt;/p&gt;

&lt;p&gt;The academic account of the term is unusually careful here. It does not offer a test that separates slop from non-slop. It offers a family resemblance: superficial competence, asymmetric effort, and mass producibility.&lt;sup&gt;6&lt;/sup&gt; That is a better starting point than an AI detector because it points at the social conditions around the artifact.&lt;/p&gt;

&lt;p&gt;The boundary will remain fuzzy because value is contextual. A generated bedtime story made for one child may be cheap to create and deeply valuable to that child. A heavily researched report may use model-written sentences and still earn attention because the author made the decisive choices. The object does not announce its process.&lt;/p&gt;

&lt;p&gt;The question is therefore not “Was AI used?” It is: &lt;strong&gt;what burden did this artifact place on other people, and what care did its maker take before placing it there?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name the failure precisely.&lt;/strong&gt; Say false, repetitive, derivative, or unreviewed when that is what you mean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not make style a verdict.&lt;/strong&gt; Smooth prose is neither evidence of care nor evidence of its absence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reserve “slop” for the larger failure.&lt;/strong&gt; It is most useful when cheap output has shifted verification, attention, or cleanup onto somebody else.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;§ 03 · The Mechanism&lt;/p&gt;

&lt;h2&gt;
  
  
  When Output Became Cheap
&lt;/h2&gt;

&lt;p&gt;For most of the internet’s life, publishing imposed a small amount of friction. Someone had to write the article, make the image, record the voiceover, or assemble the page. The cost was never high enough to guarantee quality. It was high enough to force a choice.&lt;/p&gt;

&lt;p&gt;Generative systems changed the shape of that choice. They did not make judgment cheap. They made the artifacts that normally signal judgment cheap: paragraphs, illustrations, outlines, summaries, scripts, reviews, and code.&lt;/p&gt;

&lt;p&gt;That creates a predictable temptation. When the cost of production falls, the producer can run more experiments. Some experiments are good: a teacher can make an explanation for a student who needs it; a small business can translate a manual; an engineer can draft a test case. Others are attempts to capture attention at a price close to zero.&lt;/p&gt;

&lt;p&gt;Content farms have found the second use especially attractive. NewsGuard’s tracker describes thousands of unreliable AI-generated news sites operating with little or no human oversight. It reports that such sites often publish dozens of articles a day, and that programmatic advertising can reward them without regard to the quality of the site carrying the ad.&lt;sup&gt;7&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The important fact is not that the articles are machine-written. The business model does not need a reader to learn anything. It needs a page to be indexed, clicked, and shown an advertisement.&lt;/p&gt;

&lt;p&gt;This is why scale changes the moral texture of mediocre content. A weak essay asks for five minutes. Ten thousand weak essays change the cost of finding anything strong. They turn discernment into unpaid labor for everyone downstream: the reader searching, the editor reviewing, the platform ranking, the model training on the resulting web.&lt;/p&gt;

&lt;p&gt;Cheap supply does not create demand for meaning. It can, however, create a great deal of material that resembles meaning at first glance.&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Measure a publishing system by reader benefit, not artifacts shipped.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask what each item is for.&lt;/strong&gt; “To rank” and “to help a reader decide” are not interchangeable purposes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put human review where distribution is automated.&lt;/strong&gt; Scale without review is the condition in which a small quality problem becomes a public one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;§ 04 · The Limit&lt;/p&gt;

&lt;h2&gt;
  
  
  The Artifact Cannot Tell You
&lt;/h2&gt;

&lt;p&gt;A reader sees the final text. They do not see the notebook beside it, the rejected drafts, the source tabs, the fact check, or the moment someone removed a sentence because it could not be defended.&lt;/p&gt;

&lt;p&gt;This is the central difficulty in calling something AI slop. We can observe the artifact and infer from it. We cannot observe the process that produced it.&lt;/p&gt;

&lt;p&gt;The familiar tells are weak evidence. Certain transitions, an abundance of headings, em dashes, a polished but generic cadence: these may suggest a model, but they do not tell us whether an author supplied a real claim, constructed the context, or checked the result. A detector faces the same limit. Even if it identified machine-generated prose perfectly, it would identify generation, not judgment.&lt;/p&gt;

&lt;p&gt;The opposite error is equally common. A human can type every word of a vague, derivative post. The labor is real; the contribution may still be zero. We should not confuse authorship with keystrokes.&lt;/p&gt;

&lt;p&gt;Authorship is the chain of decisions that makes an artifact answerable: why this question, why these sources, why this example, why this conclusion, why now. AI can participate in that chain. It cannot remove the need for someone to own it.&lt;/p&gt;

&lt;p&gt;This is why disclosure alone is not a quality test. “Written with AI” can be honest and still leave a reader with no reason to trust the work. “Written by a human” can conceal carelessness. The more useful convention is responsibility: the named author should be able to explain and defend the work.&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keep an evidence trail for consequential work.&lt;/strong&gt; A short list of sources and decisions is more meaningful than a purity claim about tools.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use disclosure to clarify process, not to borrow credibility.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask the author question.&lt;/strong&gt; Can the person whose name is on this explain why the claim is here and what would change their mind?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;§ 05 · The Cost&lt;/p&gt;

&lt;h2&gt;
  
  
  The Price Paid by Readers
&lt;/h2&gt;

&lt;p&gt;The complaint about AI slop is often described as aesthetic: too many strange images, too much bland prose, another LinkedIn post that sounds like every other LinkedIn post. That is real, but it is not the deepest cost.&lt;/p&gt;

&lt;p&gt;The deeper cost is attention. Every plausible-looking low-value artifact asks a reader to make a small investigation. Is this true? Is it copied? Is there a real person behind it? Is the advice specific enough to use? Each investigation is cheap in isolation. At scale, it makes the information environment tiring.&lt;/p&gt;

&lt;p&gt;That fatigue changes behavior. Readers skim more aggressively. They trust less. They favor familiar sources because checking new ones is expensive. Small publishers and careful novices then pay a tax created by people who can flood the same channels with cheaper imitations.&lt;/p&gt;

&lt;p&gt;Researchers discussing AI slop describe the asymmetry directly: output can take far less effort to generate than a comparable human-made artifact, while its surface competence can disguise a lack of substance.&lt;sup&gt;8&lt;/sup&gt; The reader must do the expensive part after the producer has skipped it.&lt;/p&gt;

&lt;p&gt;The problem resembles spam, but only up to a point. Spam filters work because many messages share patterns and because the cost of a false negative is often low. Slop may be persuasive, topical, and nearly correct. The most expensive cases are not absurd. They are the calm, credible paragraph that leaves out the one condition that matters.&lt;/p&gt;

&lt;p&gt;This is also why a blanket hostility to synthetic media is a poor answer. The goal is not a return to a world where only people with spare time can publish. The goal is a world where the cost of publishing does not become an invoice sent to everyone who reads.&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Respect attention as a finite resource.&lt;/strong&gt; Do not publish a summary when a link and one sentence would do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make claims checkable.&lt;/strong&gt; Link the source, name the uncertainty, and remove decorative certainty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reward useful specificity.&lt;/strong&gt; It is harder to mass-produce and easier for a reader to test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;§ 06 · The Workplace&lt;/p&gt;

&lt;h2&gt;
  
  
  When Slop Enters the Repository
&lt;/h2&gt;

&lt;p&gt;Software teams are beginning to meet the same problem in a form they recognize immediately. An AI assistant can generate a feature branch, a test suite, a migration, a design memo, and a pull-request description before the reviewer has finished reading the ticket.&lt;/p&gt;

&lt;p&gt;The code may run. That is not the end of the question.&lt;/p&gt;

&lt;p&gt;Code has a longer afterlife than a post. It will be reviewed, deployed, debugged, changed by someone new, and used as evidence of how the system works. A patch that its author cannot explain transfers all of that future reasoning to other people.&lt;/p&gt;

&lt;p&gt;A recent paper frames this as a software commons problem: individual gains from AI-generated output can externalize costs onto reviewer capacity, codebase integrity, shared knowledge, and collaborative trust.&lt;sup&gt;9&lt;/sup&gt; Another qualitative study of developer discussion identified review friction and quality degradation as central themes in complaints about AI-assisted software development.&lt;sup&gt;10&lt;/sup&gt; These are early accounts, not settled measurements. They are still useful because they name where the cost appears.&lt;/p&gt;

&lt;p&gt;The engineering version of slop is therefore not “code made with AI.” It is code that creates the appearance of progress while increasing uncertainty about behavior, rationale, and ownership.&lt;/p&gt;

&lt;p&gt;The crucial question is not whether the assistant wrote the first draft. It is whether a human can trace the change from requirement to design to tests and can carry the responsibility when it fails. When that chain exists, AI can reduce drudgery. When it does not, generated volume becomes technical debt at production speed.&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Review for explanation, not only execution.&lt;/strong&gt; A passing test is necessary; an understood change is durable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Require a rationale for non-obvious code.&lt;/strong&gt; Generated comments are not a rationale unless someone verified them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep changes small enough to own.&lt;/strong&gt; A reviewer should be able to say what changed, why it is safe, and who will maintain it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;§ 07 · The Test&lt;/p&gt;

&lt;h2&gt;
  
  
  The Responsibility Test
&lt;/h2&gt;

&lt;p&gt;There is no reliable detector for care. That does not leave us helpless. It means the standard should be behavioral rather than forensic.&lt;/p&gt;

&lt;p&gt;A useful responsibility test has five questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the point?&lt;/strong&gt; A piece should be able to name the question it answers for a particular reader. “Content about AI” is a category, not a point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is new here?&lt;/strong&gt; The answer may be a firsthand observation, a synthesis, a worked example, a useful framing, or a decision. If nothing is new, a link is usually better than a post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What was checked?&lt;/strong&gt; This does not demand impossible certainty. It demands that a publisher distinguish verified facts, interpretation, and speculation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What was removed?&lt;/strong&gt; Editing is evidence of judgment. The sentences that did not survive are often more important than the sentences that did.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who owns the result?&lt;/strong&gt; The person who publishes or merges should be able to answer questions about it without blaming the model.&lt;/p&gt;

&lt;p&gt;This test is deliberately indifferent to how many tokens a machine produced. It makes room for a writer who uses AI extensively and for one who uses none. It also makes the actual obligation visible: publishing is a promise to bear some of the reader’s verification burden yourself.&lt;/p&gt;

&lt;p&gt;In organizations, this should be a process rather than a cultural wish. People need enough time to read outputs, enough permission to say “this does not add up,” and incentives that do not reward artifact count over outcomes.&lt;/p&gt;

&lt;p&gt;The strongest defense against slop is not better taste. It is a system in which care is cheaper to exercise than carelessness is to pass downstream.&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add the five questions to publishing and PR templates.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat uncertainty as useful information.&lt;/strong&gt; “We do not know” is often the most valuable sentence in a report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make ownership explicit.&lt;/strong&gt; A named owner is not decoration; it tells others where understanding is supposed to live.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;§ 08 · The Practice&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Do on Monday
&lt;/h2&gt;

&lt;p&gt;The useful response to AI slop is not to ban tools or to become a detective of punctuation. Both answers attack the visible surface and miss the real failure.&lt;/p&gt;

&lt;p&gt;Start with the work that leaves your hands.&lt;/p&gt;

&lt;p&gt;Before publishing, ask whether the piece contains a claim, a reader, and a reason. Remove the paragraph that only restates the title. Link the source that carries the fact. Replace a generic example with the actual case that changed your mind. If the answer is not ready, keep it as a note.&lt;/p&gt;

&lt;p&gt;Before merging, ask whether the author can narrate the change. Ask what was tested, what assumptions remain, and what would make the design wrong. Keep the change small enough for a reviewer to understand. These are not anti-AI rules. They are the old rules of responsible work, made urgent by a new rate of output.&lt;/p&gt;

&lt;p&gt;At the platform level, reward useful material rather than the frequency of posting. LinkedIn’s own guidance makes the same broad distinction: AI-assisted content is welcome when it reflects a real person’s perspective, experience, or expertise; generic and repetitive material is the problem.&lt;sup&gt;11&lt;/sup&gt; That is a reasonable direction, even if no feedback button can see the full process behind a post.&lt;/p&gt;

&lt;p&gt;The word “slop” will remain imprecise. It may even become too broad to survive. The underlying problem will not disappear with the vocabulary: when production gets easier, judgment becomes the scarce resource.&lt;/p&gt;

&lt;p&gt;That is the thing worth defending. Not human typing for its own sake. Not a nostalgia for artificial scarcity. The expectation that when a person asks for our attention, someone has done the work of deciding why we should give it.&lt;/p&gt;

&lt;h3&gt;
  
  
  In practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use AI to increase the quality of decisions, not only the quantity of artifacts.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish less when less is all you have.&lt;/strong&gt; Silence is cheaper than asking strangers to sort through a draft.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stand behind the work.&lt;/strong&gt; That is what authorship has always meant.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://tech.anujsadani.in/ai-slop/" rel="noopener noreferrer"&gt;Read the original on Anuj Sadani | Tech&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>devtools</category>
      <category>programming</category>
    </item>
    <item>
      <title>Tool Selection at Scale: What Top-K RAG Leaves Out</title>
      <dc:creator>Anuj Sadani</dc:creator>
      <pubDate>Sun, 01 Nov 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/anuj-sadani/tool-selection-at-scale-what-top-k-rag-leaves-out-4aj9</link>
      <guid>https://dev.to/anuj-sadani/tool-selection-at-scale-what-top-k-rag-leaves-out-4aj9</guid>
      <description>&lt;p&gt;Embed, retrieve, let the LLM decide works for about 100 tools. At 1,000 it needs a control plane: hybrid retrieval, hard filters, a learned reranker, progressive disclosure and per-stage evals.&lt;/p&gt;

&lt;p&gt;This is an adapted edition of the original article. It preserves the section argument and evidence; use the source link for the published version and any interactive material.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tech.anujsadani.in/tool-selection-at-scale/" rel="noopener noreferrer"&gt;Read the original article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;01 / Baseline&lt;/p&gt;

&lt;h2&gt;
  
  
  What the pipeline gets right
&lt;/h2&gt;

&lt;p&gt;The idea is that a reliable classifier is a pipeline, not a prompt. Embeddings find the neighborhood. Retrieval returns definitions. The LLM compares them. A validation step chooses between a category and an abstention. I would keep every stage.&lt;/p&gt;

&lt;p&gt;The pipeline has a ceiling, and it deserves one extension. If the correct category is not retrieved, the LLM cannot pick it. True. It is equally true of every stage after retrieval, and that is where scale starts to hurt.&lt;/p&gt;

&lt;p&gt;At around 100 items the plain pipeline is enough. A 100-tool catalog at roughly 400 tokens per schema is 40k tokens. That figure is the one I used in my &lt;a href="https://arxiv.org/abs/2604.21816" rel="noopener noreferrer"&gt;Tool Attention paper&lt;/a&gt;, and real servers run higher: the public audits I cited put the full GitHub server at about 55,000 tokens for 93 tools, close to 590 each. Forty thousand tokens is wasteful but it fits, and a single top-10 embedding lookup rarely misses.&lt;/p&gt;

&lt;p&gt;At 1,000 tools the same arithmetic gives 400k tokens. Retrieval stops being an optimization and becomes the only way in. That is the point where embed, retrieve, decide and validate is necessary and no longer sufficient. The rest of this post is about the parts I would add.&lt;/p&gt;

&lt;p&gt;02 / Framing&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools are not categories
&lt;/h2&gt;

&lt;p&gt;It is tempting to treat tool selection as classification with a bigger label set. The analogy holds for the retrieval half and breaks for everything around it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wrong answer&lt;/strong&gt;: &lt;strong&gt;Category classification:&lt;/strong&gt; A wrong value in a row. Fixable later.; &lt;strong&gt;Tool selection:&lt;/strong&gt; A side effect: a sent email, a deleted record, a charged card.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ground truth&lt;/strong&gt;: &lt;strong&gt;Category classification:&lt;/strong&gt; A taxonomy that changes slowly.; &lt;strong&gt;Tool selection:&lt;/strong&gt; The catalog, plus per-user permissions, plus live connection state. It changes per session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decisions&lt;/strong&gt;: &lt;strong&gt;Category classification:&lt;/strong&gt; One per input.; &lt;strong&gt;Tool selection:&lt;/strong&gt; A sequence. Each observation changes which tools are relevant next.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Near-duplicates&lt;/strong&gt;: &lt;strong&gt;Category classification:&lt;/strong&gt; Adjacent categories.; &lt;strong&gt;Tool selection:&lt;/strong&gt; Overlapping tools from different servers, often three different &lt;code&gt;search&lt;/code&gt; tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Abstention&lt;/strong&gt;: &lt;strong&gt;Category classification:&lt;/strong&gt; One exit: insufficient evidence.; &lt;strong&gt;Tool selection:&lt;/strong&gt; Three exits: ask the user, widen the search, or report the missing capability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trust&lt;/strong&gt;: &lt;strong&gt;Category classification:&lt;/strong&gt; The input text is untrusted.; &lt;strong&gt;Tool selection:&lt;/strong&gt; The definitions are untrusted too. A tool description is text the model obeys.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Row one is the one that changes the architecture. Safety cannot live in the prompt when a wrong choice writes to a production system. It has to live in code that runs regardless of what the model says.&lt;/p&gt;

&lt;p&gt;03 / Why retrieval at all&lt;/p&gt;

&lt;h2&gt;
  
  
  It is a context-quality problem, not only a knowledge problem
&lt;/h2&gt;

&lt;p&gt;The baseline pipeline frames retrieval as supplying information the model lacks. That is half of it. The other half is that a model with all the information in a crowded context still does worse, even when the right answer is technically in there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Position effects.&lt;/strong&gt; Liu et al. (&lt;a href="https://aclanthology.org/2024.tacl-1.9/" rel="noopener noreferrer"&gt;Lost in the Middle&lt;/a&gt;, TACL 2024) found that accuracy is lowest when the relevant item sits in the middle of a long context. A tool list is exactly that shape.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool overload, measured.&lt;/strong&gt; RAG-MCP (&lt;a href="https://arxiv.org/abs/2505.03275" rel="noopener noreferrer"&gt;Gan and Sun, 2025&lt;/a&gt;) reports tool selection accuracy of 43.13% with retrieval against 13.62% for the baseline that shows the model everything, and prompt tokens cut by more than half.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vendor numbers agree in direction.&lt;/strong&gt; Anthropic's &lt;a href="https://www.anthropic.com/engineering/advanced-tool-use" rel="noopener noreferrer"&gt;tool search&lt;/a&gt; write-up reports Opus 4 going from 49% to 74% on their MCP evaluation and Opus 4.5 from 79.5% to 88.1%, with about 85% fewer tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My own number is a simulation.&lt;/strong&gt; On a calibrated 120-tool, six-server catalog, gating cut per-turn tool tokens from 47.3k to 2.4k (95.0%). No live agent ran. Treat it as an arithmetic result, not an accuracy result.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are four different benchmarks, so I am not comparing them to each other. They agree on the direction, and that is enough for the design rule: retrieval is a context-control mechanism. Expose the smallest decision space that still contains the answer.&lt;/p&gt;

&lt;p&gt;04 / Measurement&lt;/p&gt;

&lt;h2&gt;
  
  
  The recall chain
&lt;/h2&gt;

&lt;p&gt;Once you add a reranker, the ceiling is no longer one number. Every stage can drop the right tool, and the drops compound. The precise form is a product of conditional recalls:&lt;/p&gt;

&lt;p&gt;End-to-end recall&lt;/p&gt;

&lt;p&gt;P(right&amp;nbsp;tool&amp;nbsp;used)&amp;nbsp;=&amp;nbsp;&amp;nbsp;&amp;nbsp;R_retrieve&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;gold&amp;nbsp;is&amp;nbsp;in&amp;nbsp;the&amp;nbsp;candidate&amp;nbsp;set\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;R_filter&amp;nbsp;&amp;nbsp;|&amp;nbsp;retrieved&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;gold&amp;nbsp;survives&amp;nbsp;policy&amp;nbsp;filters\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;R_menu&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|&amp;nbsp;filtered&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;gold&amp;nbsp;survives&amp;nbsp;the&amp;nbsp;reranker&amp;nbsp;cut\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;R_select&amp;nbsp;&amp;nbsp;|&amp;nbsp;menu&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;the&amp;nbsp;LLM&amp;nbsp;picks&amp;nbsp;it&amp;nbsp;from&amp;nbsp;the&amp;nbsp;menu&lt;/p&gt;

&lt;p&gt;The word "conditional" matters. Multiplying raw retrieval recall by raw reranker recall double counts, because the reranker only ever sees what retrieval returned. Here is an illustration with numbers I made up to show the shape, not measurements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retrieve 40&lt;/strong&gt;: &lt;strong&gt;Conditional recall:&lt;/strong&gt; 0.95; &lt;strong&gt;Cumulative:&lt;/strong&gt; 0.950&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard filters&lt;/strong&gt;: &lt;strong&gt;Conditional recall:&lt;/strong&gt; 0.98; &lt;strong&gt;Cumulative:&lt;/strong&gt; 0.931&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rerank to 6&lt;/strong&gt;: &lt;strong&gt;Conditional recall:&lt;/strong&gt; 0.92; &lt;strong&gt;Cumulative:&lt;/strong&gt; 0.857&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM selects&lt;/strong&gt;: &lt;strong&gt;Conditional recall:&lt;/strong&gt; 0.90; &lt;strong&gt;Cumulative:&lt;/strong&gt; 0.771&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Raising retrieval from 0.95 to 0.99 lifts the end result by about three points. Raising selection from 0.90 to 0.95 lifts it by about four. The weak stage is rarely the one people tune first, because retrieval is the stage everyone knows how to tune. The fix is to log four sets per request and compute the numbers per stage:&lt;/p&gt;

&lt;p&gt;stage_recall.py&lt;/p&gt;

&lt;p&gt;STAGES&amp;nbsp;=&amp;nbsp;["retrieved",&amp;nbsp;"filtered",&amp;nbsp;"menu",&amp;nbsp;"chosen"]&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;each&amp;nbsp;is&amp;nbsp;a&amp;nbsp;set&amp;nbsp;of&amp;nbsp;tool_ids&amp;nbsp;on&amp;nbsp;the&amp;nbsp;trace\&lt;br&gt;
\&lt;br&gt;
def&amp;nbsp;stage_recall(traces):\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alive,&amp;nbsp;out&amp;nbsp;=&amp;nbsp;traces,&amp;nbsp;{}\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;stage&amp;nbsp;in&amp;nbsp;STAGES:\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;kept&amp;nbsp;=&amp;nbsp;[t&amp;nbsp;for&amp;nbsp;t&amp;nbsp;in&amp;nbsp;alive&amp;nbsp;if&amp;nbsp;t.gold&amp;nbsp;in&amp;nbsp;getattr(t,&amp;nbsp;stage)]\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out[stage]&amp;nbsp;=&amp;nbsp;len(kept)&amp;nbsp;/&amp;nbsp;max(len(alive),&amp;nbsp;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;conditional&amp;nbsp;on&amp;nbsp;the&amp;nbsp;previous&amp;nbsp;stage\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alive&amp;nbsp;=&amp;nbsp;kept\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;out&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;multiply&amp;nbsp;the&amp;nbsp;values&amp;nbsp;for&amp;nbsp;end-to-end&lt;/p&gt;

&lt;p&gt;Even in the baseline pipeline, evaluating only the LLM is misleading, so you track retrieval and selection separately. At scale two numbers are not enough. You need four, and you need a labeled set where the gold tool is one the user could actually call.&lt;/p&gt;

&lt;p&gt;One caveat: the chain above starts at retrieval, but in the per-subgoal design of section 06 there is a stage before it, splitting the request into subgoals. A bad split caps everything downstream, so give it its own term, &lt;code&gt;R_decompose&lt;/code&gt;: the share of requests where the gold tool is covered by some extracted subgoal.&lt;/p&gt;

&lt;p&gt;05 / Control part 1&lt;/p&gt;

&lt;h2&gt;
  
  
  The catalog is a product
&lt;/h2&gt;

&lt;p&gt;The first thing that breaks at scale is not the model or the index. It is the catalog. In my simulation 29 of 500 tasks failed with tool gating. Fourteen (48%) came from a query matching several semantically similar tools. Seven (24%) came from cryptic legacy descriptions. That is 72% of failures where what the catalog says was the proximate cause. Five more (17%) were multi-hop cases, covered below, and the last three fit none of these buckets. It is a simulated workload, so read the proportions as a hypothesis worth testing on your own traces.&lt;/p&gt;

&lt;p&gt;So keep the registry outside the prompt and give every tool a card written for retrieval, not for the implementer:&lt;/p&gt;

&lt;p&gt;tool card (indexed fields in the top block, the rest loaded on demand)&lt;/p&gt;

&lt;p&gt;{\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"tool_id":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"github.search_code",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"domain":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"source_control",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"summary":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Find&amp;nbsp;where&amp;nbsp;something&amp;nbsp;is&amp;nbsp;implemented&amp;nbsp;across&amp;nbsp;connected&amp;nbsp;repositories",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"capabilities":&amp;nbsp;["code_search",&amp;nbsp;"repository_read"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"entities":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;["repository",&amp;nbsp;"file",&amp;nbsp;"commit"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"input_concepts":&amp;nbsp;["query",&amp;nbsp;"repository",&amp;nbsp;"organization"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"prefer_over":&amp;nbsp;&amp;nbsp;["web.search"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"not_for":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Reading&amp;nbsp;one&amp;nbsp;known&amp;nbsp;file.&amp;nbsp;Use&amp;nbsp;github.read_file.",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"examples":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;["Find&amp;nbsp;where&amp;nbsp;login&amp;nbsp;sessions&amp;nbsp;are&amp;nbsp;validated&amp;nbsp;in&amp;nbsp;the&amp;nbsp;checkout-service&amp;nbsp;repository"],\&lt;br&gt;
\&lt;br&gt;
&amp;nbsp;&amp;nbsp;//&amp;nbsp;not&amp;nbsp;indexed:&amp;nbsp;fetched&amp;nbsp;only&amp;nbsp;after&amp;nbsp;the&amp;nbsp;tool&amp;nbsp;is&amp;nbsp;selected\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"requires":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;"connection":&amp;nbsp;"github",&amp;nbsp;"scopes":&amp;nbsp;["repo:read"]&amp;nbsp;},\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"risk":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"read_only",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"cost":&amp;nbsp;"low",&amp;nbsp;"p50_ms":&amp;nbsp;900,\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"owner":&amp;nbsp;"platform-team",&amp;nbsp;"schema_version":&amp;nbsp;7,\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"input_schema":&amp;nbsp;{&amp;nbsp;/*&amp;nbsp;full&amp;nbsp;JSON&amp;nbsp;Schema&amp;nbsp;*/&amp;nbsp;}\&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Three fields do more work than they look. &lt;code&gt;summary&lt;/code&gt; is written in the voice of the user's intent. In my paper, regenerating summaries that way cut their average length by 63% and raised retrieval F1 by 8 points, on the same synthetic benchmark. &lt;code&gt;not_for&lt;/code&gt; and &lt;code&gt;prefer_over&lt;/code&gt; are the disambiguation fields. They give the reranker and the model a reason to choose between near-duplicates, and near-duplicates were the largest failure bucket. &lt;code&gt;owner&lt;/code&gt; and &lt;code&gt;schema_version&lt;/code&gt; exist because at 1,000 tools somebody has to be paged when a description rots.&lt;/p&gt;

&lt;p&gt;One structural change belongs here too. A flat top-k over thousands of tools tends to fill the shortlist with ten variants of one family and crowd out the second family you needed. Group tools into domains and route in two hops, domain first and tool second. This is my rule from building these systems, not a measured result. Test it against a flat index on your own catalog before you trust it.&lt;/p&gt;

&lt;p&gt;06 / Control part 2&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery per subgoal, three retrievers, one pre-filter
&lt;/h2&gt;

&lt;p&gt;The baseline pipeline embeds the input once. A tool request is rarely one intent. "Find where sessions are validated in checkout-service and check whether the fix is deployed" is two subgoals with different tools. Embedding the whole sentence returns a blurred neighborhood that serves neither. I extract structured intent first and run discovery per subgoal:&lt;/p&gt;

&lt;p&gt;intent extraction output&lt;/p&gt;

&lt;p&gt;{\&lt;br&gt;
&amp;nbsp;&amp;nbsp;"subgoals":&amp;nbsp;[\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;"goal":&amp;nbsp;"locate&amp;nbsp;session&amp;nbsp;validation&amp;nbsp;code",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"operations":&amp;nbsp;["repository_search",&amp;nbsp;"code_read"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"entities":&amp;nbsp;["checkout-service&amp;nbsp;repository"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"required_access":&amp;nbsp;["GitHub"],&amp;nbsp;"mutation":&amp;nbsp;false&amp;nbsp;},\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;"goal":&amp;nbsp;"check&amp;nbsp;deployment&amp;nbsp;status",\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"operations":&amp;nbsp;["rollout_inspect"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"entities":&amp;nbsp;["checkout-service"],\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"required_access":&amp;nbsp;["Kubernetes"],&amp;nbsp;"mutation":&amp;nbsp;false&amp;nbsp;}\&lt;br&gt;
&amp;nbsp;&amp;nbsp;]\&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Retrieval then runs three ways and fuses the ranks. Vectors catch paraphrase. BM25 catches the exact tokens embeddings blur: tool ids, product names, error codes. Capability matching uses the structured &lt;code&gt;operations&lt;/code&gt; field. Reciprocal rank fusion (Cormack et al., SIGIR 2009, constant 60) merges them without needing comparable scores.&lt;/p&gt;

&lt;p&gt;Two more signals feed the same stage: historical success on similar tasks, and whether the connector is available in this environment. I use history as a ranker feature and availability as a pre-filter. False positives are acceptable here and a miss is not. A missing tool costs the whole task, while an irrelevant one costs a few tokens that the reranker removes.&lt;/p&gt;

&lt;p&gt;The detail people miss is the pre-filter. If you filter for permissions after retrieval, the top 40 can be full of tools this user cannot call, and your recall of &lt;em&gt;usable&lt;/em&gt; tools collapses while the recall you measure looks fine. Push the static predicates into the index query.&lt;/p&gt;

&lt;p&gt;discover.py (sketch)&lt;/p&gt;

&lt;p&gt;def&amp;nbsp;rrf(rankings,&amp;nbsp;k=60):\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;score&amp;nbsp;=&amp;nbsp;defaultdict(float)\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;ranking&amp;nbsp;in&amp;nbsp;rankings:\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;rank,&amp;nbsp;tool_id&amp;nbsp;in&amp;nbsp;enumerate(ranking,&amp;nbsp;start=1):\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;score[tool_id]&amp;nbsp;+=&amp;nbsp;1.0&amp;nbsp;/&amp;nbsp;(k&amp;nbsp;+&amp;nbsp;rank)\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;sorted(score,&amp;nbsp;key=score.get,&amp;nbsp;reverse=True)\&lt;br&gt;
\&lt;br&gt;
def&amp;nbsp;discover(sub,&amp;nbsp;ctx,&amp;nbsp;index,&amp;nbsp;n=40,&amp;nbsp;menu=6):\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;where&amp;nbsp;=&amp;nbsp;{"connection":&amp;nbsp;ctx.connections,&amp;nbsp;"env":&amp;nbsp;ctx.env,\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"scopes_within":&amp;nbsp;ctx.granted_scopes}&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;static&amp;nbsp;per&amp;nbsp;session,&amp;nbsp;pushed&amp;nbsp;into&amp;nbsp;the&amp;nbsp;index\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fused&amp;nbsp;=&amp;nbsp;rrf([\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;index.vector(sub.text,&amp;nbsp;n=n,&amp;nbsp;where=where),\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;index.bm25(sub.text,&amp;nbsp;n=n,&amp;nbsp;where=where),\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;index.by_capability(sub.operations,&amp;nbsp;n=n,&amp;nbsp;where=where),\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;])[:n]\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;allowed&amp;nbsp;=&amp;nbsp;[t&amp;nbsp;for&amp;nbsp;t&amp;nbsp;in&amp;nbsp;fused&amp;nbsp;if&amp;nbsp;request_ok(t,&amp;nbsp;sub,&amp;nbsp;ctx)]&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;depends&amp;nbsp;only&amp;nbsp;on&amp;nbsp;this&amp;nbsp;subgoal\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ranked&amp;nbsp;=&amp;nbsp;reranker.score(sub,&amp;nbsp;allowed)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;learned,&amp;nbsp;relevance&amp;nbsp;only\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;prefer_cheap_within(ranked,&amp;nbsp;margin=0.05)[:menu]\&lt;br&gt;
\&lt;br&gt;
def&amp;nbsp;request_ok(tool,&amp;nbsp;sub,&amp;nbsp;ctx):\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;(tool.risk&amp;nbsp;!=&amp;nbsp;"read_only")&amp;nbsp;==&amp;nbsp;sub.mutation&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;write&amp;nbsp;tools&amp;nbsp;for&amp;nbsp;write&amp;nbsp;subgoals,&amp;nbsp;read&amp;nbsp;tools&amp;nbsp;for&amp;nbsp;read&lt;/p&gt;

&lt;p&gt;07 / Control part 3&lt;/p&gt;

&lt;h2&gt;
  
  
  Filter, then rank, and where I would change the score
&lt;/h2&gt;

&lt;p&gt;Hard filters are deterministic policy, not LLM judgment. They remove a missing connection or scope, incompatible data types, a write tool for a read-only request (and a read-only tool for a write request), an action that policy disallows or that is riskier than the request needs, and any tool unavailable in this environment. They run before any model sees a candidate, and they are cheap to test.&lt;/p&gt;

&lt;p&gt;Each stage optimizes something different, and it helps to say so out loud:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval&lt;/strong&gt; optimizes recall. Missing the right tool is the expensive error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filters&lt;/strong&gt; optimize correctness. They remove what cannot or should not run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The reranker&lt;/strong&gt; optimizes precision and order. It puts the strongest candidates first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The LLM&lt;/strong&gt; does a bounded comparison over a small menu.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation&lt;/strong&gt; checks that the choice is supported and safe to run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reranker then cuts roughly 30 to 50 candidates to a menu of 5 to 8. I keep the cut generous. A reranker error deletes the right tool for good, so this is the stage where I trade a few extra tokens for recall. In my paper I recommended k of 8 to 12 with the threshold doing the precision work. The examples here use 6 because they show one-line menus; widen it if your measured &lt;code&gt;R_menu&lt;/code&gt; is low.&lt;/p&gt;

&lt;p&gt;A common way to specify the reranker is a weighted sum over the candidate tool &lt;code&gt;t&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;Reranking score&lt;/p&gt;

&lt;p&gt;S(t)&amp;nbsp;=&amp;nbsp;w1*I&amp;nbsp;+&amp;nbsp;w2*C&amp;nbsp;+&amp;nbsp;w3*E&amp;nbsp;+&amp;nbsp;w4*P&amp;nbsp;+&amp;nbsp;w5*H&amp;nbsp;-&amp;nbsp;w6*R&amp;nbsp;-&amp;nbsp;w7*L&amp;nbsp;-&amp;nbsp;w8*K&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;I&lt;/code&gt; intent match, &lt;code&gt;C&lt;/code&gt; capability match, &lt;code&gt;E&lt;/code&gt; entity or data-source match.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;P&lt;/code&gt; permission and availability, &lt;code&gt;H&lt;/code&gt; historical success on similar tasks.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;R&lt;/code&gt; operational risk, &lt;code&gt;L&lt;/code&gt; expected latency, &lt;code&gt;K&lt;/code&gt; execution cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The weights should move with the task. For a sensitive action, permission and risk count for more. For an interactive request, relevance and latency count for more. I like the inputs and I like that instinct. I would change how the terms combine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Permission&lt;/strong&gt;: &lt;strong&gt;Problem inside a weighted sum:&lt;/strong&gt; A missing scope is not a small penalty. It is a no. It also double counts with the hard filter.; &lt;strong&gt;Where I put it instead:&lt;/strong&gt; Filter only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk&lt;/strong&gt;: &lt;strong&gt;Problem inside a weighted sum:&lt;/strong&gt; Subtracting risk lets a slightly more relevant destructive tool beat a safe adequate one, or the reverse, and nobody audits the weights.; &lt;strong&gt;Where I put it instead:&lt;/strong&gt; A risk policy after selection: confirm, dry-run or deny.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost, latency&lt;/strong&gt;: &lt;strong&gt;Problem inside a weighted sum:&lt;/strong&gt; They should never outvote relevance.; &lt;strong&gt;Where I put it instead:&lt;/strong&gt; A tiebreaker among tools within a small relevance margin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;History&lt;/strong&gt;: &lt;strong&gt;Problem inside a weighted sum:&lt;/strong&gt; Popular tools collect more history and crowd out better new ones.; &lt;strong&gt;Where I put it instead:&lt;/strong&gt; A learned feature, with deliberate exploration of new tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hand-set weights&lt;/strong&gt;: &lt;strong&gt;Problem inside a weighted sum:&lt;/strong&gt; They do not survive a catalog change.; &lt;strong&gt;Where I put it instead:&lt;/strong&gt; Train the relevance ranker on (subgoal, tool used, success) traces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The advice to weight permission and risk more heavily for sensitive actions points the same way. Past some weight they stop being weights and become gates.&lt;/p&gt;

&lt;p&gt;The rule I use&lt;/p&gt;

&lt;p&gt;Anything that must never happen belongs in a filter or a policy. Anything that is a preference belongs in the ranker. A weighted sum blurs the two, and the blur is where incidents come from.&lt;/p&gt;

&lt;p&gt;08 / Control part 4&lt;/p&gt;

&lt;h2&gt;
  
  
  Progressive disclosure
&lt;/h2&gt;

&lt;p&gt;Retrieval narrows which tools are visible. Progressive disclosure narrows how much the model sees about each one. The token figures below are rough, and they follow from the 400-token schema assumption above.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Discovery&lt;/strong&gt;: &lt;strong&gt;The model sees:&lt;/strong&gt; Name and one-line capability; &lt;strong&gt;~Tokens per tool:&lt;/strong&gt; 30 to 40; &lt;strong&gt;Trigger:&lt;/strong&gt; Every subgoal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selection&lt;/strong&gt;: &lt;strong&gt;The model sees:&lt;/strong&gt; Constraints, risk, cost, one example; &lt;strong&gt;~Tokens per tool:&lt;/strong&gt; 100 to 150; &lt;strong&gt;Trigger:&lt;/strong&gt; Only when two menu items are close&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invocation&lt;/strong&gt;: &lt;strong&gt;The model sees:&lt;/strong&gt; Full input schema; &lt;strong&gt;~Tokens per tool:&lt;/strong&gt; 400+; &lt;strong&gt;Trigger:&lt;/strong&gt; Only for the chosen tool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recovery&lt;/strong&gt;: &lt;strong&gt;The model sees:&lt;/strong&gt; The error, alternatives, a wider menu; &lt;strong&gt;~Tokens per tool:&lt;/strong&gt; varies; &lt;strong&gt;Trigger:&lt;/strong&gt; After a failure or a rejected call&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A six-tool menu at discovery level is about 200 tokens. The same six with full schemas is about 2,400. The saving is real, and so is the risk: the model chooses from one-liners, so the one-liners must be good. That takes you straight back to the catalog. This is all the model sees at the discovery level:&lt;/p&gt;

&lt;p&gt;discovery-level menu&lt;/p&gt;

&lt;p&gt;1.&amp;nbsp;github.search_code&amp;nbsp;&amp;nbsp;&amp;nbsp;Search&amp;nbsp;code&amp;nbsp;inside&amp;nbsp;connected&amp;nbsp;repositories\&lt;br&gt;
2.&amp;nbsp;github.read_file&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Read&amp;nbsp;a&amp;nbsp;specific&amp;nbsp;repository&amp;nbsp;file\&lt;br&gt;
3.&amp;nbsp;jira.search_issues&amp;nbsp;&amp;nbsp;&amp;nbsp;Search&amp;nbsp;issues&amp;nbsp;and&amp;nbsp;tickets\&lt;br&gt;
4.&amp;nbsp;web.search&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Search&amp;nbsp;public&amp;nbsp;internet&amp;nbsp;sources&lt;/p&gt;

&lt;p&gt;Only after it picks &lt;code&gt;github.search_code&lt;/code&gt; does the system reveal that tool's full input schema. Two operational details. First, keep the summary pool in the stable prefix of the prompt and put per-turn schemas right before the user message. In my simulation this gave an 84% prompt-cache hit rate over a 30-turn session against 22% for naive full-schema injection, because the tool list stopped invalidating the cache. This only works if the schemas travel as message content after the cached prefix. On the Claude API, tool definitions sit at the front of the prefix, so changing the &lt;code&gt;tools&lt;/code&gt; parameter between turns invalidates everything behind it. Second, give the model an escape hatch: a &lt;code&gt;search_tools&lt;/code&gt; meta-tool it can call when the menu is wrong. Anthropic's tool search is the same idea shipped as a platform feature.&lt;/p&gt;

&lt;p&gt;Pair that with a gate: if the model calls a tool that is not in the active set, reject it with a structured error listing what is available. In my simulation the gate fired on 2.3% of turns. The model recovered on the next turn 78% of the time and asked the user a clarifying question the other 22%.&lt;/p&gt;

&lt;p&gt;09 / Control parts 5 and 6&lt;/p&gt;

&lt;h2&gt;
  
  
  Validate, iterate, recover
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Validate before executing.&lt;/strong&gt; The model may pick one tool or a short sequence from the menu, and each call gets deterministic checks on required parameters, types, permissions, read versus write intent, confirmation requirements and target scope. For writes I add a dry-run where the tool supports one. Feed validator errors back to the model verbatim. They are the cheapest correction signal in the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Return observations, not payloads.&lt;/strong&gt; The executor should cap and normalize the result, and keep a handle to the full output outside the context. A 200 KB response dumped into the prompt undoes everything the earlier stages saved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rediscover on every subgoal.&lt;/strong&gt; A tool's output can reveal the next need: a config reference that points to a deployment system you had no tools for. In my simulation 5 of the 29 failures (17%) were multi-hop cases where the right tool only became relevant after an intermediate result. Re-embedding the query after each observation partly fixed them. The agent should not carry every plausibly useful tool for the whole session.&lt;/p&gt;

&lt;p&gt;one request, three rounds of discovery (illustrative)&lt;/p&gt;

&lt;p&gt;search&amp;nbsp;the&amp;nbsp;repository&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;round&amp;nbsp;1:&amp;nbsp;github.search_code\&lt;br&gt;
&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;found&amp;nbsp;a&amp;nbsp;config&amp;nbsp;reference\&lt;br&gt;
config&amp;nbsp;says&amp;nbsp;it&amp;nbsp;ships&amp;nbsp;as&amp;nbsp;a&amp;nbsp;Kubernetes&amp;nbsp;rollout&amp;nbsp;#&amp;nbsp;new&amp;nbsp;subgoal\&lt;br&gt;
retrieve&amp;nbsp;Kubernetes&amp;nbsp;tools&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;round&amp;nbsp;2:&amp;nbsp;k8s.get_rollout_status\&lt;br&gt;
read&amp;nbsp;the&amp;nbsp;failing&amp;nbsp;pod's&amp;nbsp;logs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;round&amp;nbsp;3:&amp;nbsp;k8s.get_pod_logs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Name the failure class.&lt;/strong&gt; "The agent used the wrong tool" is not a diagnosis. There are at least seven distinct failures, each with a different detector and a different fix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No suitable tool exists&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Gold label is "none". Abstention rate on those cases.; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Report the missing capability. Roadmap input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request mis-split&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Low &lt;code&gt;R_decompose&lt;/code&gt;: the gold tool's need is missing from, or merged into, another subgoal; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Intent-extraction prompt, examples and output schema.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exists, not retrieved&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Low &lt;code&gt;R_retrieve&lt;/code&gt;; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Catalog text, hybrid retrieval, intent decomposition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieved, cut by reranker&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Low &lt;code&gt;R_menu&lt;/code&gt;; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Reranker training data, a larger menu, &lt;code&gt;not_for&lt;/code&gt; fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shown, not chosen&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Low &lt;code&gt;R_select&lt;/code&gt;; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Better one-liners, a selection-level disclosure step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chosen, invoked wrongly&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Validator rejection rate per tool; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Examples in the schema, clearer parameter names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ran, returned too little&lt;/strong&gt;: &lt;strong&gt;How you see it:&lt;/strong&gt; Observation check fails; the subgoal is still open; &lt;strong&gt;Where the fix lives:&lt;/strong&gt; Next tool in the candidate list, or a new discovery round.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Recovery paths follow from the table. Low discovery confidence: widen retrieval, reformulate the intent, or ask the user. A selected tool fails: return to the candidate list and take the next compatible one. Nothing viable: say which capability or connection is missing. Do not let the model invent an answer to fill the gap.&lt;/p&gt;

&lt;p&gt;10 / Worked example&lt;/p&gt;

&lt;h2&gt;
  
  
  One request, end to end
&lt;/h2&gt;

&lt;p&gt;Everything above is easier to judge on a single request. This is an illustration, not a benchmark: the catalog size, the counts and the tool names are mine, chosen to be realistic. The catalog has 1,200 tools across 30 servers, and the request is:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"The checkout-service deploy failed last night. Find what changed, check the rollout, and tell the payments channel on Slack."&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Intent extraction&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; Three subgoals: find what changed (GitHub, read), check the rollout (Kubernetes, read), post a summary (Slack, write).; &lt;strong&gt;The model sees:&lt;/strong&gt; The request only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval, per subgoal&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; 40 candidates each, out of 1,200, after the connection and scope pre-filter (this user has no Argo CD connection, so those tools never enter the query). For the rollout subgoal, BM25 catches the literal word "rollout" in &lt;code&gt;k8s.get_rollout_status&lt;/code&gt;, which the vector search had ranked 63rd, outside its top 40.; &lt;strong&gt;The model sees:&lt;/strong&gt; Nothing yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard filters&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; Rollout subgoal: &lt;code&gt;k8s.rollout_restart&lt;/code&gt; and nine other write tools removed because the subgoal is read-only. 30 remain.; &lt;strong&gt;The model sees:&lt;/strong&gt; Nothing yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rerank&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; 30 become a menu of 6. The &lt;code&gt;not_for&lt;/code&gt; field on &lt;code&gt;logs.search&lt;/code&gt; ("for Kubernetes pod logs use &lt;code&gt;k8s.get_pod_logs&lt;/code&gt;") settles a near-duplicate.; &lt;strong&gt;The model sees:&lt;/strong&gt; Nothing yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disclosure and selection&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; The menu is shown at discovery level. The model picks &lt;code&gt;k8s.get_rollout_status&lt;/code&gt;, and only then is its full schema revealed.; &lt;strong&gt;The model sees:&lt;/strong&gt; Six one-liners (about 200 tokens), then one schema (about 400).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; The required parameter &lt;code&gt;namespace&lt;/code&gt; is missing. The validator returns an error, the model supplies &lt;code&gt;payments&lt;/code&gt;, and the second attempt passes.; &lt;strong&gt;The model sees:&lt;/strong&gt; The error string.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; 200 KB of pod events is capped to a 1.2 KB observation, with a handle to the full output kept outside the context.; &lt;strong&gt;The model sees:&lt;/strong&gt; 1.2 KB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write subgoal&lt;/strong&gt;: &lt;strong&gt;What happens:&lt;/strong&gt; Posting to Slack is a write. The risk policy shows the user the draft message and waits for a confirmation before &lt;code&gt;slack.post_message&lt;/code&gt; runs.; &lt;strong&gt;The model sees:&lt;/strong&gt; The draft message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Count the tokens with the 400-token schema assumption from earlier. Showing the whole catalog would cost about 480k tokens on every turn, more than most context windows hold. This run used three menus of about 200 tokens and three schemas of about 400, roughly 1,800 tokens, a cut of more than 99%. Those are assumptions multiplied out, not a measurement.&lt;/p&gt;

&lt;p&gt;The more useful observation is where the LLM acted. It made two decisions that choose tools: splitting the request, and choosing from a menu of six. It also supplied one missing parameter and drafted the Slack message, but neither of those picks a tool. Every other step was an index, a rule or a learned ranker. That is the point of the control plane. If this run had gone wrong, it would have gone wrong in one identifiable place. Had &lt;code&gt;k8s.get_rollout_status&lt;/code&gt; never been retrieved, that is a retrieval miss. Had it been retrieved and cut, that is the reranker. Had it been chosen and called badly, the validator catches it before anything runs.&lt;/p&gt;

&lt;p&gt;11 / Judgment&lt;/p&gt;

&lt;h2&gt;
  
  
  What to build at which scale
&lt;/h2&gt;

&lt;p&gt;Here is the whole flow in one place, in three stages. It starts where the user does, with the request. The tag on each step says whether it is rules, a learned model, or the LLM. Two of the eight steps are the LLM, and every loop is decided by code.&lt;/p&gt;
Fig. 1. Discovery is a stage separate from execution, and the reasoning model never sees the full catalog. Tags: LLM (green), LEARNED (accent), RULES and INDEX (blue). Red arrows are failure paths, the accent arrow is the loop for a new subgoal.



&lt;p&gt;You do not need all of it. The thresholds below are my judgment from building these systems, not measured boundaries. In my simulation the full-schema baseline crossed the 70% context-utilization line at about 50 tools, which is why the first row is short. That figure depends on the context window and on how much the system prompt and conversation already occupy, so rerun it with your own numbers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Up to ~50&lt;/strong&gt;: &lt;strong&gt;What breaks first:&lt;/strong&gt; Nothing yet.; &lt;strong&gt;Add:&lt;/strong&gt; Nothing. Send them all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;50 to 200&lt;/strong&gt;: &lt;strong&gt;What breaks first:&lt;/strong&gt; Cost and mid-list misses.; &lt;strong&gt;Add:&lt;/strong&gt; The baseline pipeline: one embedding, top-k, definitions, validation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;200 to 1,000&lt;/strong&gt;: &lt;strong&gt;What breaks first:&lt;/strong&gt; Near-duplicates, multi-step tasks, unmeasurable failures.; &lt;strong&gt;Add:&lt;/strong&gt; Hybrid retrieval, hard filters, progressive disclosure, per-stage recall.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1,000+&lt;/strong&gt;: &lt;strong&gt;What breaks first:&lt;/strong&gt; Shortlists crowded by one family, catalog rot, stage latency.; &lt;strong&gt;Add:&lt;/strong&gt; Domain routing, a trained reranker, per-subgoal discovery, catalog ownership and linting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where this breaks in production&lt;/p&gt;

&lt;p&gt;Each stage adds latency, and I have not measured a full stack end to end, so budget it before you commit. Indexes go stale when a server ships a new schema, which is why &lt;code&gt;schema_version&lt;/code&gt; exists. And tool descriptions are attacker-controlled text. In my simulation, gating cut the success rate of 50 poisoned descriptions from 38% to 6%. That was a side effect of never showing irrelevant tools, not a defense, and it needs a real one. The attacks to design for are tool poisoning (instructions hidden in a description), tool shadowing (a third-party tool describing itself to win selection over a trusted one) and a description that changes after it was approved. In the control plane that means hashing each description at approval and re-reviewing on change, treating third-party descriptions as untrusted input in catalog linting, and keeping write tools behind the risk policy whatever any description says. Log per-stage latency (p50 and p95) next to per-stage recall.&lt;/p&gt;

&lt;p&gt;12 / Closer&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;For classification, the rule is to stop asking the LLM to remember the taxonomy and give it the taxonomy when it needs it. I would keep that and add its counterpart for tools.&lt;/p&gt;

&lt;p&gt;Do not ask the LLM to be the only thing standing between a request and a side effect. Give it a small, filtered, well-described menu. Run the rules around it in code. Measure every stage, so that when the agent is wrong you know which part to fix.&lt;/p&gt;

&lt;p&gt;My design rule fits in one line. The LLM reasons over the actions that are viable right now and does not carry the platform's whole capability surface in every prompt. Retrieve broadly, filter deterministically, rerank intelligently, and reveal full tool details only when the model needs them.&lt;/p&gt;

&lt;p&gt;At 100 tools, the model does the work. At 1,000, the control plane does most of it, and the model makes the last call.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://tech.anujsadani.in/tool-selection-at-scale/" rel="noopener noreferrer"&gt;Read the original on Anuj Sadani | Tech&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
