<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Lu's Blog</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <icon>https://bl8ds.com/en/favicon.svg</icon>
  <id>https://bl8ds.com/en/</id>
  <link href="https://bl8ds.com/en/" rel="alternate"/>
  <link href="https://bl8ds.com/en/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, Lu's Blog</rights>
  <subtitle>Notes on technology, products, and AI in practice</subtitle>
  <title>Lu's Blog</title>
  <updated>2026-11-30T20:25:02.000Z</updated>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="AI Coding" scheme="https://bl8ds.com/en/tags/AI-Coding/"/>
    <category term="Code Review" scheme="https://bl8ds.com/en/tags/Code-Review/"/>
    <category term="Engineering Efficiency" scheme="https://bl8ds.com/en/tags/Engineering-Efficiency/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A common scenario: a PR has several hundred lines of changes, most of them AI-generated. Review time goes into naming, function decomposition, “you could drop a temporary variable here.” When the meeting ends, nobody has asked: this code assumes upstream will always return within 3 seconds—does that assumption hold?</p><p>This isn’t because reviewers are careless. Review trains attention to land exactly here: naming, indentation, boundaries, null handling. The problem is that AI happens to do this layer very cleanly, so review attention stalls at the lowest-value place.</p><h2 id="AI-has-driven-the-cost-of-“does-it-look-right”-very-low"><a href="#AI-has-driven-the-cost-of-“does-it-look-right”-very-low" class="headerlink" title="AI has driven the cost of “does it look right” very low"></a>AI has driven the cost of “does it look right” very low</h2><p>Watching coding style used to make sense. Different people write code very differently; inconsistent style accumulates into long-term maintenance cost, and style problems (duplicated logic, overly long functions, implicit coupling) really can predict defects. That experience had a high cost-performance ratio in the era of purely human-written code.</p><p>Now the marginal return on this layer is dropping fast. Model-generated code has consistent style, tidy naming, plausible comments; add lint, formatting, type checking, and most surface problems are caught before review. What you pick out in a diff is increasingly “I’d write it differently,” not “this will break.”</p><p>Conversely, AI-generated code has a structural weakness: its assumptions about requirements are inferred, and the inference process isn’t recorded anywhere.</p><p>When people write code, hesitation leaves traces. A commit message saying “writing it this way for now, pending confirmation,” a temporary discussion, a TODO in the code, even an unusually long variable name—all tell later readers there was a trade-off here. AI doesn’t. It outputs a confident, complete result that looks like everything was considered. The hesitation is smoothed away, and it’s smoothed away exactly where it most needs to be seen.</p><p>So the focus of review should shift from “is this written correctly” to “is this solving the problem we actually need solved, and what assumptions does it make about the runtime environment.” Tools have largely taken over whether the writing is correct; people doing it again is duplicated effort.</p><p>In AI-generated code, the most expensive defects aren’t syntax or style—they’re a reasonable but wrong assumption about a constraint you never wrote down. These defects don’t fail the build; they just make the system behave abnormally someday in a way nobody anticipated.</p><h2 id="A-three-line-PR-description-is-worth-more-than-a-several-hundred-line-diff"><a href="#A-three-line-PR-description-is-worth-more-than-a-several-hundred-line-diff" class="headerlink" title="A three-line PR description is worth more than a several-hundred-line diff"></a>A three-line PR description is worth more than a several-hundred-line diff</h2><p>The approach is crude: require the submitter to answer three questions in the PR description.</p><ul><li>What behavior should change with this change, in business language, not technical language</li><li>Approaches considered but not adopted, and why they were rejected</li><li>Assumptions you’re not confident about, listed one by one</li></ul><p>The third matters most. The uncertainty in AI-written code is real; it just doesn’t volunteer it. Getting the submitter (usually the person who wrote the prompt) to write down “I’m not sure” turns implicit assumptions into reviewable objects. Only a person can fill this in, because only the person knows what they didn’t say at the time. The template can be just these few lines:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">intent:</span> <span class="string">一句话说清这次改动改变了什么用户可见或系统可见的行为</span></span><br><span class="line"><span class="attr">rejected:</span> <span class="string">考虑过但没采用的方案，以及否掉的理由</span></span><br><span class="line"><span class="attr">unsure:</span> <span class="string">这次改动里我没有把握的假设，逐条列出</span></span><br></pre></td></tr></table></figure><p>The first action in review therefore becomes: don’t look at the diff; read these three paragraphs first, then ask “if I accept this against this intent, which test proves it was achieved.” If they can’t answer, don’t look at the diff yet. This isn’t process purism. A change whose intent can’t even be stated can’t be judged line by line either—you’ll only read style disagreements.</p><p>There’s another case worth noting: the submitter can’t write the intent. This usually means the problem is earlier in the chain—what was wanted wasn’t clear when the prompt was given. In that case, sending it back to redo is much cheaper than filling in the gaps by guessing during review.</p><p>No matter how beautifully a piece of code is written, if it solves a different problem than the one you think, approving the review is a precondition for an incident.</p><h2 id="Failure-paths-AI’s-error-handling-is-often-decorative"><a href="#Failure-paths-AI’s-error-handling-is-often-decorative" class="headerlink" title="Failure paths: AI’s error handling is often decorative"></a>Failure paths: AI’s error handling is often decorative</h2><p>The most common shape of AI-generated code: the main flow has all its branches, exception handling appears to exist, but it doesn’t hold up to questioning. try&#x2F;except wraps it, and the except logs a line and returns None. Retries are written, but with no backoff and no cap. A batch operation has half successes and half failures, and the function just returns the successful part.</p><p>These usually don’t show up in demos or unit tests, because tests mostly verify the happy path. In production the symptom is “the API occasionally returns empty and nobody knows why,” and then someone spends half a day adding logs to locate it.</p><p>Points worth asking about one by one in review:</p><ul><li>Retries: is there backoff, is there a cap, is the retried operation idempotent</li><li>Timeouts: is one set for every external call, and what trace does this request leave after a timeout</li><li>Partial failure: where do the failed items in a batch go, can the caller know</li><li>Resources: connections, handles, locks—are they released on exception paths</li></ul><p>This judgment has boundaries. A script you run once and throw away doesn’t need any of this; if it crashes, rerun it. But as long as this path has state, concurrency, or someone waiting on the result, the quality of failure handling determines whether it can ship or only demo.</p><p>AI being weak on failure paths isn’t accidental. Training data contains far more successful code than failing code, and error handling written wrong often doesn’t fail tests—it doesn’t produce red lights, only silence.</p><h2 id="Maintainability-is-about-whether-others-can-change-it"><a href="#Maintainability-is-about-whether-others-can-change-it" class="headerlink" title="Maintainability is about whether others can change it"></a>Maintainability is about whether others can change it</h2><p>AI is very good at generating things that look well-structured: an extra interface layer, an extra config option, an extra strategy class. At the moment of generation the abstraction is self-consistent, because it was thought through all at once. The problem is that the next person to change it has to rebuild that abstraction in their head, and the rebuild cost doesn’t show up in any metric.</p><p>Here are two fairly plain criteria. First: when this code breaks at midnight, can the on-call person locate the failing line without reading the whole file. Second: how many files need changing to delete this code. If the answer is “many,” the coupling didn’t disappear—it was hidden behind the abstraction.</p><p>The second criterion is especially effective for AI-generated code. Models tend to reserve structure for “possible future extension,” and the real direction of extension often differs from what they guessed. The reserved interfaces end up either idle or bypassed on the second change, becoming corners nobody dares to delete.</p><p>One more detail deserves its own mention: naming. AI-chosen function names often accurately describe what it does, but not why it exists. In review, asking “if this function didn’t exist, which requirement would be missing” is far more useful than asking “is this name appropriate.” The former exposes duplicate implementations and pseudo-abstractions; the latter only yields taste arguments.</p><h2 id="The-process-has-to-change-too-or-all-of-the-above-is-empty-talk"><a href="#The-process-has-to-change-too-or-all-of-the-above-is-empty-talk" class="headerlink" title="The process has to change too, or all of the above is empty talk"></a>The process has to change too, or all of the above is empty talk</h2><p>A few actions you can take immediately.</p><p>Set a cap on diff size per review. The rule of thumb is on the order of a few hundred lines; beyond that, defects found per line drop noticeably. AI speeds up output, so bigger diffs are almost inevitable—which makes this old rule more necessary to enforce, not something to relax because “it’s all AI-written anyway.”</p><p>Split review into two passes. The first pass reads only the intent, the changed interface signatures, and new dependencies, judging whether this should be done at all. The second pass looks at the implementation, judging whether it’s done right. Separating the two passes by some time is even better; when one person reads several hundred lines straight through, the second pass’s attention is fake.</p><p>Separate human review from model review. Let tools scan first for style, boilerplate issues, and obvious null-pointer risks, and auto-fix what can be fixed automatically. Spend human time only on semantics: is this behavior change what we want, and what happens after failure. Mix the two, and people get worn down by trivial comments first.</p><p>High-risk modules do not accept “looks fine.” For changes involving money, permissions, data migration, or concurrency, require the submitter to provide a test that reproduces the failure path. Being unable to write that test usually means the failure path was never considered, not that the test is hard to write.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[打开 diff] --&gt; B[读 intent 三段]    B --&gt; C{能说出验收方式}    C --&gt;|否| D[退回补描述]    C --&gt;|是| E[看接口签名与新增依赖]    E --&gt; F{涉及钱 权限 并发 迁移}    F --&gt;|是| G[逐行读实现 要求失败测试]    F --&gt;|否| H[重点看失败路径]    H --&gt; I[抽样读实现]    G --&gt; J[合入]    I --&gt; J</pre></div><h2 id="In-some-cases-the-code-still-needs-to-be-read-line-by-line"><a href="#In-some-cases-the-code-still-needs-to-be-read-line-by-line" class="headerlink" title="In some cases, the code still needs to be read line by line"></a>In some cases, the code still needs to be read line by line</h2><p>The reverse also needs to be stated clearly, otherwise it is easy to slide into the wrong conclusion that “how it is written does not matter.”</p><p>For code that many people will repeatedly modify—such as shared libraries, infrastructure, and framework layers—readability weighs more than one-off business logic. In places involving security boundaries and permission checks, one extra branch is a vulnerability. When a team has many newcomers and spends far more time reading code than writing it, how the code is written is itself a collaboration cost. There is also a category that is easy to overlook: code that will be copied as an example. Model-generated code is especially likely to be copied because it looks like a standard answer.</p><p>In these cases, reading line by line is worth it. For most other business code, the return on reading line by line is lower than spending that time clarifying assumptions. This trade-off is not a permanent conclusion; it depends on your team size, module lifespan, and cost of incidents. Within the same team, the review standard for the payment path and the review standard for the operations backend should not be the same in the first place.</p><p>One more thing: review comments themselves should also be classified. For comments like “this could be more elegant,” if the submitter can clearly explain why the current approach was chosen, it should be allowed to stay; if they cannot, then it is not a style issue but a lack of intent. The cost of distinguishing the two is low, and the benefit is freeing review meetings from aesthetic debates.</p><p>Next time you open a diff with AI involvement, do not scroll through the code first. Ask the submitter one question: which assumption here, if wrong, would make the entire change pointless? The answer is usually not in the diff, and that is where review time should be spent.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/14/small-team-code-review/">A four-person team, with only three rules for code review</a><span class="shared">Code Review · Engineering Efficiency</span></li><li><a href="/en/2026/11/29/ai-coding-refactor-mechanical-vs-design/">Refactoring is the most underrated application of AI coding</a><span class="shared">AI Coding</span></li><li><a href="/en/2026/11/26/code-completion-roi-in-legacy-codebases/">Code completion yields near-zero benefit in legacy projects; the problem is not the model</a><span class="shared">Engineering Efficiency</span></li><li><a href="/en/2026/11/21/completion-vs-code-review-evaluation/">Completion depends on the acceptance rate; review depends on the miss rate</a><span class="shared">Code Review</span></li><li><a href="/en/2026/09/23/what-ai-coding-changed-and-didnt/">AI saves the typing, not the judgment</a><span class="shared">Code Review</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/12/01/ai-code-review-shift-to-intent-and-boundaries/</id>
    <link href="https://bl8ds.com/en/2026/12/01/ai-code-review-shift-to-intent-and-boundaries/"/>
    <published>2026-11-30T20:25:02.000Z</published>
    <summary>When most of the code in a diff is generated by a model, the payoff from picking apart coding style line by line keeps shrinking. This piece discusses where review focus should shift, and which types of modules still must be read line by line.</summary>
    <title>The more code AI writes, the more reviews should focus on intent and boundaries</title>
    <updated>2026-11-30T20:25:02.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Agent" scheme="https://bl8ds.com/en/tags/Agent/"/>
    <category term="Evaluation" scheme="https://bl8ds.com/en/tags/Evaluation/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <category term="Tool Design" scheme="https://bl8ds.com/en/tags/Tool-Design/"/>
    <content>
      <![CDATA[<p>When an agent gets its fifteenth tool, the problem usually isn’t that it can’t call them—it’s that it starts hesitating among several tools that could all do the job. Every additional tool in the registry gives the model one more option it has to rule out; when those options’ descriptions all contain “query,” “order,” and “export,” picking the wrong one is only a matter of time.</p><p>A common scenario is a customer-service agent. At first it had only three tools—look up order, change address, process refund—and ran steadily. Then the logistics team added track shipment, the finance team added issue invoice, and the operations team added send coupon; every team felt its own tool was essential. The tool count grew from single digits to twenty-odd. Each tool works fine on its own, but together they start causing problems: the user says “refund” and the agent calls cancel order; the user says “check refund progress” and the agent looks up payment records.</p><p>These errors are different from wrong parameters. Wrong parameters can usually be caught by validation; wrong selection often sails right through: the tool returns a seemingly relevant result, the model keeps generating on top of it, and the user ends up with an answer that is semantically correct but about the wrong object. Worse, in single-tool evaluations every tool is correct—the problem only appears in the full candidate set.</p><h2 id="Each-tool-is-right-on-its-own-wrong-together"><a href="#Each-tool-is-right-on-its-own-wrong-together" class="headerlink" title="Each tool is right on its own, wrong together"></a>Each tool is right on its own, wrong together</h2><p>Many teams evaluate tools like this: give each tool ten queries, and put only that tool plus two random negatives in the candidate set. Pass rates quickly look good, so the conclusion is that the tool is usable. But the error rate won’t come down after launch, because real requests don’t face two random negatives—they face a dozen semantically adjacent tools.</p><p>The user says “export last month’s refund orders to finance.” The candidates include <code>query_refund</code>, <code>export_refund</code>, <code>create_report</code>, <code>send_email</code>, <code>query_order</code>. Every tool’s documentation says “refund,” “order,” “export,” “send,” so the model easily calls <code>query_refund</code> first, then hands the result to <code>send_email</code>. It looks like the task is done, but the export and permission checks never happened. This isn’t the model failing to use tools—it’s the candidates not being distinguishable enough from one another.</p><p>The first thing to change in evaluation is to switch negatives from random to near-neighbors. If the correct tool is <code>export_refund</code>, the negatives should be <code>query_refund</code>, <code>create_report</code>, <code>query_order</code>—not weather and calendar. Only near-neighbor negatives can test whether the model understands the boundaries. The second thing is that evaluation must run on the real candidate set, not a candidate set shrunk down to just the correct tool. A shrunken candidate set only proves the tool can be called; it doesn’t prove the model can pick it correctly.</p><h2 id="Once-the-candidate-set-grows-the-model-loses-on-elimination-first"><a href="#Once-the-candidate-set-grows-the-model-loses-on-elimination-first" class="headerlink" title="Once the candidate set grows, the model loses on elimination first"></a>Once the candidate set grows, the model loses on elimination first</h2><p>Tool count itself isn’t the only cost. A tool with parameter descriptions takes roughly one to three hundred tokens in context; twenty of them is two to three thousand to start. What’s expensive isn’t just those tokens—it’s that the model has to eliminate among them. Every tool’s description competes for attention; the more alike the descriptions, the harder the elimination.</p><p>What really affects selection is the number of tools competing with each other under the current request, not the total registry size. A weather tool, a calendar tool, and a calculator are orthogonal; adding them up to ten may not cause trouble. Conversely, six tools all called “order lookup” can make the model pick wrong even if the total is small. Tool count is only the surface; confusion is the real variable.</p><p>Confusion comes from several places: the same object with multiple verb variants, such as look up user, search user, find user by phone number; the same action with multiple permission versions, such as normal refund and manual refund; descriptions full of boundaryless words like “query,” “manage,” “handle.” When the model selects tools, it doesn’t select by code call chain—it selects by semantic similarity. The more the descriptions overlap, the more likely it picks the one that looks most similar rather than the most correct.</p><p>There’s an easily overlooked cost here: wrong selection pushes cost downstream. After picking the wrong tool, the model may keep using the wrong result for the next step; the longer the call chain, the more expensive the correction. A wrong read costs the user a few extra seconds; a wrong write may change state, send notifications, or produce a refund. Tool-set governance isn’t fussiness—it’s putting a ceiling on errors.</p><h2 id="Layered-exposure-give-the-catalog-first-then-the-tools"><a href="#Layered-exposure-give-the-catalog-first-then-the-tools" class="headerlink" title="Layered exposure: give the catalog first, then the tools"></a>Layered exposure: give the catalog first, then the tools</h2><p>Once there are many tools, the default approach isn’t to write a longer system prompt but to split exposure into two layers: first let the model choose a capability domain, then expose only the tools in that domain. The catalog layer only says what each domain covers and doesn’t cover, without expanding parameters; only within a domain is the full schema given.</p><p>The chain below answers where a request should narrow its candidate set.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[用户请求] --&gt; B{先判能力域}    B --&gt;|订单| C[订单域 3到5个工具]    B --&gt;|退款| D[退款域 3到5个工具]    B --&gt;|不确定| E[澄清或列目录]    C --&gt; F[域内选工具]    D --&gt; F    E --&gt; F    F --&gt; G[执行并记录候选集]</pre></div><p>The most important thing in this diagram isn’t the extra decision—it’s that a wrong decision still has a fallback. Domain routing can be cheap: a small model, rules, or a short classification will do. It doesn’t need to get it right in one shot; it only needs to expand the catalog to the model or ask the user when uncertain. What’s least acceptable is stuffing all tools into context by default and hoping the model picks correctly among twenty options in one go.</p><p>How should domains be split? By user task, not by team organization. Orders, refunds, logistics, accounts—these are task boundaries users can perceive; transaction middle platform, fulfillment platform, financial settlement—these are internal organizational boundaries. If the tool catalog is split by team, the model sees “finance tools” and “fulfillment tools,” but it doesn’t know who should own the user’s “refund.” The catalog layer should use user language, not organizational language.</p><p>How many tools to expose per domain: start with five to eight. This number isn’t a model limit—it’s so evaluation can cover pairwise confusion. Above eight, first see whether the domain can be split; below three, consider whether it should be merged back into the layer above. Write operations should be narrower: a wrong read tool costs a few seconds; a wrong write tool may change state, send messages, or move money, and can’t be covered by retries.</p><h2 id="Narrowing-the-candidate-set-merge-synonymous-tools-cut-pseudo-tools"><a href="#Narrowing-the-candidate-set-merge-synonymous-tools-cut-pseudo-tools" class="headerlink" title="Narrowing the candidate set: merge synonymous tools, cut pseudo-tools"></a>Narrowing the candidate set: merge synonymous tools, cut pseudo-tools</h2><p>Layering only splits the candidate set; reducing selection difficulty still requires merging. Many so-called new tools are just old tools with a different verb. <code>get_user</code>, <code>query_user</code>, <code>search_user</code>, <code>get_user_by_phone</code> can be merged into a single <code>find_user</code>, distinguished by three parameters: <code>by_id</code>, <code>by_email</code>, <code>by_phone</code>. The model doesn’t need to know four tool names; it only needs to know the one action “find user.”</p><p>Merging isn’t cramming twenty tools into one <code>manage_order</code> and using a twenty-item action enum. That just moves the tool-level selection error down to the parameter level—the model still has to choose among twenty actions. The goal of merging is to reduce options at the same decision point, not to turn the interface into a universal remote.</p><table><thead><tr><th>Situation</th><th>Handling</th><th>Boundary</th></tr></thead><tbody><tr><td>Query variants of the same object with the same permissions</td><td>Merge into one tool, distinguish by parameters</td><td>If the parameter enum exceeds five or six, consider splitting again</td></tr><tr><td>Reads and writes</td><td>Separate by default</td><td>Cannot merge when the write requires confirmation or approval</td></tr><tr><td>Cross-domain orchestration</td><td>Put it in an upper-layer flow, not a single tool</td><td>Don’t let one tool handle both orders and refunds</td></tr><tr><td>Descriptions containing “manage” or “handle”</td><td>Rewrite as specific actions and counterexamples</td><td>State clearly in the tool description what it does not do</td></tr></tbody></table><p>Tool descriptions should state boundaries, not marketing lines. “Cancel order” saying only “cancels unpaid orders; paid orders go through refund” is far more useful than “supports order cancellation capability.” When the model eliminates among candidates, counterexamples often help it distinguish better than positive examples.</p><p>The catalog layer can be as simple as this one page:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">domains:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">order</span></span><br><span class="line">    <span class="attr">scope:</span> <span class="string">查询和修改订单状态，不处理退款</span></span><br><span class="line">    <span class="attr">tools:</span> [<span class="string">get_order</span>, <span class="string">cancel_order</span>, <span class="string">update_address</span>]</span><br><span class="line">  <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">refund</span></span><br><span class="line">    <span class="attr">scope:</span> <span class="string">退款申请和进度查询，不处理支付失败</span></span><br><span class="line">    <span class="attr">tools:</span> [<span class="string">create_refund</span>, <span class="string">get_refund</span>]</span><br><span class="line">  <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">logistics</span></span><br><span class="line">    <span class="attr">scope:</span> <span class="string">查物流轨迹和修改收货时间</span></span><br><span class="line">    <span class="attr">tools:</span> [<span class="string">get_tracking</span>, <span class="string">update_delivery_time</span>]</span><br></pre></td></tr></table></figure><p>The purpose of the catalog layer is not to make the model remember every tool, but to let it know which layer to look in. If the catalog is too detailed, it effectively exposes the full tool set all over again; if it is too coarse, the model can only guess. One sentence per domain, stating what it covers and what it does not, is enough.</p><h2 id="Logging-and-evaluation-look-at-the-candidate-set-first-then-the-call"><a href="#Logging-and-evaluation-look-at-the-candidate-set-first-then-the-call" class="headerlink" title="Logging and evaluation: look at the candidate set first, then the call"></a>Logging and evaluation: look at the candidate set first, then the call</h2><p>When a tool is chosen incorrectly, many logs record only the name and parameters of the tool that was ultimately called. Such logs make post-mortems impossible: was the tool not exposed, was the domain routed incorrectly, was the description too similar, or were the parameters filled in wrong? These four causes map to four different fixes; mixed together, you can only guess.</p><p>I record at least four things: the original request text, the domain it was routed to, the list of tools exposed at that moment, and the tool finally selected. Recording the scores or ranking of candidate tools is better; if you cannot, it is not essential. The key is to fix the candidate set so the same request can be replayed. A log without a candidate set shows only the outcome, not the choice space.</p><p>Evaluation follows the same idea. Sample a batch of real requests, label each with the correct tool, add two or three near-neighbor negative samples, and run two groups: the full candidate set and the layered candidate set. If the full set degrades badly while the layered set recovers, the problem lies in candidate-set governance, not model capability. Only when both groups degrade should you look at the model and the prompt.</p><p>Do not look only at the final success rate. After choosing the wrong tool, the model may retry once and get it right; the final success rate will not show this, but latency and cost have already gone up. First-attempt accuracy and average number of tool calls are more sensitive. A drop in first-attempt accuracy and a rise in retries usually show up earlier than user complaints.</p><h2 id="Not-every-Agent-needs-layering"><a href="#Not-every-Agent-needs-layering" class="headerlink" title="Not every Agent needs layering"></a>Not every Agent needs layering</h2><p>Layering itself has a cost: one more routing decision, one more failure point, and extra latency. When there are fewer than eight tools, they are mutually orthogonal, and there are no synonymous tools, exposing everything directly is simpler. My current default is to start domain routing only when the tool count reaches the teens, or when two or more groups of near-synonymous tools appear; write operations do not wait for this threshold and are always narrowly exposed.</p><p>There is another boundary: if tool-selection errors occur mainly in parameters rather than tool names, do not add layering yet; first get the parameter schema and validation right. Layering solves “which tool to choose”; it does not solve “the right tool was chosen but the parameters were filled in wrong.” Keep the two kinds of errors separate so that changes do not mask each other.</p><p>Before adding a tool to an Agent next time, ask one question: is it a new capability, or another name for an old one? If the latter, merge it first; if it really is a new capability, then think about which domain it belongs to and when it should be exposed. More tools is not better, and a larger candidate set is not stronger. Letting the model see only the options it should see at each step is more reliable than making it remember all the options.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/23/agent-capability-ceiling-tool-design/">The ceiling of an agent lies not in the model, but in the tool interface design</a><span class="shared">Agent · Tool Design</span></li><li><a href="/en/2025/07/22/agent-toolset-subtraction/">Cut the agent toolset down to nine: generic tools are the real trap</a><span class="shared">Agent · Tool Design</span></li><li><a href="/en/2026/11/30/first-eval-set-from-search-logs/">For the first version of the evaluation set, don't wait for annotation—sample two hundred retrieval logs first</a><span class="shared">Evaluation</span></li><li><a href="/en/2026/11/29/dont-use-agent-for-single-prompt-task/">One prompt is enough, don't bring in an Agent</a><span class="shared">Agent</span></li><li><a href="/en/2026/11/27/llms-txt-link-annotations/">llms.txt only contains links, so the agent can only guess</a><span class="shared">Agent</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/12/01/agent-tool-overload-candidate-set/</id>
    <link href="https://bl8ds.com/en/2026/12/01/agent-tool-overload-candidate-set/"/>
    <published>2026-11-30T20:24:15.000Z</published>
    <summary>Once the number of tools increases, Agent failures shift from parameter errors to selection errors. This article breaks down the specific practices of layered exposure, merging synonymous tools, and candidate set evaluation.</summary>
    <title>With more than a dozen tools available, Agents first fail by choosing the wrong one</title>
    <updated>2026-11-30T20:24:15.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Inference Costs" scheme="https://bl8ds.com/en/tags/Inference-Costs/"/>
    <category term="Long Context" scheme="https://bl8ds.com/en/tags/Long-Context/"/>
    <category term="Product trade-offs" scheme="https://bl8ds.com/en/tags/Product-trade-offs/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>“I’ll just stuff the entire document library into the context and the model can answer any question” — I’ve seen this assumption collapse more than once. A team doing after-sales support loaded over three hundred product documents into a 128k window in one go, and the frontend simply stopped doing retrieval. After launch, the answer style was indeed more coherent, but wrong answers on clause details didn’t decrease, time-to-first-token went from under a second to three or four seconds, and inference cost per session rose by an order of magnitude. The window was sufficient; the capability didn’t follow.</p><p>This bill has to be broken down. Doubling the window buys addressable space — not usable attention, and not proportional cost. Mix these three things together and expanding the window becomes an architectural decision that looks free but is actually very expensive.</p><h2 id="The-window-is-address-space-not-attention"><a href="#The-window-is-address-space-not-attention" class="headerlink" title="The window is address space, not attention"></a>The window is address space, not attention</h2><p>Most long-context evaluations use “needle in a haystack”: bury one sentence in a pile of irrelevant text and see whether the model can retrieve it verbatim. These tests pass at high rates because the task only requires locating a single point. Real business rarely asks questions this way. A user asks “which of these three rules takes precedence,” and the model has to compare three places at once and rule out two similar but outdated notes. Locating and comparing are two different levels of difficulty.</p><p>The structural reason isn’t hard to explain. Attention scores all token pairs in the input; there’s no explicit switch for “this page is irrelevant, skip it.” Irrelevant material doesn’t sit quietly — it competes for weight. Put ten documents in the context, seven of them irrelevant, and those seven dilute the weight of the three genuinely useful ones at every layer. The effective context is therefore noticeably shorter than the nominal window, and it shrinks as distractor density rises. One phenomenon repeatedly observed in public research is position bias: information placed at the beginning and end is more likely to be used, while information buried in the middle is easily missed.</p><p>The judgment here: for tasks requiring multi-hop reasoning — that is, tasks where several pieces of information must be chained together to answer — cutting irrelevant material from ten documents to three often helps accuracy more than expanding the window from 32k to 128k. Doubling the window mainly buys space to hold more irrelevant material, unless you also do the filtering.</p><p>A counterexample shows the problem isn’t only about length. One team fed a two-hundred-page contract in whole and asked “how is the penalty calculated”; the model answered cleanly and crisply, because the relevant clause was on the first two pages. Switch to “which clauses in this contract conflict with Appendix 3” — same input, same model — and the error rate immediately climbs. The former is locating; the latter is comparing. Under the same window, performance on the two tasks can differ enormously.</p><h2 id="Cost-is-two-different-curves"><a href="#Cost-is-two-different-curves" class="headerlink" title="Cost is two different curves"></a>Cost is two different curves</h2><p>The first segment is prefill — running the entire input through one forward pass. The attention portion of the computation grows roughly quadratically with sequence length; the rest grows linearly. Quadruple the length and prefill workload rises by more than ten times, at that order of magnitude. What the user perceives is time-to-first-token: a few hundred milliseconds for short requests, several seconds for long inputs — and this latency can’t be masked with streaming output, because not a single character has been generated yet.</p><p>The second segment is the KV cache — the key-value cache that must stay in GPU memory during decoding. Every token’s key and value must be held; occupancy grows linearly with context length, and is multiplied by the number of concurrent requests. Quadruple the window, and memory per request quadruples, while the number of requests a single card can serve concurrently drops to roughly a quarter. Latency and throughput degrade together, and this is determined by hardware — no amount of tuning brings it back.</p><p>The billing structure amplifies this once more. Most vendors use tiered pricing for long inputs: past a certain threshold the unit price goes up, so long context isn’t bought at a linear price. Prefix caching can save the prefill of a repeated prefix, but it can’t save memory occupancy, and it can’t save the squeezed concurrency. Caching solves duplicate billing, not capacity.</p><table><thead><tr><th></th><th>Short context plus retrieval</th><th>Long context fed in whole</th></tr></thead><tbody><tr><td>Time-to-first-token</td><td>Stable at the few-hundred-millisecond level</td><td>Rises with input length, reaching seconds</td></tr><tr><td>Cost per request</td><td>Proportional to the number of retrieved chunks</td><td>Superlinear, and triggers tiered unit pricing</td></tr><tr><td>Concurrency density</td><td>High</td><td>Noticeably lower</td></tr><tr><td>Multi-hop accuracy</td><td>Constrained by retrieval quality; chunking severs dependencies</td><td>Better when material is complete, worse when distractors are many</td></tr><tr><td>Primary failure mode</td><td>The chunk that should have been recalled wasn’t</td><td>Attention diluted; answers look plausible but details are wrong</td></tr></tbody></table><p>Stack the two curves and the consequence is: the cost of short context plus retrieval grows linearly with request count, while the cost of long context fed in whole grows with request count multiplied by length. Double the business volume and the former’s bill doubles; the latter’s may multiply several times over.</p><h2 id="When-long-context-is-genuinely-worth-it"><a href="#When-long-context-is-genuinely-worth-it" class="headerlink" title="When long context is genuinely worth it"></a>When long context is genuinely worth it</h2><p>The criterion isn’t whether the window is big enough — it’s whether the material has dependencies that must be visible simultaneously.</p><p>Long context genuinely wins in three kinds of scenarios. Cross-section consistency checks, such as conflicting clauses earlier and later in a contract, or the same metric appearing under two definitions in a document. Codebase-level changes, where changing a function signature requires seeing all callers and implementations at once. Timeline attribution, such as who agreed to what at which step in a long meeting transcript. In these tasks, chunking severs dependencies, and no matter how accurate retrieval recall is, it won’t help, because the answer isn’t in any single chunk.</p><p>The unsuitable scenarios are equally clear: high-frequency consumer Q&amp;A, voice interaction, anything where time-to-first-token enters user perception. One frequently overlooked consumer is multi-turn conversation. Every turn resends the entire history; as turns accumulate, cost grows quadratically with turn count, and what the user perceives is “the longer we chat, the slower it gets.” I lean toward setting a hard cap on conversation history and compressing anything beyond it into structured state, rather than appending indefinitely.</p><p>Here’s a criterion you can use on the spot: if more than half of a request’s input is “possibly relevant,” do retrieval; only if more than half is “must be seen simultaneously to judge” is long context worth it. You don’t need precise statistics for this ratio — flipping through a few dozen real requests is enough to estimate it.</p><h2 id="Treat-context-as-a-budget-to-allocate"><a href="#Treat-context-as-a-budget-to-allocate" class="headerlink" title="Treat context as a budget to allocate"></a>Treat context as a budget to allocate</h2><p>With the window fixed, first decide what qualifies to occupy a slot, then decide how much it gets. This process answers one question: should this request assemble context, or feed the whole thing in?</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[请求进来] --&gt; B{必须同时看多处才能判断}    B --&gt;|否| C[先检索再拼上下文]    B --&gt;|是| D{一次性且可等待}    D --&gt;|否| E[切分加结构化状态]    D --&gt;|是| F[整篇送入并留余量]    C --&gt; G[限制片段数与干扰项]    F --&gt; H[预留重试与工具返回]</pre></div><p>The budget belongs in code, not in documentation. Taking a 32k window as an example, my default allocation is this:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">context_budget:</span></span><br><span class="line">  <span class="attr">window:</span> <span class="number">32768</span></span><br><span class="line">  <span class="attr">system_prompt:</span> <span class="number">1000</span>        <span class="comment"># 超过就拆，不靠模型忽略多余段落</span></span><br><span class="line">  <span class="attr">retrieved_chunks:</span> <span class="number">5</span>        <span class="comment"># 每段上限 800 token</span></span><br><span class="line">  <span class="attr">history_turns:</span> <span class="number">4</span>           <span class="comment"># 更早的压成结构化状态</span></span><br><span class="line">  <span class="attr">history_state:</span> <span class="number">600</span></span><br><span class="line">  <span class="attr">output_reserve:</span> <span class="number">3000</span>       <span class="comment"># 给生成和重试留的，不算浪费</span></span><br><span class="line"><span class="attr">on_overflow:</span> <span class="string">drop_oldest_chunk</span></span><br></pre></td></tr></table></figure><p>What to do on overflow must also be decided in advance. By default, drop the oldest or least relevant chunks, rather than hoping the model will ignore them on its own. A request with a full context will overflow the moment a tool call returns a result that needs appending, and all the preceding reasoning is wasted.</p><p>One more layer: compressing long input into structured state is usually more robust than compressing it into a summary. A summary loses fields; structured state loses phrasing. The former leaves the model one fewer number to check against; the latter merely changes the syntax.</p><h2 id="What-a-doubled-window-crushes-first-is-evaluation"><a href="#What-a-doubled-window-crushes-first-is-evaluation" class="headerlink" title="What a doubled window crushes first is evaluation"></a>What a doubled window crushes first is evaluation</h2><p>Change the window and the existing eval sets are almost all short-input, so of course the metrics don’t move. The team then concludes “the impact is small” — until those plausible-looking, detail-all-wrong answers start showing up in production.</p><p>Three things need to be added: multi-hop questions under long input; a distractor-density gradient, where the same question is paired with 3, 10, and 30 irrelevant documents respectively; and a position gradient, placing key information at the beginning, middle, and end respectively. The first two probe attention dilution; the third probes position bias.</p><p>A minimum viable approach: sample a few dozen real long inputs from production logs, manually mark which paragraph the key information falls in, then look solely at the hit rate for requests where “the key information is in the middle third.” This number is usually much uglier than overall accuracy — but it’s the metric you should actually be watching after expanding the window. Overall accuracy gets propped up by the many easy samples where “the answer is right at the beginning,” and everything looks calm.</p><p>The next time someone proposes “just make the context window bigger,” ask for three numbers first: time to first token, cost per request, and the hit rate for key information that falls in the middle section. If these three numbers don’t improve together, doubling the window just moves the problem from capability to the bill.</p><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li>Lost in the Middle: How Language Models Use Long Contexts, <a href="https://arxiv.org/abs/2307.03172">https://arxiv.org/abs/2307.03172</a></li><li>Efficient Memory Management for Large Language Model Serving with PagedAttention, <a href="https://arxiv.org/abs/2309.06180">https://arxiv.org/abs/2309.06180</a></li></ul><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/29/realtime-inference-cost-capacity-not-tokens/">Real-time interaction values capacity reservation, not token unit price</a><span class="shared">Inference Costs</span></li><li><a href="/en/2026/11/27/prefix-cache-cuts-ttft-not-decode-cost/">Prefix caching saves on the first token, not on generation length</a><span class="shared">Inference Costs</span></li><li><a href="/en/2026/11/19/sparse-attention-flops-vs-latency/">Sparse attention saves compute, so why is it slower online?</a><span class="shared">Long Context</span></li><li><a href="/en/2026/06/05/deepseek-v4-intel-roundup-sealion-lite-dualpath-and-million-context/">The price of a million-token context is hidden in the paper's appendix</a><span class="shared">Long Context</span></li><li><a href="/en/2026/03/20/the-underlying-physics-of-the-divergence-in-china-us-ai-paths-oppenhei/">Those who build atomic bombs, and those who build steam engines</a><span class="shared">Inference Costs</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/12/01/context-window-doubling-not-capability-doubling/</id>
    <link href="https://bl8ds.com/en/2026/12/01/context-window-doubling-not-capability-doubling/"/>
    <published>2026-11-30T20:22:51.000Z</published>
    <summary>The window expands from 32k to 128k, and neither attention nor cost scales proportionally. This piece breaks down three numbers for long context in real requests: time to first token, cost per request, and hit rate for key information falling in the middle segment.</summary>
    <title>Double the context does not mean double the effective capability</title>
    <updated>2026-11-30T20:22:51.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Content strategy" scheme="https://bl8ds.com/en/tags/Content-strategy/"/>
    <category term="GEO" scheme="https://bl8ds.com/en/tags/GEO/"/>
    <category term="Structured data" scheme="https://bl8ds.com/en/tags/Structured-data/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A content team adds Schema to product pages, and they do it uniformly: Article, FAQPage, Product, Review, HowTo—whatever fits, they apply; whatever fields can be filled, they fill. After launch, they wait for rich results and AI citations, but what arrives first is an old price in search results, and citing parties treating after-sales terms as product promises.</p><p>The problem isn’t Schema itself, but treating Schema as a second copy deck. The page says 299, but the markup still holds 199; the body author is Zhang San, but Organization is filled with the marketing department; the article was later revised, but dateModified is the build time. Each item alone looks like “completing information”; together they are contradictory evidence.</p><p>Citing parties won’t give face just because there’s more markup. They first have to determine which entity this page is actually about, then whether the statement can be verified. Once fields conflict, everything after becomes guesswork.</p><h2 id="Schema-is-an-entity-declaration-not-a-keyword-warehouse"><a href="#Schema-is-an-entity-declaration-not-a-keyword-warehouse" class="headerlink" title="Schema is an entity declaration, not a keyword warehouse"></a>Schema is an entity declaration, not a keyword warehouse</h2><p>Schema.org provides a vocabulary for describing entities and relationships. Putting Product on a page declares “the subject of this page is a product”; putting Offer declares “there is a transactable price and stock condition here”; putting Article declares “this page is an article with an author and publication time.” These declarations are for parsers to disambiguate entities—to confirm which product or which person this page is about—not to add keywords for search engines.</p><p>This is also why “apply whatever fits” is off from the start. A product detail page usually has only one subject: Product. Brand, Offer, and AggregateRating are附属 information, and only hold when the page actually displays them and there is a stable source. Cramming in a FAQPage won’t make the product better understood by users; it just gives the parser another set of Q&amp;A pairs to verify.</p><p>My default rule: one page template allows only one primary type, with at most two附属 types; for each additional one, you must be able to explain its relationship to the primary entity. If you can’t explain the relationship, delete it. This rule isn’t for cleanliness, but to reduce the probability of the same property appearing with multiple values.</p><h2 id="Citing-parties-align-first-then-trust"><a href="#Citing-parties-align-first-then-trust" class="headerlink" title="Citing parties align first, then trust"></a>Citing parties align first, then trust</h2><p>Feeding a page to search or AI citation systems roughly involves these steps: crawl the body and JSON-LD (structured data scripts embedded in the page), extract entities and properties, align with known entities, then determine which statements can be cited. Structured data mainly helps with two things in this chain: confirming who the primary entity is, and confirming whether key properties have a clear source.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart LR    A[抓取页面] --&gt; B[提取可见事实]    B --&gt; C[解析结构化标记]    C --&gt; D{实体与字段一致}    D --&gt;|是| E[保留并用于引用]    D --&gt;|否| F[降权或回退正文]</pre></div><p>The last step in the diagram is critical. When conflicts occur, the common engineering handling is not “trust each field a little,” but downweighting, falling back to the body, or simply not using the markup. A few systems pick a value, but which one they pick is often uncontrollable. For the page, both outcomes are bad: at best unstable citations, at worst old prices, old authors, and old dates carried into answers.</p><p>Missing fields and conflicting fields have different consequences. Missing price: the parser can answer only “this page introduces a product,” or go to the body to find it; price with two values: it must first decide whom to trust. A conflicting field isn’t insufficient information—it’s information undermining itself.</p><h2 id="How-conflicting-fields-eat-credibility"><a href="#How-conflicting-fields-eat-credibility" class="headerlink" title="How conflicting fields eat credibility"></a>How conflicting fields eat credibility</h2><p>A common failure path goes like this: the product database changes the price, the page template renders the new price, but JSON-LD pulls data from another operations backend and still has the old price; a marketing colleague, to get rich results, copies several Q&amp;A pairs from an old FAQ document, and the answers don’t fully match the page body; the rating component counts only a few positive reviews on-site, but the markup writes aggregateRating. None of the three is conspicuous, but together they are enough for citing parties to question the page.</p><p>A user asks “how much is this,” the answer cites 199, they click through and see 299—they won’t investigate which field is wrong, they’ll just think the source is unreliable. The next time the citing party encounters the same site, it will be more conservative.</p><p>Another type of conflict is more hidden: author and date. The article page body is signed by a certain author, but Schema’s author is filled with Organization; datePublished is first publication, but dateModified refreshes on every build. To readers this isn’t a big deal, but to citing parties it’s the basis for judging timeliness and responsibility. It can’t confirm “who said this sentence and when,” so naturally it’s unwilling to treat the sentence as a citable conclusion.</p><p>The FAQPage problem is similar. The page doesn’t display Q&amp;A, or the displayed answers don’t match the answers in the markup—the markup then oversteps the page itself. Google’s structured data general guidelines require markup content to be visible to users; this isn’t format purism, it’s ensuring the markup and the page say the same thing.</p><p>Another common misconception: the more fields filled, the more complete the entity. Actually the opposite—the credibility of an entity description depends on whether key properties are consistent, not on the number of properties. An Article with only name, author, and datePublished, where all three can be found on the page, is usually more useful than a Product stuffed with a dozen items where price and rating don’t match.</p><h2 id="Mark-only-what-is-actually-carried-a-trade-off-table"><a href="#Mark-only-what-is-actually-carried-a-trade-off-table" class="headerlink" title="Mark only what is actually carried: a trade-off table"></a>Mark only what is actually carried: a trade-off table</h2><p>Different page types have different primary entities and different附属 information that can be marked. The table below isn’t a Schema type encyclopedia, just a judgment line: mark only what the page actually displays.</p><table><thead><tr><th>Page</th><th>Primary entity</th><th>Can mark</th><th>Don’t cram in</th></tr></thead><tbody><tr><td>Product detail</td><td>Product</td><td>Offer’s price and stock, Brand, SKU, consistent with page and product database</td><td>FAQ not displayed, copied Review, ratings inconsistent with body</td></tr><tr><td>Tutorial or how-to</td><td>HowTo or Article</td><td>Steps, tools, difficulty, author, date, visible in body</td><td>Nonexistent Product offer, FAQPage added just for rich results</td></tr><tr><td>Company or about page</td><td>Organization</td><td>Name, logo, address, sameAs official homepage</td><td>aggregateRating without real reviews, Product not sold</td></tr><tr><td>Blog post</td><td>Article or BlogPosting</td><td>headline, author, datePublished, dateModified</td><td>Hidden Q&amp;A, Product unrelated to body, fake ratings</td></tr></tbody></table><p>The most error-prone column in this table is “Can mark.” It doesn’t mean “recommend marking all,” but “mark only with a real source.” Take product pages: price and stock should come from the same product database—don’t render one set on the page and hand-fill another in markup. Ratings can only come from a real review system; don’t write three positive reviews as aggregateRating. FAQ only holds when the page actually displays Q&A; don’t move an entire customer service document into JSON-LD.</p><p>Multi-entity pages can be marked up, but the relationships must be written clearly. Event pages have Event, Offer, and Performer; course pages have Course, CourseInstance, and Offer. These aren’t forced in, because the page genuinely carries these entities at the same time. What matters more in the markup is the relationships: which Product or Event an Offer hangs under, who the Performer is, and what the time and place of a CourseInstance are. If the relationships are unclear, no matter how many types you add, it’s just several more sets of isolated declarations.</p><h2 id="Field-audit-delete-first-then-add"><a href="#Field-audit-delete-first-then-add" class="headerlink" title="Field audit: delete first, then add"></a>Field audit: delete first, then add</h2><p>This kind of problem can’t be fixed by “adding one more field,” because the root cause is that the same property has multiple sources. The workable order is the reverse: first establish a single source of truth, then delete fields that have no source, and only then consider adding types.</p><ol><li>For each template, make an entity table: what the main entity is, what subordinate entities there are, and which part of the page each corresponds to. List pages, filter pages, and detail pages must be looked at separately; don’t apply the detail-page Product template to search result pages.</li><li>Pull out the five high-conflict field categories separately: price, inventory, rating, author, date. If any category shows two values, first delete the value in the markup, or fix it to match the page—don’t add an explanatory paragraph.</li><li>Write down the source for each field: product database, CMS, review system, editorial workflow. Fields without a source are not marked up. This is especially true for sameAs, author, and dateModified—these three are the easiest to fill in casually.</li><li>Make changes trigger regeneration. When price and inventory change, the Offer must change with them; articles should update dateModified only on substantive revisions, not with build time.</li><li>After launch, sample twenty templates and check them against the visible page content. If you find that referring parties are still using old values, check the field source first—don’t add FAQ or ratings first to “enhance credibility.”</li></ol><p>There’s a trade-off to state clearly here: deleting FAQPage may mean less rich-result exposure, and deleting aggregateRating may mean fewer stars. But if these fields are inconsistent with the page, what remains is a bigger risk. My choice is to first use a consistent main entity to earn stable citations, and only then consider rich results. For B2B product pages with complex pricing and fast-changing inventory, this trade-off is especially obvious: one accurate Offer is more useful than five sets of marketing Q&amp;A.</p><p>If this kind of check relies only on human eyes looking at a few pages, it will quickly miss things. Agentrace is a GEO service (<a href="https://geo.moreyin.cn/">https://geo.moreyin.cn</a>) that can check page expression from the referring party’s perspective and help you locate which fields are easily misread; but it cannot supply facts for the page—the page itself must first have a consistent single source of truth.</p><h2 id="Before-marking-up-multiple-entities-ask-these-three-questions"><a href="#Before-marking-up-multiple-entities-ask-these-three-questions" class="headerlink" title="Before marking up multiple entities, ask these three questions"></a>Before marking up multiple entities, ask these three questions</h2><p>First, does the page show this entity to users? If it isn’t shown, don’t mark it up. Second, does this property have a unique source? If two backends can both change it, don’t mark it up yet. Third, when a referring party gets this field, can it find the corresponding sentence in the body text? If not, that means the markup is running ahead of the page.</p><p>If you can’t answer one of the three questions, I lean toward not adding it yet. The boundary of Schema should be the same as the boundary of the page: only content the page dares to write, dares to display, and dares to take responsibility for is worth letting machines read. If the page itself hasn’t made things clear, then no matter how complete the markup is, it only exposes the contradictions to referring parties in advance.</p><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li>Schema.org Product: <a href="https://schema.org/Product">https://schema.org/Product</a></li><li>Schema.org Article: <a href="https://schema.org/Article">https://schema.org/Article</a></li><li>Google structured data general guidelines: <a href="https://developers.google.com/search/docs/appearance/structured-data/sd-policies?hl=zh-cn">https://developers.google.com/search/docs/appearance/structured-data/sd-policies?hl=zh-cn</a></li></ul><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/30/troubleshooting-docs-get-cited-most/">The most frequently cited section in product docs is the troubleshooting part; almost no one excerpts the feature introductions</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/29/ai-crawler-404-fix-entry-before-blocking/">AI crawlers are hitting more 404s; fix the entry points before discussing bans</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/28/robots-txt-gptbot-training-not-retrieval/">Allowing GPTBot is training authorization, not search visibility</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/27/llms-txt-link-annotations/">llms.txt only contains links, so the agent can only guess</a><span class="shared">GEO</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/12/01/schema-overload-citation-trust/</id>
    <link href="https://bl8ds.com/en/2026/12/01/schema-overload-citation-trust/"/>
    <published>2026-11-30T20:22:00.000Z</published>
    <summary>Many pages stuff FAQ, ratings, and product specs all into Schema, resulting in conflicting prices, authors, and dates. This article explains how referencing parties can align entities and which fields should be removed</summary>
    <title>The fuller the schema is marked, the harder it is for the referencing party to trust it</title>
    <updated>2026-11-30T20:22:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Competitive Moat" scheme="https://bl8ds.com/en/tags/Competitive-Moat/"/>
    <category term="Data Loop" scheme="https://bl8ds.com/en/tags/Data-Loop/"/>
    <category term="Product" scheme="https://bl8ds.com/en/categories/Product/"/>
    <category term="Workflow Integration" scheme="https://bl8ds.com/en/tags/Workflow-Integration/"/>
    <content>
      <![CDATA[<p>A increasingly common scenario: at a vendor selection meeting, the buyer lays out proposals from three suppliers and discovers they are all calling the same version of the same underlying model. The question then becomes, “Since the model is the same, why is your quote a notch higher?”</p><p>This question is hard to answer. Most answers slide toward service, industry experience, and response speed. They all sound right, but the other side cannot verify them, and you cannot prove them yourself. My answer is to replace the question: don’t look at the model score gap; look at how long it takes to replace you. The unit of measurement for a moat is switching cost, not capability gap.</p><h2 id="In-many-scenarios-the-model-gap-is-already-smaller-than-the-implementation-gap"><a href="#In-many-scenarios-the-model-gap-is-already-smaller-than-the-implementation-gap" class="headerlink" title="In many scenarios, the model gap is already smaller than the implementation gap"></a>In many scenarios, the model gap is already smaller than the implementation gap</h2><p>First, here is a criterion you can test yourself. Take your production evaluation set and swap the main model for the second-place model on the leaderboard, then run the core metrics. If the drop is smaller than the fluctuation caused by your last change to the retrieval strategy or output structure, then in your scenario the model is replaceable supply and cannot determine your position.</p><p>This judgment has boundaries. For complex code refactoring, multi-hop long-document reasoning, and tasks requiring long chains of self-correction, the top tier and the mid tier still differ by several times, and there model capability remains a real moat. So “convergence” must be discussed scenario by scenario. How to tell whether you are in the convergence zone: look at the share of production requests that are “full context provided, fixed format, unique answer” tasks. The higher that share, the closer you are to commoditized supply.</p><p>At the user-perception layer, the model gap is diluted even more clearly. Users do not perceive leaderboard scores. They perceive three things: the probability of getting it right the first time, whether it can catch its own mistakes, and how long those few seconds of waiting feel. The latter two are basically determined by product and engineering. Retrieval strategy determines whether the answer has a basis, output structure determines how quickly the first token appears, and citations and secondary confirmation determine whether errors can be stopped. Do these three well, and users will not notice a half-tier model gap; do them poorly, and even the strongest model cannot save you.</p><p>So I treat the model as supply, not as an asset. Supply gets cheaper, gets switched, and gets replaced because of a single rate limit.</p><h2 id="Whether-a-data-loop-is-real-depends-on-whether-it-changes-the-next-decision"><a href="#Whether-a-data-loop-is-real-depends-on-whether-it-changes-the-next-decision" class="headerlink" title="Whether a data loop is real depends on whether it changes the next decision"></a>Whether a data loop is real depends on whether it changes the next decision</h2><p>How many days and how many people lie between a piece of data being generated in production and it actually changing the next production behavior—these two numbers tell you whether the loop is real.</p><p>More than a week, more than two people: it is not a loop, it is an archive. Many teams’ “data loops” are piles of raw conversation text sitting in object storage, still randomly sampled during sampling. The vast majority of what gets sampled is repeated common questions, while the truly valuable long tail sinks below and nobody fishes it out.</p><p>A concrete form: in customer service and ticketing scenarios, the least useful signal is thumbs up&#x2F;thumbs down: too sparse, and a user cursing does not clarify what went wrong. What is actually usable is outcome labels, such as the difference between the action ultimately taken on a ticket after escalation to a human and the action the model suggested at the time. This signal is good in three ways: it can be attributed to a specific action, it carries business consequences, and the sample size is not small (escalation to a human is itself a high-frequency path). Wire it back into retrieval or prompts, and suggestions for similar problems in the next round will change.</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">data_loop:</span></span><br><span class="line">  <span class="attr">signal:</span> <span class="string">结果标签</span></span><br><span class="line">  <span class="attr">attribution:</span> <span class="string">能落到具体动作</span></span><br><span class="line">  <span class="attr">latency_days:</span> <span class="string">不超过七天</span></span><br><span class="line">  <span class="attr">owner:</span> <span class="string">有名字的一个人</span></span><br><span class="line">  <span class="attr">feedback_into:</span> <span class="string">检索</span> <span class="string">/</span> <span class="string">提示</span> <span class="string">/</span> <span class="string">规则</span> <span class="string">/</span> <span class="string">微调，至少一条</span></span><br></pre></td></tr></table></figure><p>Note the owner here. When a loop breaks, it is usually not because the technology is impossible, but because nobody is responsible for it. A loop with an owner will grow its own rules within three months; a loop without an owner becomes a reporting deck after three months.</p><p>The boundary lies in the exclusivity of the signal. If your feedback signal is publicly collectable—such as likes on general Q&amp;A or performance on public corpora—then it does not constitute a moat. Others can collect it too, and collect more of it than you. Only outcome signals generated in your own scenario have moat value. This is also why the narrower the industry and the deeper the process, the more valuable the data loop.</p><h2 id="An-AI-that-only-reads-and-never-writes-is-still-stuck-in-the-search-box"><a href="#An-AI-that-only-reads-and-never-writes-is-still-stuck-in-the-search-box" class="headerlink" title="An AI that only reads and never writes is still stuck in the search box"></a>An AI that only reads and never writes is still stuck in the search box</h2><p>If an AI feature can only read and not write, users have to carry the conclusions back into the business system themselves, so its role in the product is a search box wrapped in a conversational shell.</p><p>Embedding into a workflow requires four things: write permission, idempotency, rollback, and audit logs. If any one is missing, the feature can only be demoed, not launched. Idempotency is needed because the model may retry, and the same action must not be executed twice. Rollback is needed because it will definitely make mistakes. Audit is needed because after an error you must be able to explain which step went wrong, who approved it, and on what basis.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[AI 在界面上给出建议] --&gt; B{能不能写业务状态}    B -- 只能读 --&gt; C[贴皮 用户自己搬运]    B -- 能写 --&gt; D{动作可逆吗}    D -- 可逆 --&gt; E[自动执行并留日志]    D -- 不可逆 --&gt; F[人工确认后执行]    E --&gt; G[真嵌入 替换需重走权限]    F --&gt; G</pre></div><p>The workload difference is on the order of magnitude. Connecting a read interface takes days to two weeks; adding a write interface with full idempotency, rollback, and audit usually takes three to five times the read side, and also requires review with security, operations, and compliance. This cost is precisely where the moat comes from: for a competitor to copy it, it is not a matter of switching models and connecting an API, but of walking its own approval chain all over again.</p><p>The failure mode is very fixed: the AI’s suggestion sits in a floating panel on the right, and users copy it into the form themselves after reading it. They give up after two uses because the cost of moving it exceeds the benefit. In the data, this kind of feature shows high open rates and low adoption rates, and is easily misread as users not trusting AI, when in fact the product never let it land.</p><p>How far to go with embedding—my default rule is: reversible actions can be executed automatically; irreversible actions must be confirmed by a human. Irreversible means sending externally, making payments, deleting, or changing states visible to others. This is not a compliance requirement but a product judgment, because the cost of an error in an irreversible action is borne by the user, not by the product.</p><h2 id="Account-for-moats-by-“how-long-it-takes-to-replace-you”"><a href="#Account-for-moats-by-“how-long-it-takes-to-replace-you”" class="headerlink" title="Account for moats by “how long it takes to replace you”"></a>Account for moats by “how long it takes to replace you”</h2><p>Break the moat into layers that can be accounted for. The magnitudes are roughly as follows:</p><table><thead><tr><th>Layer</th><th>Typical replacement cycle</th><th>Who bears it</th></tr></thead><tbody><tr><td>Model vendor</td><td>Days to two weeks</td><td>Algorithms</td></tr><tr><td>Retrieval and indexing</td><td>Two weeks to one month</td><td>Algorithms plus business</td></tr><tr><td>Data definitions and feedback loops</td><td>One to two quarters</td><td>Business plus operations</td></tr><tr><td>Workflow permissions and audit</td><td>More than half a year</td><td>Multiple departments</td></tr></tbody></table><p>The further down the table, the longer the cycle. But a long cycle does not equal a high moat. Two things must be distinguished here: how long it takes for a customer to leave you, and how long it takes for a competitor to replicate that segment. The former being long may mean lock-in—data cannot be taken away, processes cannot be bypassed; the latter being long is the real moat.</p><p>I tend to put resources into the latter. The installed base gained through lock-in will be undermined within two or three years by two things: customers building shadow processes outside the system, and concentrated churn during migration. But the segment a competitor cannot replicate is also the segment the customer does not want to replace, because replacing it means paying the integration cost all over again.</p><p>After ten years in AI products, I increasingly distrust the narrative of “capability leadership,” because its half-life is too short. What truly remains are the things that, once replaced, force you to walk the whole process again.</p><h2 id="Both-moats-decay"><a href="#Both-moats-decay" class="headerlink" title="Both moats decay"></a>Both moats decay</h2><p>Data loops decay quietly: definitions drift, labels expire, the scenario changes but the data does not. A taxonomy set half a year ago may have gone through two rounds of business changes, while the feedback loop is still labeling by the old definitions, becoming more biased with every training run. A low-cost health check is to sample a recent batch of feedback data and see how much of it consists of new question phrasings that appeared only within the past three months. If that proportion is close to zero, the loop has already become disconnected from the business.</p><p>Workflow embedding decays more violently: the process is redesigned but the AI is still attached to the old node; or an upstream system changes a field name, the write interface fails silently, the logs are full of timeouts, and the business side only sees that there have been fewer suggestions recently. The deeper the embedding, the larger the radius of this decay.</p><p>Another signal worth watching: frontline staff start using spreadsheets or group chats to bypass the system. This is not users being uncooperative; it means the embedding point is wrong—they are stuck at a step that requires manual confirmation but cannot be confirmed.</p><h2 id="If-you-can-fix-only-one-path"><a href="#If-you-can-fix-only-one-path" class="headerlink" title="If you can fix only one path"></a>If you can fix only one path</h2><p>Data closed loops and workflow embedding are both slow work, and pushing them simultaneously usually leaves both half-done. If I could only do one first, I would choose to compress the time from “online error to evaluation set” to under a day. The reason is simple: it is the entry point for all subsequent actions. If the evaluation set is not updated, model upgrades, prompt optimization, and retrieval adjustments are all built on a faulty foundation; moreover, this link has the lowest cost—no model needed, no procurement needed, just someone to fish the error out on the day it occurs.</p><p>To judge whether this is done, don’t look at whether there is a platform; look at one specific question: the most recent online error—who added it to the evaluation set, and at what time? If you can’t answer that, the link is not yet connected.</p><p>Ask one level up: in your product, where did the user last change their next action because of an AI suggestion—which interface did that happen in? If that interface is not inside the business system, then AI has not yet entered the workflow.</p>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/30/moat-is-switching-cost-not-model-gap/</id>
    <link href="https://bl8ds.com/en/2026/11/30/moat-is-switching-cost-not-model-gap/"/>
    <published>2026-11-29T16:24:14.000Z</published>
    <summary>Once the gap between models narrows, the criterion for judging a moat should shift to &quot;how long would it take to replace it.&quot; This piece breaks down the conditions under which a data flywheel and workflow embedding each hold, their failure paths and ways they decay, and offers a criterion you can test yourself.</summary>
    <title>Barriers don't depend on the model score gap, but on how long it takes to replace you</title>
    <updated>2026-11-29T16:24:14.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Annotation" scheme="https://bl8ds.com/en/tags/Annotation/"/>
    <category term="Cold Start" scheme="https://bl8ds.com/en/tags/Cold-Start/"/>
    <category term="Evaluation" scheme="https://bl8ds.com/en/tags/Evaluation/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<h2 id="What-often-stalls-the-first-evaluation-set-is-the-annotation-guideline"><a href="#What-often-stalls-the-first-evaluation-set-is-the-annotation-guideline" class="headerlink" title="What often stalls the first evaluation set is the annotation guideline"></a>What often stalls the first evaluation set is the annotation guideline</h2><p>A common scenario: the team is about to ship a retrieval QA feature, and in the review meeting someone says “we need an evaluation set first.” The next two weeks turn into writing annotation guidelines: what counts as correct, how to score partially correct, whether a wrong citation with a correct conclusion counts as correct, what to do when a question has multiple correct answers, whether the model saying “cannot be determined from the documents” counts as a correct answer. By the third revision of the guideline, the outsourced annotation hasn’t even started, and the evaluation set has zero items.</p><p>This order is backwards. The guideline is not a prerequisite for the evaluation set; it is a byproduct of spot-checking.</p><p>The only question that really needs answering during cold start is: where is this approach wrong right now, and is it worth continuing to invest in? This question doesn’t need golden answers, and it doesn’t need inter-annotator agreement checks. It needs enough real inputs, plus someone making a rough judgment on each output.</p><h2 id="Spot-checking-and-annotation-are-not-the-same-thing"><a href="#Spot-checking-and-annotation-are-not-the-same-thing" class="headerlink" title="Spot-checking and annotation are not the same thing"></a>Spot-checking and annotation are not the same thing</h2><p>These two things often get conflated into one, and then get stuck on the same process.</p><p>Spot-checking is taking a real query, looking at the system output, judging “is this usable,” and jotting down where it went wrong. One person can get through dozens per hour, no training needed, no arbitration needed.</p><p>Annotation is producing a standard answer for a given query, having multiple people label the same item, computing agreement, and routing disagreements to arbitration. This is engineering that costs money, time, and management overhead.</p><p>Cold start only needs spot-checking. Spot-checking gives you an error distribution, not a precise score. And an error distribution is enough to decide whether the next step is fixing retrieval, fixing chunking, fixing the prompt, or switching data sources.</p><p>Precise scores are only needed when you have to make an external commitment, or when you need to compare two approaches that differ by just a few points. Doing this step early means spending money on a number you don’t even believe in, before you’ve figured out where things are wrong.</p><h2 id="Real-queries-come-from-logs-but-sample-them-by-strata"><a href="#Real-queries-come-from-logs-but-sample-them-by-strata" class="headerlink" title="Real queries come from logs, but sample them by strata"></a>Real queries come from logs, but sample them by strata</h2><p>The biggest problem with human-written queries isn’t that they’re unrealistic—it’s that they’re too tidy. The person writing the query knows how the system should answer, and unconsciously fills in all the conditions, scope, and intent. Real users don’t.</p><p>Sources can be prioritized: online retrieval logs, better than zero-result and no-click queries, better than customer service tickets and user feedback, better than human-written. The earlier in the list, the more real, and the easier to sample cases that make you uncomfortable.</p><p>Don’t sample purely at random from logs. Random is representative of “average experience,” not of “a first evaluation set.” My approach is to stratify into four layers:</p><ul><li>Stratify by frequency, roughly 5:3:2 for head, torso, and long tail. The head determines everyday experience; the long tail determines when things break.</li><li>Stratify by result status, sampling some from each of: has results, zero results, has clicks, no clicks. Zero results and no clicks hide the most real problems.</li><li>Stratify by session position, looking at first-turn queries and multi-turn follow-ups separately. Coreference and ellipsis in multi-turn are a different class of error, and mixing them in gets them buried by first-turn samples.</li><li>Stratify by business line or intent category, ensuring no important scenario has zero items.</li></ul><p>Here’s a very common pitfall: only sampling queries that have results. Because when exporting logs, someone casually added a filter condition, and “has results” is the easiest to query. But the portion where users search and then leave is often exactly what the product most needs to fix.</p><h2 id="Two-hundred-items-is-enough-to-locate-problems-not-to-compare-approaches"><a href="#Two-hundred-items-is-enough-to-locate-problems-not-to-compare-approaches" class="headerlink" title="Two hundred items is enough to locate problems, not to compare approaches"></a>Two hundred items is enough to locate problems, not to compare approaches</h2><p>The sample size question needs to be split into two separate questions.</p><p>To locate error types, one or two hundred items is enough. After a certain number, new error types basically stop appearing, and the shape of the error distribution stabilizes. At that point you can clearly state: the main problem is insufficient recall, wrong chunk granularity, or the model making things up when there’s no answer. This conclusion directly affects next week’s schedule.</p><p>To compare two approaches, it’s far from enough. For proportion-type metrics, at a sample size of one hundred, the 95% confidence interval width is roughly plus or minus 10 percentage points; to get to plus or minus 5 percentage points, you need about four hundred items. If two approaches differ by 3 points, a hundred-item sample simply can’t tell them apart—using this to make decisions is like using noise as votes.</p><p>So the first evaluation set is for qualitative localization, not quantitative ranking. If you want to compare approaches, either increase the sample size, or switch to a more sensitive metric—for example, the absolute count of a certain type of hard error, rather than overall accuracy.</p><p>The spot-checking loop looks roughly like this; note there are two back-edges: one goes back to re-sample if error types haven’t converged, and one goes back to the guideline for disputed cases.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart LR  A[检索日志] --&gt; B[分层抽样]  B --&gt; C[人工抽检]  C --&gt; D[错误分类]  D --&gt; E{新错误类型还在出现}  E --&gt;|是| B  E --&gt;|否| F[定修改优先级]  D --&gt; G[争议 case]  G --&gt; H[补规范条款]  H --&gt; C</pre></div><h2 id="These-columns-are-enough-for-one-case"><a href="#These-columns-are-enough-for-one-case" class="headerlink" title="These columns are enough for one case"></a>These columns are enough for one case</h2><p>The most common mistake in a spot-checking table is too many fields. The first time I designed such a table, I listed over twenty columns; the people filling it in only used the first three, and the rest were all empty. Later I cut it down to this:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">case_id:</span> <span class="string">q-0142</span></span><br><span class="line"><span class="attr">query:</span> <span class="string">原始用户输入，错别字和口语都保留</span></span><br><span class="line"><span class="attr">source:</span> <span class="string">search_log</span> <span class="string">/</span> <span class="string">ticket</span> <span class="string">/</span> <span class="string">manual</span></span><br><span class="line"><span class="attr">bucket:</span> <span class="string">head</span> <span class="string">/</span> <span class="string">mid</span> <span class="string">/</span> <span class="string">tail</span></span><br><span class="line"><span class="attr">system_output:</span> <span class="string">系统当时的输出，含引用片段</span></span><br><span class="line"><span class="attr">verdict:</span> <span class="string">usable</span> <span class="string">/</span> <span class="string">partial</span> <span class="string">/</span> <span class="string">unusable</span></span><br><span class="line"><span class="attr">error_type:</span> <span class="string">retrieval_miss</span> <span class="string">/</span> <span class="string">wrong_answer</span> <span class="string">/</span> <span class="string">over_refusal</span> <span class="string">/</span> <span class="string">bad_citation</span> <span class="string">/</span> <span class="string">format</span></span><br><span class="line"><span class="attr">note:</span> <span class="string">一句话，写清楚为什么这么判</span></span><br></pre></td></tr></table></figure><p>A few details are worth mentioning.</p><p><code>query</code> must be preserved verbatim. Some people habitually fix typos and convert colloquial speech to formal writing—after that, the case no longer represents that real failure.</p><p><code>verdict</code> keeps only three levels. Five-level ratings have no discriminative power during cold start; the disagreement between two people over “3 or 4” is much larger than over “usable or not usable,” and that disagreement doesn’t help decision-making at all.</p><p><code>error_type</code> shouldn’t be fully written out in the first version. Leave a <code>other</code>, run it for two days to see what piles up in <code>other</code>, then split it into new categories. This way the taxonomy grows out of the data, not out of someone’s head.</p><h2 id="A-few-types-of-cases-must-be-forced-in"><a href="#A-few-types-of-cases-must-be-forced-in" class="headerlink" title="A few types of cases must be forced in"></a>A few types of cases must be forced in</h2><p>Log sampling has a natural gap: low-frequency but high-cost scenarios don’t get sampled. So the first evaluation set needs a few types added by hand—the proportion doesn’t need to be high, but not a single one can be missing.</p><p>Questions with no answer. The user asks about something that isn’t in the documents at all, and the system should say it doesn’t know. These are a small proportion in logs, but once the model makes things up, the cost is the entire user base.</p><p>Questions with negation and exclusion conditions. “What else besides A,” “solutions that don’t include B.” The model’s error rate on these structures is noticeably higher, and in logs these queries are scattered everywhere, so random sampling easily misses them.</p><p>Time-sensitive questions. The documents have been updated but the index hasn’t, or the answer changes by version. These need to be recorded along with the index time, otherwise you can’t judge right or wrong two weeks later.</p><p>Multi-hop questions. The answer requires stitching together two documents. Single-document retrieval looks solid, but falls apart the moment stitching is involved, and stitching failures often get misrecorded as “incomplete answer” during spot-checking.</p><p>Domain terms and internal abbreviations. Users ask using the company’s internal terminology, and the model doesn’t recognize it. These cases are the most persuasive to the business side, and are also the most likely to be completely absent from general evaluation sets.</p><h2 id="The-guideline-is-a-byproduct-of-spot-checking-not-a-prerequisite"><a href="#The-guideline-is-a-byproduct-of-spot-checking-not-a-prerequisite" class="headerlink" title="The guideline is a byproduct of spot-checking, not a prerequisite"></a>The guideline is a byproduct of spot-checking, not a prerequisite</h2><p>After the first round, you’ll have a batch of unusable items. Then do two things.</p><p>First, lay out cases with the same <code>error_type</code> side by side and look for commonalities. For example, “wrong citation but correct conclusion”—is it that retrieval pulled the wrong paragraph, or that the model rewrote the quoted content itself? These two must be treated differently in the guideline, but you can’t think of this fork when writing the guideline; you only discover it when you see specific cases.</p><p>Second, pull out disputed cases separately. During spot-checking, if two people disagree on the same item, that item exposes a hole in the guideline. Holes don’t need to be filled all at once—first mark “tentatively handled this way,” and once you’ve accumulated a dozen or so, converge them together.</p><p>The order then becomes: spot-check, accumulate disputes, add clauses, spot-check again. The guideline is a patch, not a foundation.</p><p>One more organizational detail: try not to assign the first round of spot checks to the designer of the solution. This is not a question of doubting honesty; it is a question of perspective. When designers look at a failure, they easily think, “This one actually retrieved the right thing, the model just didn’t use it,” or “The user’s question itself wasn’t clearly phrased.” Half of these thoughts are correct, but putting them into the spot-check process will make <code>verdict</code> systematically too lenient. When there aren’t enough people, require at least one thing: for every unusable item, write “why this is a problem,” not “why the system isn’t to blame.”</p><h2 id="When-you-must-stop-and-move-to-formal-annotation"><a href="#When-you-must-stop-and-move-to-formal-annotation" class="headerlink" title="When you must stop and move to formal annotation"></a>When you must stop and move to formal annotation</h2><p>Everything above is about getting things running first. But there are a few lines that, once crossed, will cause trouble. Outside these lines, I lean toward running first and talking later.</p><p>When you need to commit to metrics for a client or externally. If the contract specifies accuracy, you cannot hand in numbers from a rough spot check of two hundred items; neither the sample size nor the definition will hold up.</p><p>When you need legal or compliance evidence. These scenarios require traceable annotation records, annotator identities, and an arbitration process. Spot-check records do not count.</p><p>When you need to decide whether an A&#x2F;B test can go to full rollout. The decision criteria must fix the sample size and metric definitions in advance; you cannot pick a good-looking slice from the spot check after the fact.</p><p>When multiple people across teams share one dataset. If more than a few people use it at the same time, without consistency checks everyone will be speaking a different language. At that point you need to build an annotation process; the consistency coefficient is only a byproduct.</p><p>Once the business is actually running, you will have a clearer idea of which type of error is worth spending money on for high-quality annotation. Conversely, if you spend two months doing high-quality annotation before launch, the problems you annotated precisely often are not the ones you actually encounter online.</p><h2 id="Shelf-life-and-don’t-turn-it-into-an-asset-that-only-grows"><a href="#Shelf-life-and-don’t-turn-it-into-an-asset-that-only-grows" class="headerlink" title="Shelf life, and don’t turn it into an asset that only grows"></a>Shelf life, and don’t turn it into an asset that only grows</h2><p>The distribution of retrieval logs drifts. Add a batch of new documents, change the chunking once, run one operational campaign, and the query distribution changes. For the first version of the evaluation set, my default is not to set a fixed cycle, but to re-sample once with each major change, and at minimum review the distribution once a quarter.</p><p>One very useful signal: when the share of <code>other</code> in spot checks starts to rise, it means real users are using the product in ways you did not anticipate, and it is time to re-sample.</p><p>Another thing: don’t treat the evaluation set as an asset that only grows. Some people like to keep adding cases until there are thousands, so one evaluation run takes half a day and changing one prompt means waiting two hours to see the result. In the end nobody runs it anymore. In the cold-start stage, a few dozen representative cases are more useful than thousands of messy ones. If you want to expand, first expand coverage of error types, so that every type of error has a few samples that can be reproduced reliably, rather than piling two hundred samples onto the same error type.</p><p>Back to the team that was stuck at the beginning. What was really blocking them was not annotation resources, but treating “evaluation” as “high-quality annotation” by default. The task for the first version of the evaluation set is very light: take real logs, stratify and sample two hundred items, have someone who did not participate in the solution do a rough judgment, and see which categories the errors cluster in. This round takes about a week, which is much faster and more useful than continuing to revise the fourth version of the annotation guideline.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/agent-tool-overload-candidate-set/">With more than a dozen tools available, Agents first fail by choosing the wrong one</a><span class="shared">Evaluation</span></li><li><a href="/en/2026/11/26/query-rewrite-eval-resampling/">The queries in the evaluation set are twice as long as what users say</a><span class="shared">Evaluation</span></li><li><a href="/en/2026/11/19/agent-test-blackbox-blindspot/">Agent tests that only assert the final answer will let half the errors slip through</a><span class="shared">Evaluation</span></li><li><a href="/en/2026/11/13/vertical-rag-cold-start-flywheel/">Two hundred documents, an average of eight feedback items per day, and the flywheel doesn't exist yet</a><span class="shared">Cold Start</span></li><li><a href="/en/2026/11/07/rag-citation-version-and-abstain/">Retrieval 78%, citation 61%: don't rush to switch vector models</a><span class="shared">Evaluation</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/30/first-eval-set-from-search-logs/</id>
    <link href="https://bl8ds.com/en/2026/11/30/first-eval-set-from-search-logs/"/>
    <published>2026-11-29T16:23:06.000Z</published>
    <summary>The annotation guidelines are already on their third version, yet the evaluation set still has zero entries. This article explains how, during the cold-start phase, to use stratified sampling from retrieval logs and manual rough spot-checks to first map out the error distribution, and then let the guidelines grow out of the error cases.</summary>
    <title>For the first version of the evaluation set, don't wait for annotation—sample two hundred retrieval logs first</title>
    <updated>2026-11-29T16:23:06.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="GEO" scheme="https://bl8ds.com/en/tags/GEO/"/>
    <category term="Product" scheme="https://bl8ds.com/en/categories/Product/"/>
    <category term="Product Documentation" scheme="https://bl8ds.com/en/tags/Product-Documentation/"/>
    <category term="Troubleshooting" scheme="https://bl8ds.com/en/tags/Troubleshooting/"/>
    <content>
      <![CDATA[<p>The most frequently forwarded link in internal Q&amp;A groups is not the product introduction page—it’s the troubleshooting section in the docs. The person pasting the link usually adds, “see item three.” And the person who writes that section is often the last one considered in the schedule: a week before release, the docs writer finishes the feature pages and leaves the troubleshooting section for whoever knows production best to “just add a couple of paragraphs.”</p><p>The result: the most-read part of the docs gets the least investment.</p><h2 id="Feature-intros-answer-“what-can-you-do-”-troubleshooting-answers-“what-do-I-do-now”"><a href="#Feature-intros-answer-“what-can-you-do-”-troubleshooting-answers-“what-do-I-do-now”" class="headerlink" title="Feature intros answer “what can you do,” troubleshooting answers “what do I do now”"></a>Feature intros answer “what can you do,” troubleshooting answers “what do I do now”</h2><p>These two questions have completely different citation value.</p><p>Someone evaluating a product reads the feature intro, then makes their own decision—they won’t cite you. Someone already having a problem reads the troubleshooting section and gets “do this next,” and they’ll paste it to colleagues, into tickets, into group chats. AI answer engines use the same preference when summarizing: paragraphs with clear structure, decision criteria, and executable steps get lifted whole far more easily than lines like “we support multiple sync methods.”</p><p>So the citation gap isn’t caused by writing skill—it’s caused by the type of question. Feature intros are written for people who haven’t bought yet; troubleshooting is written for people already using the product and stuck right now. The latter’s urgency is an order of magnitude higher, and the person quoting it is more willing to relay it verbatim.</p><p>This also explains a common mismatch: many teams put their best writers on feature pages and hand troubleshooting to the busiest on-call engineer. Which end gets cited is obvious.</p><h2 id="What-gets-lifted-is-a-paragraph-not-a-page"><a href="#What-gets-lifted-is-a-paragraph-not-a-page" class="headerlink" title="What gets lifted is a paragraph, not a page"></a>What gets lifted is a paragraph, not a page</h2><p>This is where troubleshooting sections most often go wrong.</p><p>Search snippets, AI answers, and knowledge-base chunks for support bots all operate at paragraph granularity, not page granularity. The preconditions you wrote in the previous paragraph don’t exist in the paragraph that gets lifted.</p><p>A common failure path: the docs first say “after v2.3, sync failures don’t require a service restart—the service reconnects automatically,” then the next paragraph says “if sync keeps failing, restart the sync service.” A human reading with context sees no problem. But what gets lifted is the second half. The user restarts a service that’s mid-batch, interrupting data that hasn’t been persisted yet.</p><p>So the first writing rule for troubleshooting items is: every item must be self-contained. Preconditions, scope, and exclusions must either be written into the same item or stated as an explicit qualifier (“applies only to versions below v2.3”)—don’t expect readers to follow the surrounding context.</p><p>The test is simple: copy the item out on its own and send it to a colleague unfamiliar with the background. Can they take the correct action based on that item alone? If not, it’s not finished.</p><h2 id="A-complete-troubleshooting-item-needs-six-things"><a href="#A-complete-troubleshooting-item-needs-six-things" class="headerlink" title="A complete troubleshooting item needs six things"></a>A complete troubleshooting item needs six things</h2><p>I tend to split troubleshooting items into six fixed blocks. Not for tidiness—because whichever block is missing is the one readers will come back to ask about. The path a reader actually walks looks roughly like this:</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[收到报障] --&gt; B{能否复现}    B -- 能 --&gt; C[按步骤定位]    B -- 不能 --&gt; D[收集环境与日志]    D --&gt; E{有无明确报错}    E -- 有 --&gt; F[匹配已知原因]    E -- 无 --&gt; G[降级并上报]    C --&gt; H[处置并验证]    F --&gt; H    H --&gt; I{指标是否恢复}    I -- 是 --&gt; J[记录结论]    I -- 否 --&gt; G</pre></div><p>The six corresponding blocks are: symptom, check, action, verify, rule out, stop. Writing them as one continuous paragraph is usually easier to lift than a six-line list, because numbering doesn’t get lost during extraction.</p><p>Here’s a template:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">title:</span> <span class="string">同步任务卡在</span> <span class="string">pending</span> <span class="string">超过</span> <span class="number">10</span> <span class="string">分钟</span></span><br><span class="line"><span class="attr">symptom:</span> <span class="string">控制台任务状态一直显示</span> <span class="string">pending，日志出现</span> <span class="string">lock</span> <span class="string">acquire</span> <span class="string">timeout</span></span><br><span class="line"><span class="attr">applies_to:</span> <span class="string">单租户部署，v2.1</span> <span class="string">及以上</span></span><br><span class="line"><span class="attr">check:</span> <span class="string">任务详情页的</span> <span class="string">worker</span> <span class="string">列表是否为空</span></span><br><span class="line"><span class="attr">action:</span> <span class="string">在运维控制台重启</span> <span class="string">worker</span> <span class="string">池，不要重启调度器</span></span><br><span class="line"><span class="attr">verify:</span> <span class="number">5</span> <span class="string">分钟内</span> <span class="string">pending</span> <span class="string">数应开始下降</span></span><br><span class="line"><span class="attr">not_this:</span> <span class="string">若</span> <span class="string">pending</span> <span class="string">数为</span> <span class="number">0</span> <span class="string">但前端仍显示排队，是缓存问题</span></span><br><span class="line"><span class="attr">stop:</span> <span class="string">worker</span> <span class="string">池重启两次仍无变化，停止操作并联系平台值班</span></span><br></pre></td></tr></table></figure><p>The most valuable lines here are check and not_this.</p><p>check determines whether the item can be used at all. “Check whether the config is correct” is as good as nothing, because the reader doesn’t know which field to look at. “Is the worker list on the task detail page empty?” is executable.</p><p>not_this determines whether the item gets misused. It’s direct evidence of past pitfalls, and I think it’s the block most worth copying from tickets into docs.</p><p>For length, I usually aim for 150 to 400 characters. Under 150 usually means missing exclusions; over 400 usually means two or three different problems crammed into one item—readers get lost midway, and the excerpt gets cut off mid-sentence.</p><h2 id="Symptoms-should-quote-users’-words-not-be-translated-into-your-terminology"><a href="#Symptoms-should-quote-users’-words-not-be-translated-into-your-terminology" class="headerlink" title="Symptoms should quote users’ words, not be translated into your terminology"></a>Symptoms should quote users’ words, not be translated into your terminology</h2><p>A heading like “Common questions” carries zero information. “Uploading large files returns 413” is matchable.</p><p>One concrete practice: pull users’ exact words and the exact on-screen error text from recent support tickets and use them directly as headings. Users search for “upload failed 413,” not “file upload feature introduction.” Your internal name (“object storage write path exception”) is a term they will never type.</p><p>There’s a trickier category: the human-readable sentence before the error code. Many products phrase error messages as “Operation failed, please try again later”—the only thing users can copy is that sentence, and that sentence can’t be found in the docs at all. If the error message itself isn’t searchable, no amount of documentation can catch it.</p><p>If the same problem has multiple phrasings, write each one in the item, or list the aliases together in one sentence. This isn’t a search trick—it’s because the same failure has different names in different roles’ mouths: ops says “lock timeout,” the business side says “it just keeps spinning.”</p><p>One related preference: if you can include log signatures, include three to five key lines, not the whole log. A full log is both hard to excerpt and buries the one line that actually matters.</p><h2 id="Write-in-“not-this-cause”"><a href="#Write-in-“not-this-cause”" class="headerlink" title="Write in “not this cause”"></a>Write in “not this cause”</h2><p>Half the information density of a troubleshooting section comes from positive cases, half from exclusions.</p><p>A common example: a gateway returns 502, which looks certain to mean the backend is down—but if the gateway’s timeout is shorter than the backend’s own timeout, the backend is still processing normally while the gateway has already returned. Restarting on the assumption of “backend is down” means interrupting a service that’s running fine. Writing that distinction clearly is worth more than ten sentences of “please check service status.”</p><p>Exclusions are cheap to write. Every time on-call finishes handling an issue, spend two extra minutes asking: what else looks like this but requires a completely different response? Put that one sentence in the docs, and the next person avoids one wrong turn.</p><h2 id="Some-things-shouldn’t-be-written-as-steps"><a href="#Some-things-shouldn’t-be-written-as-steps" class="headerlink" title="Some things shouldn’t be written as steps"></a>Some things shouldn’t be written as steps</h2><p>This is the boundary of troubleshooting writing.</p><p>For operations involving deleting data, rolling back versions, changing permissions, or changing billing, don’t write them as step one, step two. The smoother they read, the more likely someone with no concept of permissions will follow them. The correct form for these items is a one-sentence stop rule: on what symptom you stop, who to contact, and what information to bring.</p><p>When I started out, I believed more in “docs should be complete”; now I believe more in “docs should clearly mark which steps you must not take yourself.” The cost of completeness is one mistaken operation; the cost of clear marking is one extra human intervention—the latter is far cheaper.</p><p>My usual criterion: if a step is irreversible when done wrong, don’t give steps—give stop conditions and a contact.</p><h2 id="Troubleshooting-sections-have-a-shelf-life—label-version-and-date"><a href="#Troubleshooting-sections-have-a-shelf-life—label-version-and-date" class="headerlink" title="Troubleshooting sections have a shelf life—label version and date"></a>Troubleshooting sections have a shelf life—label version and date</h2><p>Feature pages can go a year without changes; troubleshooting sections can’t. Change the UI once and the path changes; adjust a default once and the decision criteria stop working.</p><p>A troubleshooting item written two years ago that keeps getting cited is more dangerous than one nobody cites, because it looks authoritative and well-organized—readers have no reason to doubt it. So every troubleshooting item should carry at least two things: the applicable version, and the date it was last verified. When it no longer applies, deleting it is more responsible than keeping it.</p><p>If possible, tie troubleshooting items to releases: whichever version changes behavior in this area, run through those items while you’re at it. If you can’t do all of them, explicitly mark the unverified ones as “not re-verified in this version.”</p><h2 id="How-to-know-which-section-actually-gets-cited"><a href="#How-to-know-which-section-actually-gets-cited" class="headerlink" title="How to know which section actually gets cited"></a>How to know which section actually gets cited</h2><p>Three types of signals, from lowest to highest cost.</p><p>The cheapest is forwards in groups and tickets—look at which section the first link points to. This needs no tooling, just someone to record it. A version a small team can do: tally the first link in tickets once a week, and the section that ranks first four weeks running gets rewritten the next week.</p><p>Medium cost is search terms and landing-page data, which shows what words users arrived with and whether they bounced after arriving.</p><p>The most direct thing is external citations: which passage of yours the AI answer engines actually cite in their answers. In GEO (generative engine optimization, making content easier for AI answers to cite correctly), troubleshooting sections are the most worthwhile investment, because their citation intent is the clearest: when a user asks “what do I do about error X,” the model needs an answer it can execute directly. Agentrace does exactly this kind of observation—you can see which AI answers cite your content and which passage gets excerpted. It’s at <a href="https://geo.moreyin.cn/">https://geo.moreyin.cn</a> . Its value isn’t in rankings; it’s in showing you that what gets excerpted often isn’t the passage you put the most care into, but the one with the most complete structure.</p><p>But there’s a counterintuitive point to make clear first: being cited doesn’t mean the problem is solved. If a troubleshooting passage gets cited heavily and users still come back with questions afterward, the gap isn’t exposure—it’s that the handling steps are missing information like “who has permission to do this” and “what needs to be requested first.” Look at citation volume, and also at the follow-up questions after citation.</p><h2 id="When-a-troubleshooting-section-isn’t-worth-writing"><a href="#When-a-troubleshooting-section-isn’t-worth-writing" class="headerlink" title="When a troubleshooting section isn’t worth writing"></a>When a troubleshooting section isn’t worth writing</h2><p>This approach has preconditions: the problem recurs, and the handling path is relatively fixed.</p><p>For one-off failures, problems whose root cause is still being investigated, and problems that depend heavily on specific account states, writing a troubleshooting section is actually harmful, because you’re writing uncertain things as definite steps. Such content is better written as a status note: what’s known now, how broad the impact is, when the next update will come, and where to follow up.</p><p>Another case where it isn’t worth it: the problem is itself a product defect, and you’re papering over it with documentation. Documentation can lower per-incident support cost, but it masks the defect’s reproduction rate. When a section’s citation volume keeps rising, first check whether there’s a long-unfixed issue in that version, rather than thinking about how to write that section in more detail.</p><p>In the next planning cycle, cut some of the length from feature pages, copy the original error text from the last ten tickets as subheadings, and fill each one in using the six blocks above. When you’re done, copy each one out on its own and read it through—the one that doesn’t read smoothly is the one that will get asked again next week.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/schema-overload-citation-trust/">The fuller the schema is marked, the harder it is for the referencing party to trust it</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/29/ai-crawler-404-fix-entry-before-blocking/">AI crawlers are hitting more 404s; fix the entry points before discussing bans</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/28/robots-txt-gptbot-training-not-retrieval/">Allowing GPTBot is training authorization, not search visibility</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/27/llms-txt-link-annotations/">llms.txt only contains links, so the agent can only guess</a><span class="shared">GEO</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/30/troubleshooting-docs-get-cited-most/</id>
    <link href="https://bl8ds.com/en/2026/11/30/troubleshooting-docs-get-cited-most/"/>
    <published>2026-11-29T16:22:21.000Z</published>
    <summary>No matter how comprehensive a feature introduction is, it is rarely excerpted, yet the troubleshooting section is the most forwarded and cited part of documentation. This article explains the six blocks a troubleshooting entry should contain, why it must be self-contained, and when it should not be written as steps.</summary>
    <title>The most frequently cited section in product docs is the troubleshooting part; almost no one excerpts the feature introductions</title>
    <updated>2026-11-29T16:22:21.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="AI Products" scheme="https://bl8ds.com/en/tags/AI-Products/"/>
    <category term="Capability Discovery" scheme="https://bl8ds.com/en/tags/Capability-Discovery/"/>
    <category term="Product" scheme="https://bl8ds.com/en/categories/Product/"/>
    <category term="Product Design" scheme="https://bl8ds.com/en/tags/Product-Design/"/>
    <content>
      <![CDATA[<h2 id="If-usage-is-stuck-in-the-single-digits-don’t-touch-the-onboarding-yet"><a href="#If-usage-is-stuck-in-the-single-digits-don’t-touch-the-onboarding-yet" class="headerlink" title="If usage is stuck in the single digits, don’t touch the onboarding yet"></a>If usage is stuck in the single digits, don’t touch the onboarding yet</h2><p>Two weeks after an AI feature launched, the dashboard showed fewer than 5% of users had tried it, and those were concentrated in a handful of accounts that already liked experimenting. The team’s first reaction is almost always the same: write a more detailed feature intro page, add onboarding tooltips to the UI, record a thirty-second how-to video.</p><p>After all that, the curve didn’t move.</p><p>A documentation-collaboration team I worked with went down this road too. They ran three rounds of onboarding optimization for an “auto-generate comparison table” capability—from tooltips to videos to newbie tasks—and usage never crossed the double-digit percentage threshold. What actually worked later was a tiny change: after a user copied and pasted two similar chunks of content in a row, show a prompt directly asking “Want to merge these into a table?”</p><p>Post-mortems like this mostly point to the same conclusion: users don’t fail to use it because they can’t operate it—they don’t know what it’s capable of. These two things sound close but require completely different fixes. “Can’t operate it” is an interaction barrier; one extra step of explanation gets them through. “Doesn’t know the boundaries” is a cognition problem—no matter how clearly you write the steps, it won’t help, because the user simply doesn’t think of you at the right moment.</p><p>This judgment has a direct corollary: investment in capability discovery should go toward making users see it at the moment they’re stuck, not toward making users know we have this feature. A feature list is the laziest and also the most useless approach.</p><h2 id="Three-kinds-of-“don’t-know”—mix-them-together-and-none-get-fixed"><a href="#Three-kinds-of-“don’t-know”—mix-them-together-and-none-get-fixed" class="headerlink" title="Three kinds of “don’t know”—mix them together and none get fixed"></a>Three kinds of “don’t know”—mix them together and none get fixed</h2><p>Break “users don’t know” apart, and there are at least three kinds, with different symptoms and different fixes.</p><table><thead><tr><th>User’s state</th><th>Typical behavior</th><th>Effective intervention</th></tr></thead><tbody><tr><td>Doesn’t know this capability exists</td><td>Has never clicked it open</td><td>Attach it next to an existing high-frequency action</td></tr><tr><td>Doesn’t know what it’s capable of</td><td>Tried once, asked something too simple, found it useless</td><td>Give scope examples, explicitly state what not to use it for</td></tr><tr><td>Doesn’t know when to use it</td><td>Knows it exists, but doesn’t think of it during real tasks</td><td>Trigger it in the context of the stuck point</td></tr></tbody></table><p>Most teams only handle the first kind, because its data looks best: entry click-through rate, onboarding completion rate, feature page visits. All three metrics only prove the user has seen it—they can’t prove the user used it when they should have. Onboarding completion rate especially measures willingness to go through a one-time flow, which is almost uncorrelated with invocation during real tasks.</p><p>The third kind is the most expensive and the easiest to miss. A person knowing this tool can modify code, and him remembering to use it when he’s editing the same function for the third time—there’s an entire trigger design between those two. The former can be accomplished with a single exposure; the latter requires positional judgment within every task.</p><p>A note on boundaries: the fix priorities for these three kinds of “don’t know” are not equal. If the capability’s own success rate isn’t stable yet, don’t touch the first two—fix quality first. Once quality is stable, the third kind becomes the main contradiction, and it’s precisely not a copywriting problem.</p><h2 id="Feature-lists-are-a-capability-perspective-users’-heads-are-a-task-perspective"><a href="#Feature-lists-are-a-capability-perspective-users’-heads-are-a-task-perspective" class="headerlink" title="Feature lists are a capability perspective; users’ heads are a task perspective"></a>Feature lists are a capability perspective; users’ heads are a task perspective</h2><p>When the product side writes a feature list, it naturally organizes by capability dimension: supports summarization, supports translation, supports multi-turn follow-up, supports table extraction. This is clear within your own architecture diagram.</p><p>Users don’t search this way. He’s holding a procurement contract, and what’s in his head is which of these payment terms poses a risk to me. Capabilities and tasks map many-to-many: one task uses several capabilities, and one capability is scattered across dozens of tasks. Users won’t do this mapping themselves, especially when they’re in a hurry with a clear goal.</p><p>So a description like “supports multi-turn follow-up” carries almost no information in a feature list. Users won’t remember it after reading, because they don’t lack this knowledge—what they lack is the judgment of when it’s worth following up. The truly effective prompt happens at a moment like this: he pastes the same chunk of material into the dialog box for the third time.</p><p>This moment is observable in the system: same session, similar content, repeated paste. Text similarity plus a threshold can catch it, at very low cost. It improves this capability’s usage rate more than any copywriting optimization, because it solves a timing problem, not an understanding problem.</p><p>Another common approach is writing capabilities into the changelog, usually phrased as “New intelligent summary feature, supports one-click generation of key points.” When users read it, they have no task at hand and won’t remember; when they do have a task, they won’t go back and dig through the changelog. Changelogs are for people who already care about you—they’re not a discovery channel.</p><p>One more easily overlooked point: listing only what it can do without stating what it’s not suited for actually creates wrong expectations. A user takes it to do something it’s bad at, fails once, and never uses it again. Those few sentences clarifying boundaries often retain users better than enumerating capabilities.</p><h2 id="To-judge-whether-scenario-triggers-exist-look-at-where-first-use-happens"><a href="#To-judge-whether-scenario-triggers-exist-look-at-where-first-use-happens" class="headerlink" title="To judge whether scenario triggers exist, look at where first use happens"></a>To judge whether scenario triggers exist, look at where first use happens</h2><p>Here’s a very useful metric, more stable than both total volume and usage rate: the context distribution of a capability’s first use.</p><p>Don’t just instrument PV and UV on the feature button—record what the user was doing right before using this capability for the first time. The tracking fields look roughly like this:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">capability_first_use:</span></span><br><span class="line">  <span class="attr">event:</span> <span class="string">capability_first_use</span></span><br><span class="line">  <span class="attr">dims:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">capability_id</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">entry_context</span>      <span class="comment"># menu / help_center / update_note / trigger_blank / trigger_failure / trigger_repeat</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">action_before</span>      <span class="comment"># 触发前 30 秒内用户的操作类型</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">session_turn</span>       <span class="comment"># 提示出现在第几轮</span></span><br></pre></td></tr></table></figure><p>How to read the results: if more than 70% of first uses come from menus, help centers, or release announcements, you’re only converting active explorers—these people are a single-digit percentage in any product, and you haven’t touched a single one of the silent users. If first uses cluster after two or three specific actions—export failed, pasted overly long text, repeatedly edited the same passage—the triggers are working.</p><p>This measurement has another advantage: it’s unaffected by overall traffic fluctuations. Total volume rising might just mean traffic rose; only a change in context distribution means the product actually changed.</p><p>Following this line of thought, I also look at a crueler number: of each capability’s usage count, how much is reused within seven days after the first trigger. One-time use means the trigger brought people to the door, but the capability itself didn’t catch the need. These two problems are often conflated—one is discovery, the other is value—and the metrics must be viewed separately, or you’ll use discovery’s credit to cover up value’s failure.</p><h2 id="There-are-only-three-kinds-of-trigger-points-but-you-need-to-choose"><a href="#There-are-only-three-kinds-of-trigger-points-but-you-need-to-choose" class="headerlink" title="There are only three kinds of trigger points, but you need to choose"></a>There are only three kinds of trigger points, but you need to choose</h2><p>Scenario triggers don’t mean popping up prompts everywhere. There are basically three usable trigger positions.</p><p>Empty state: the user opens an empty input box. What you put here matters a lot. Put generic examples and users will feel it’s an ad; put one or two specific questions related to their current context and conversion differs by an order of magnitude. The criterion is whether the sentence contains their own content—like the title of the document they’re viewing, or the column names of the table they just uploaded. On quantity, my advice is two or fewer. Give five options and users will pick none, because choosing itself becomes a new burden.</p><p>Failure state: search returns nothing, validation fails, export errors out. At this moment users are most receptive to trying another approach, because the original path is already broken. This kind of trigger also costs the least—the prompt and the failure reason can be the same sentence, with no extra persuasion needed.</p><p>Repetition state: the same action appears for the third time within a short period. This is the most accurate signal and the one the fewest teams use. Repetition itself signals dissatisfaction with the existing path. The team I mentioned earlier attached a “batch processing” prompt when a user manually edited the fifth row in a row; that feature’s penetration went from single digits to double digits, with under a hundred lines of code changed.</p><p>Prompt frequency must be hard-controlled. My default is no more than two proactive prompts per session, and no repeat of the same type of prompt within seven days. The cost of a false trigger is trust, far more expensive than a missed trigger. Users’ tolerance for “this thing keeps guessing wrong what I want to do” is far lower than for “I never even discovered it could do this.” There’s no middle ground in this trade-off—you can only pick a side.</p><h2 id="For-some-capabilities-discovery-is-actually-a-bad-thing"><a href="#For-some-capabilities-discovery-is-actually-a-bad-thing" class="headerlink" title="For some capabilities, discovery is actually a bad thing"></a>For some capabilities, discovery is actually a bad thing</h2><p>Capabilities whose failure cost is irreversible should not be proactively triggered. For actions like deletion, bulk overwriting, and outbound sending, once a user clicks under a prompt, there is no way to recover from a mistake. Such capabilities should only appear when the user actively looks for them—better that no one uses them.</p><p>For capabilities with unstable success rates, fix quality before fixing discoverability. Pushing a capability with a 60% success rate in front of users is equivalent to multiplying its failure probability by its exposure, and users will blame the entire product for that one failure. Doing discoverability at this point is accelerating negative word of mouth.</p><p>For capabilities without a corresponding high-frequency task, don’t build guidance yet. If you can’t write a single sentence saying a user will need it when doing X, that means the need hasn’t been validated; building guidance at this point is just inflating data for a fake need, and the nice-looking curve you inflate will mislead the next round of investment.</p><p>The order of judgment can be fixed.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[能力已上线] --&gt; B{成功率稳定吗}    B --&gt;|否| C[先修质量 不做发现]    B --&gt;|是| D{失败可撤回吗}    D --&gt;|否| E[只在用户主动查找时露出]    D --&gt;|是| F{有对应高频任务吗}    F --&gt;|否| G[不做引导 等需求验证]    F --&gt;|是| H[挂在卡点动作后触发]</pre></div><p>Following this order can cut a lot of guidance requirements that would otherwise have been built. Cutting them is a good thing, because every proactive prompt consumes a share of the user’s attention budget for the product. That budget doesn’t grow because you send one more prompt—it only shrinks.</p><h2 id="A-checklist-you-can-take-and-revise-your-copy-with"><a href="#A-checklist-you-can-take-and-revise-your-copy-with" class="headerlink" title="A checklist you can take and revise your copy with"></a>A checklist you can take and revise your copy with</h2><p>Compress this whole thing into five questions and run through them before launching any capability discovery:</p><ol><li>What high-frequency task does this capability correspond to? If you can’t state it in one specific sentence, stop.</li><li>After which action does the user most need it? Can that action be observed in the system?</li><li>Can the trigger carry the user’s current content? If you can only put generic examples, the effect will be discounted.</li><li>How many times at most per session, and how long before the same type of prompt repeats?</li><li>Is there instrumentation on the first-use context? If not, you can’t tell whether this change is good or not.</li></ol><p>Items 2 and 3 are the watershed. If you can’t do these two, what you’re building is actually a feature announcement, not capability discovery. The difference between an announcement and discovery is plain: an announcement assumes the user will remember; discovery assumes the user forgets right now, so you have to put the thing right at hand.</p><p>Back to that 5% usage rate. What really needs to change is usually not the copy, but moving that copy from the feature page to the place where the user gets stuck, and carrying what’s in their hands. This sounds small, but it determines whether the remaining 95% have a chance to know what you’ve built.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2025/11/26/must-ask-pm-interview-question-if-you-were-to-add-an-ai-feature-to-our/">When asked to add an AI feature, I first ask whether we should add it</a><span class="shared">AI Products · Product Design</span></li><li><a href="/en/2026/11/29/realtime-inference-cost-capacity-not-tokens/">Real-time interaction values capacity reservation, not token unit price</a><span class="shared">Product Design</span></li><li><a href="/en/2026/11/28/consent-not-just-notice/">A clear privacy policy does not equal valid consent</a><span class="shared">AI Products</span></li><li><a href="/en/2026/11/26/ai-take-home-should-test-tradeoffs/">AI roles' take-home assignments should test trade-off decisions, not precision</a><span class="shared">AI Products</span></li><li><a href="/en/2026/11/23/badcase-review-meeting-pricing-errors/">Badcase review meeting: price the error first</a><span class="shared">AI Products</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/29/ai-capability-discovery-by-scenario/</id>
    <link href="https://bl8ds.com/en/2026/11/29/ai-capability-discovery-by-scenario/"/>
    <published>2026-11-28T16:20:16.000Z</published>
    <summary>AI feature usage is low, and most teams start by revising onboarding copy, but the real issue lies in capability boundaries and trigger timing. This article breaks down three kinds of &quot;not knowing,&quot; provides tracking specifications for first-time use, and offers a pre-launch checklist.</summary>
    <title>The reason nobody uses AI features isn't that they don't know how—it's that they don't know what to ask</title>
    <updated>2026-11-28T16:20:16.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="AI Coding" scheme="https://bl8ds.com/en/tags/AI-Coding/"/>
    <category term="Engineering Practices" scheme="https://bl8ds.com/en/tags/Engineering-Practices/"/>
    <category term="Refactoring" scheme="https://bl8ds.com/en/tags/Refactoring/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A team writes reducing technical debt into its quarterly goals, and the usual approach is to give everyone access to an AI assistant, then wait for code quality metrics to change. After a quarter, the metrics often barely move, but engineers feel that things really did get easier. These two conclusions aren’t contradictory—it’s just that the work saved wasn’t booked under the “refactoring” account.</p><p>What AI actually eats up is the changes whose rules can be stated in one sentence: collecting scattered string constants into an enum, uniformly replacing hundreds of old interface names, wrapping a batch of handlers in the same error-handling layer, converting old-style print statements into function calls. This work used to be either done on overtime or put on the “when there’s time” list, where it sat for two years.</p><p>The other part booked under refactoring—whether this module should be split, whether this layer of abstraction is worth keeping, whether two services should be merged—gets wildly varying answers from AI, and you can’t verify whether it’s right. Two kinds of work get lumped under one word, so both the budget and the expectations are misplaced.</p><h2 id="The-returns-on-mechanical-rewriting-are-roughly-linear-and-have-little-to-do-with-how-smart-the-model-is"><a href="#The-returns-on-mechanical-rewriting-are-roughly-linear-and-have-little-to-do-with-how-smart-the-model-is" class="headerlink" title="The returns on mechanical rewriting are roughly linear and have little to do with how smart the model is"></a>The returns on mechanical rewriting are roughly linear and have little to do with how smart the model is</h2><p>Splitting refactoring into two halves makes things much clearer: the part where rules are decidable, and the part where they aren’t. For the former, the workload is roughly the number of change points times the per-point cost, and the per-point cost is determined by rule clarity and verification methods. Swapping the model from one generation to the next won’t change this part’s returns by an order of magnitude, because the bottleneck is “are the rules written rigidly enough” and “can the verification actually run,” not comprehension.</p><p>A common scenario: a backend repo that’s been running for five or six years, where the service layer has dozens of functions each assembling the same response structure, with three different spellings of field names and error codes scattered everywhere. The rules for this kind of rewrite can be written in one sentence, and the number of change points is on the order of several hundred. One engineer with AI can finish it in roughly one to two days, most of which goes to validation and spot-checking, not generation.</p><p>Compare that with another task: having AI decide how many pieces this two-thousand-line class should be cut into, where to cut, and how to draw the boundaries. It gives a different plan every time, and no plan can be automatically verified. You can only rely on people reading, discussing, and judging the business’s next six months. The output of this kind of work is a decision, not lines of code; AI’s role here is to offer candidates, not to make the call for you.</p><p>For the part of refactoring that can be handed to AI, the returns are roughly proportional to the number of change points and only weakly correlated with model capability; the real variable is whether the rule can be written as a sentence with no “it depends.”</p><p>There’s also a counterintuitive phenomenon worth noting: the clearer the rules, the more stable AI’s performance, and the lower people’s trust in it—because what it generates looks too simple. So some teams take this kind of task back and do it by hand, reasoning that “it’s not hard anyway.” That’s waste. Simple doesn’t mean cheap; hundreds of simple changes stacked up is months of debt.</p><h2 id="Why-nobody-does-this-accounting"><a href="#Why-nobody-does-this-accounting" class="headerlink" title="Why nobody does this accounting"></a>Why nobody does this accounting</h2><p>The output of mechanical rewriting is a diff, not a feature. It doesn’t go into the requirements list, the release notes, or any delivery metric. Whenever a team asks me where the returns on refactoring are, I can only give an indirect answer: every future change to this code will take less time, and the probability of errors will be lower. That answer can’t go into a quarterly report.</p><p>And public discussion of AI coding is heavily concentrated on “can it write new features”—the demos all show an app growing out of an empty directory. So the scenario with the most certain returns and the easiest failure containment is paradoxically the hardest to get approved as a project.</p><p>My judgment: refactoring is the most underrated application of AI coding because its return shape is “time saved in the future,” while the vast majority of teams only count “time already spent.” This isn’t a cognition problem; it’s an accounting-basis problem.</p><h2 id="What-blocks-people-isn’t-the-rewriting-it’s-deciding-which-part-counts-as-mechanical"><a href="#What-blocks-people-isn’t-the-rewriting-it’s-deciding-which-part-counts-as-mechanical" class="headerlink" title="What blocks people isn’t the rewriting, it’s deciding which part counts as mechanical"></a>What blocks people isn’t the rewriting, it’s deciding which part counts as mechanical</h2><p>Since the returns depend on rule clarity, the real bottleneck is classification. Here’s a set of criteria you can use directly.</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">把一段重构交给 AI 之前，逐条过：</span><br><span class="line">1. 规则能用一句话写完，不含“视情况而定”</span><br><span class="line">2. 结果能被编译器、类型检查或现有测试判真假</span><br><span class="line">3. 单次改动的 diff 形状一致，看三处能推知其余</span><br><span class="line">4. 失败是局部的，改错只影响被改的那一处</span><br><span class="line">5. 一次提交能整段 revert，不用手工拆</span><br></pre></td></tr></table></figure><p>Item 2 is the one most easily skipped. Many teams think having tests is enough, but tests cover behavior, not shape. If the refactoring changes internal structure, all-green tests may mean the tests never even reach the changed path. Decidable means the machine raises an alarm when something is changed wrong, not that a person discovers it by feel during review. In old projects this is usually the sticking point, so the first step is often not writing rules but getting tests on the critical paths to the point where they can run.</p><p>Item 4 determines whether to batch. Renaming a single function is local; swapping the global date handling to a new library is not—time zones, formatting, and serialization boundaries all move with it, and one mistake drags down a whole area. Even if the rules are written very clearly, this kind of change must be split by module and verified batch by batch.</p><p>Item 3 is for reviewers. Only when the diff shape is consistent can review extrapolate from a sample to the whole. If a batch mixes three different shapes, review can only go line by line, and the time AI saved gets handed right back.</p><p>Item 5 is the safety net. A commit that can’t be rolled back as a whole means that when something goes wrong you can only pick things out by hand, which under the time pressure of incident response is almost guaranteed to go wrong.</p><h2 id="Abstraction-decisions-can’t-be-outsourced-because-the-cost-lands-six-months-later"><a href="#Abstraction-decisions-can’t-be-outsourced-because-the-cost-lands-six-months-later" class="headerlink" title="Abstraction decisions can’t be outsourced, because the cost lands six months later"></a>Abstraction decisions can’t be outsourced, because the cost lands six months later</h2><p>A common path goes like this: AI sees that three handlers each have a similar chunk of error handling and quite naturally extracts a shared function. The second change adds a parameter, the third adds a flag, and six months later the function has seven boolean parameters, with each call site passing a different combination. At that point you can’t delete it, and you don’t dare change it.</p><p>With abstraction, the benefit is now—duplicate lines drop immediately; the cost is in the future—the coupling surface every future change has to cross gets bigger. AI is only responsible for the former, not the latter, so its default tendency is always to abstract a bit more. This isn’t a flaw in the model; it’s determined by the objective it’s optimized for: ask it to eliminate duplication, and it will eliminate duplication.</p><p>The opposite error exists too. To keep things simple, you keep three separate copies of logic that’s clearly identical, and then one requirement change means editing three places, and missing one is a production incident. So the problem isn’t “if a human decides, it’s necessarily right”—it’s that this judgment requires someone to bear the consequences and to see the maintenance cost six months out. Right now that position can only be filled by a human.</p><p>There’s a boundary where you can give ground: if the abstraction converges locally—say, a private function extracted within a single file that doesn’t spill out into a shared utility—then AI’s proposal can be used directly. The criterion is the abstraction’s visibility scope; the smaller the scope, the lower the cost of trial and error. A team agreeing “AI may not add cross-module shared abstractions” is far more executable than asking it to “not over-abstract.”</p><h2 id="Changes-that-look-mechanical-are-the-most-likely-to-blow-up"><a href="#Changes-that-look-mechanical-are-the-most-likely-to-blow-up" class="headerlink" title="Changes that look mechanical are the most likely to blow up"></a>Changes that look mechanical are the most likely to blow up</h2><p>Converting callbacks to async&#x2F;await is the most “looks like mechanical rewriting, actually least mechanical” category I’ve seen. On the surface it’s a syntax swap, but in reality the error propagation path changes: exceptions in callbacks may have been swallowed at some layer, and after converting to await they’re thrown straight to the caller; things that used to be guaranteed by callback order are now guaranteed by microtask order, and some timing assumptions stop holding. Branches the tests don’t cover come out green after the change and blow up in production.</p><p>Rewrites involving concurrency, error propagation, lifecycle, serialization formats, or transaction boundaries can’t be treated as mechanical, even if the diff is only a few dozen lines.</p><p>Batch-adding timeouts and retries to interfaces is the same category. The template is very uniform and fully meets the literal requirement of “rules stated in one sentence,” but retries are a disaster for non-idempotent write interfaces—three retries might place three orders. The rules must spell out the scope of application, and the information “which interfaces are idempotent” isn’t in the code; only the person who maintains the service knows it.</p><p>So whether a change is mechanical isn’t judged by diff length or degree of repetition, but by whether it touches state and timing. Highly repetitive but purely literal changes can be handed off; a one-line change that alters execution order cannot.</p><h2 id="Pipeline-Humans-set-rules-and-templates-AI-does-the-diffusion-humans-review-the-shape"><a href="#Pipeline-Humans-set-rules-and-templates-AI-does-the-diffusion-humans-review-the-shape" class="headerlink" title="Pipeline: Humans set rules and templates, AI does the diffusion, humans review the shape"></a>Pipeline: Humans set rules and templates, AI does the diffusion, humans review the shape</h2><p>Putting the above points together, the practical form looks roughly like this.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart LR    A[人写规则] --&gt; B[人改一处样板]    B --&gt; C[AI 扩散其余]    C --&gt; D[编译与测试]    D --&gt; E[人审 diff 形状]    E --&gt; F{有越界改动}    F --&gt;|有| C    F --&gt;|无| G[合并]</pre></div><p>The most valuable step in this process is a human revising one template. The template is both an anchor for the AI and an acceptance baseline for the human. Once the template is revised, the implicit constraints in the rules that weren’t clearly written surface: naming conventions, log formats, parameter order, exception types. These things can’t be captured in a one-sentence rule, but they can be reflected in a diff.</p><p>My default is to keep a single commit within twenty files and a four-hundred-line diff; split anything beyond that. Not because the model can’t handle a larger volume, but because a human has to review it. Beyond that volume, review degrades from looking at the shape to scanning through, and the miss rate rises noticeably. This number is empirical; teams with high test coverage can relax it, and vice versa.</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">task:</span> <span class="string">统一</span> <span class="string">handler</span> <span class="string">错误包装</span></span><br><span class="line"><span class="attr">scope:</span> <span class="string">src/handlers/**/*.ts</span></span><br><span class="line"><span class="attr">rule:</span> <span class="string">导出函数体用</span> <span class="string">withErrorBoundary</span> <span class="string">包裹，签名和返回值不变</span></span><br><span class="line"><span class="attr">exclude:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">src/handlers/health.ts</span></span><br><span class="line"><span class="attr">verify:</span> <span class="string">tsc</span> <span class="string">--noEmit</span> <span class="string">&amp;&amp;</span> <span class="string">pnpm</span> <span class="string">test</span> <span class="string">--filter</span> <span class="string">handlers</span></span><br><span class="line"><span class="attr">stop_if:</span> <span class="string">出现无法自动判定的分支，列清单交回人工</span></span><br></pre></td></tr></table></figure><p>The stop_if line deserves separate mention. For a task without a stop condition, when the AI hits an ambiguous branch it picks a direction and continues on its own, and that direction is often wrong—and it’s buried in hundreds of lines of diff. Explicitly writing “stop and list the items when you hit a certain kind of situation” amounts to handing the judgment back to the human, and it also tells the reviewer where to focus.</p><p>The review actions need to change too. Reading the diff line by line is subsidizing the machine with human time; the right approach is to sample three things: whether the template spot is consistent with the rules, whether a random five percent sample is isomorphic, and whether there are out-of-bounds changes (files changed outside the scope). If all three pass, the rest goes to compilation and tests.</p><h2 id="How-to-schedule-this-quarter’s-refactor"><a href="#How-to-schedule-this-quarter’s-refactor" class="headerlink" title="How to schedule this quarter’s refactor"></a>How to schedule this quarter’s refactor</h2><p>First go through each item on the refactor list by “can the rule be stated in one sentence,” and split them into two piles.</p><p>The first pile is mechanical rewriting. This pile can be parallelized, compressed, and handed to junior engineers working with AI; the acceptance criteria are compilation passing, tests passing, and sampled diffs being isomorphic. Estimate the schedule by the number of change points, not by gut-feel person-days.</p><p>The second pile is design trade-offs. This pile can’t be compressed, and AI shouldn’t lead it. The output is a few candidate approaches and one decision, which requires judgment about the business over the next six months and an estimate of the team’s maintenance capacity. The rhythm is discussion and review, not generation.</p><p>Scheduling the two piles together most commonly results in the mechanical part being done quickly, the design part being squeezed, and the final delivery being code that’s neater but a structure that hasn’t improved. Conversely, scheduling only design and not mechanical work means engineers spend a lot of time on low-value repetitive labor, and the refactor itself gets dragged down.</p><p>There’s another easily overlooked benefit: once the mechanical rewriting is done, the discussion of the second pile becomes easier. Field names are unified, error codes are converged, readers of the code don’t have to do a mental translation first, and the judgment of where abstractions should be cut becomes more accurate. The two piles aren’t parallel; they have an order.</p><p>Before scheduling the refactor into the next iteration, spend half an hour listing that checklist and write down “the one-sentence version of this rule” for each item. The items you can’t write out are the refactors that genuinely need a human this round, and the only part worth a meeting to discuss. The rest goes to the pipeline.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/ai-code-review-shift-to-intent-and-boundaries/">The more code AI writes, the more reviews should focus on intent and boundaries</a><span class="shared">AI Coding</span></li><li><a href="/en/2026/08/27/automation-flow-pitfalls/">The automated process ran successfully for two hours and has been stable for three weeks</a><span class="shared">Engineering Practices</span></li><li><a href="/en/2026/05/31/api-details-from-the-caller-side/">Most pitfalls callers encounter lie in places not covered by the API documentation</a><span class="shared">Engineering Practices</span></li><li><a href="/en/2026/02/06/context-window-compaction-and-offloading/">When the context is nearly full, what do I compress and what do I externalize?</a><span class="shared">Engineering Practices</span></li><li><a href="/en/2025/09/03/ai-agent-engineering-interview-tool-callingmemoryragplanning--executio/">The hard part of an agent isn't getting it to run, but being able to converge after it goes wrong</a><span class="shared">Engineering Practices</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/29/ai-coding-refactor-mechanical-vs-design/</id>
    <link href="https://bl8ds.com/en/2026/11/29/ai-coding-refactor-mechanical-vs-design/"/>
    <published>2026-11-28T16:19:31.000Z</published>
    <summary>What AI can truly take over in refactoring is mechanical rewriting governed by decidable rules, with gains that are certain and verifiable; the design trade-offs of abstraction and boundaries, however, cannot be made by anyone else, because the cost lands six months later. This piece offers a checklist for making that judgment and a pipeline for putting it into practice.</summary>
    <title>Refactoring is the most underrated application of AI coding</title>
    <updated>2026-11-28T16:19:31.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Agent" scheme="https://bl8ds.com/en/tags/Agent/"/>
    <category term="Architecture Design" scheme="https://bl8ds.com/en/tags/Architecture-Design/"/>
    <category term="Prompts" scheme="https://bl8ds.com/en/tags/Prompts/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A common disagreement in solution reviews: for the same task—classifying tickets into eight categories, extracting order numbers and requests, and drafting a reply for support—someone will propose an Agent (a proxy that can autonomously decide its next action): first have one role classify, then another role retrieve from the knowledge base, then a third role write the reply, and finally add a QA role. It sounds like a clear division of labor, but the actual input is just one ticket and a few fixed fields. This task does not require exploring paths; it only requires output according to a contract. One prompt plus structured validation can cover most cases. The problem is not whether the model is strong enough, but that the architecture choice has been led astray by what is “advanced.”</p><p>A single prompt is not just writing a sentence casually. It is more like a call contract: what input fields exist, what output fields exist, how each field is validated, and under what conditions to refuse to answer or escalate to a human. If the contract is written clearly, the model can complete mapping-type tasks in a single call. If it is not written clearly, adding an Agent only splits vague requirements into more vague steps.</p><h2 id="First-determine-whether-the-task-has-a-path"><a href="#First-determine-whether-the-task-has-a-path" class="headerlink" title="First determine whether the task has a path"></a>First determine whether the task has a path</h2><p>I first look at whether the task has path uncertainty, not whether the task sounds complex. Path uncertainty means: whether the next step depends on the previous step’s tool return or intermediate observation. If all steps can be written down in advance, then even if there are ten steps, it is still a workflow, not an Agent.</p><p>Mapping-type tasks are suitable for a single prompt: classification, extraction, summarization, rewriting, scoring, and generation in a fixed format. Given the input, output a verifiable result; the model does not need to “see how things go” in between. Search-type tasks are what require an Agent: first check the logs, find that a service timed out, then decide whether to check dependencies or configuration; first retrieve from the knowledge base, find conflicting answers, then decide whether to ask the user a follow-up question or escalate to a human. The next step depends on the previous step’s observation—this is where an Agent is useful.</p><p>Complexity is not the criterion. Refund approval may involve five or six rules and three systems, but the rules are clear and the branches are enumerable, so a fixed workflow is more stable. Online troubleshooting may have only three steps, but what to check at each step depends on what the previous step returns; this kind of task requires autonomous decision-making. Mistaking “complex” for “uncertain” is the most common starting point for over-architecture.</p><h2 id="Tasks-that-a-single-prompt-can-solve-have-three-hard-characteristics"><a href="#Tasks-that-a-single-prompt-can-solve-have-three-hard-characteristics" class="headerlink" title="Tasks that a single prompt can solve have three hard characteristics"></a>Tasks that a single prompt can solve have three hard characteristics</h2><p>Tasks that a single prompt can solve usually satisfy three conditions at the same time: clear input boundaries, verifiable output, and failures that can be retried without external side effects. If any one of the three is missing, consider adding a workflow or tools, but do not jump directly to an Agent.</p><p>Clear input boundaries mean the model does not need to find missing information itself. The ticket text, order status, and user tier are all in the request, and the model only performs classification and generation. If half the input is missing and the model must decide which system to query, that is another type of problem. Verifiable output means you can write down fields, enum values, length limits, and refusal conditions, rather than just writing “help me handle this.” Failures can be retried without side effects, meaning that if one output is wrong, rerunning or escalating to a human can cover it, and it will not automatically issue refunds, automatically change addresses, or automatically send notifications.</p><p>A call contract for a ticket scenario roughly looks like this:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">task:</span> <span class="string">工单分类与摘要</span></span><br><span class="line"><span class="attr">input:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">ticket_text</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">order_status</span></span><br><span class="line"><span class="attr">output:</span></span><br><span class="line">  <span class="attr">category:</span> <span class="string">枚举值</span></span><br><span class="line">  <span class="attr">order_id:</span> <span class="string">字符串或空</span></span><br><span class="line">  <span class="attr">summary:</span> <span class="string">不超过80字</span></span><br><span class="line">  <span class="attr">reply_draft:</span> <span class="string">不超过200字</span></span><br><span class="line"><span class="attr">reject_if:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">category</span> <span class="string">为</span> <span class="string">other</span> <span class="string">且置信度低于</span> <span class="number">0.6</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">order_id</span> <span class="string">与输入不一致</span></span><br></pre></td></tr></table></figure><p>Once this contract is written, many arguments disappear. If it cannot be written, it means the task boundary has not been thought through, and adding an Agent will only postpone the boundary problem to runtime. If it can be written, first run a batch of real inputs and see whether failures are concentrated in single-step capability or path selection. This order cannot be reversed.</p><h2 id="The-cost-of-multi-step-architectures-usually-shows-up-in-latency-and-attribution"><a href="#The-cost-of-multi-step-architectures-usually-shows-up-in-latency-and-attribution" class="headerlink" title="The cost of multi-step architectures usually shows up in latency and attribution"></a>The cost of multi-step architectures usually shows up in latency and attribution</h2><p>The cost of multi-step architectures does not grow linearly; latency, tokens (model billing units), and error attribution amplify together. Each additional model call adds one more queueing step, one more context read, and one more output generation. If single-step latency is around one second, five steps in series can easily reach four to seven seconds; in support scenarios, waiting three seconds and waiting seven seconds are two different experiences.</p><p>Error rates also accumulate. Assuming a single-step success rate of 95%, the overall success rate of five steps in series is about 0.95 to the fifth power, roughly over 70%; with a single-step rate of 90%, five steps leave only about 60%. This is arithmetic reasoning, not a measured value from a particular system, but it indicates a direction: the more steps there are, the more each step needs validation and fallback. An Agent’s autonomy does not automatically improve single-step accuracy; it only strings multiple single steps together.</p><p>What is more troublesome is attribution. When a single call fails, you can look at the input and output to locate whether the error is extraction, classification, or formatting. When a five-step Agent fails, it may be that the first step’s retrieval did not recall, the second step chose the wrong tool, the third step misunderstood the tool return, or the fourth step filled in the wrong parameters for a write operation. Without complete trace logs, online problems can only be guessed. Trace logs must also record each step’s input, tool return, model decision, and latency, and evaluation costs rise accordingly. Agent evaluation cannot compare only the final answer; it must also check whether the path is reasonable, whether the number of steps exceeds budget, and whether write operations have been approved.</p><p>There is a clear trade-off here: if the task has a high unit value, failures can be covered by humans, and latency is not sensitive, the cost of a multi-step architecture is acceptable; if the task is high-frequency, low-unit-value, and the user is waiting in front of the screen, a single call plus validation is usually more cost-effective. It is not that multi-step is necessarily wrong, but multi-step must buy new information or new decisions. If it buys neither, you are paying latency for nothing.</p><h2 id="Push-Agent-requirements-back-into-workflows"><a href="#Push-Agent-requirements-back-into-workflows" class="headerlink" title="Push Agent requirements back into workflows"></a>Push Agent requirements back into workflows</h2><p>The most effective action for pushing Agent requirements back into workflows is to first write a single-call contract, then classify badcases (failure samples). I first ask: can this task be written as a single-call contract? Failure samples roughly fall into three categories: insufficient single-step capability, such as insufficient knowledge, unstable formatting, or unhandled ambiguity; path selection errors, such as not knowing what to check first or choosing the wrong tool; and tool execution errors, such as wrong parameters, timeouts, or insufficient permissions. The first two categories should first be addressed by improving retrieval, improving prompts, and adding validation and retries; only the third category requires redesigning the tool interface or introducing limited autonomous decision-making.</p><p>The following table can be used for initial screening:</p><table><thead><tr><th>Question</th><th>Single prompt</th><th>Fixed workflow</th><th>Agent</th></tr></thead><tbody><tr><td>Can steps be written down in advance?</td><td>Yes, single step</td><td>Yes</td><td>No</td></tr><tr><td>Do branches depend on intermediate results?</td><td>No</td><td>Branches enumerable</td><td>Yes</td></tr><tr><td>Are there write operations?</td><td>None</td><td>Yes, approved per node</td><td>Yes, requires sandbox and approval</td></tr><tr><td>Can failures be retried?</td><td>Yes</td><td>Yes, node retry</td><td>Partially, requires rollback</td></tr><tr><td>Latency budget</td><td>One to three seconds</td><td>Three to ten seconds</td><td>Ten seconds or more is common</td></tr><tr><td>Evaluation method</td><td>Output comparison</td><td>Node plus end-to-end</td><td>Trace plus end-to-end</td></tr></tbody></table><p>The latency in the table is an order of magnitude, not a promised value. What it intends to show is that each time the architecture goes up one level, the waiting cost the product must pay and the observability cost engineering must pay both change. The decision chain below is used to decide which level to try first, rather than choosing the heaviest one from the start.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD  A[输入输出能否固定] --&gt;|能| B[一次提示词加校验]  A --&gt;|不能| C[分支能否提前枚举]  C --&gt;|能| D[固定工作流]  C --&gt;|不能| E[是否需要写操作或长任务]  E --&gt;|否| F[受限Agent只读工具]  E --&gt;|是| G[Agent加审批与回滚]</pre></div><p>If most badcases are incorrect single-step outputs, adding an Agent will only bury the errors deeper. If failures are concentrated in “not knowing what to check first,” that is when the task has path uncertainty and is worth letting the model make limited decisions. This judgment does not require waiting for a major release; running dozens to hundreds of real inputs can reveal the outline. The sample size does not need to be large, but it must cover long-tail and boundary inputs; otherwise it is easy to mistake demo performance for production performance.</p><h2 id="If-you-really-need-an-Agent-write-the-stop-rules-first"><a href="#If-you-really-need-an-Agent-write-the-stop-rules-first" class="headerlink" title="If you really need an Agent, write the stop rules first"></a>If you really need an Agent, write the stop rules first</h2><p>If you really want to deploy an Agent, write the stop rules first, then talk about autonomy. An Agent’s usability doesn’t depend on how many steps it can take, but on at which step it must stop. Without a step limit, a budget cap, an allowed-tool list, and write-operation approval, so-called autonomy just hides uncertainty in the runtime and pushes the cost of failure onto production.</p><p>A minimal configuration looks roughly like this:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">agent_budget:</span></span><br><span class="line">  <span class="attr">max_steps:</span> <span class="number">6</span></span><br><span class="line">  <span class="attr">max_tool_calls:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">max_cost_usd:</span> <span class="number">0.30</span></span><br><span class="line">  <span class="attr">timeout_seconds:</span> <span class="number">45</span></span><br><span class="line">  <span class="attr">allowed_tools:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">search_kb</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">get_order</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">create_ticket_note</span></span><br><span class="line">  <span class="attr">require_approval:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">refund</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">change_address</span></span><br><span class="line">  <span class="attr">on_step_limit:</span> <span class="string">return_partial_with_trace</span></span><br></pre></td></tr></table></figure><p>Every field here is a product constraint. max_steps being six means that beyond six steps it returns partial results and hands off to a human, rather than letting the model keep trying. max_cost_usd is the per-task budget; exceed it and it stops. require_approval blocks write operations like refunds and address changes behind human confirmation. on_step_limit requires returning partial results and the trajectory, not just a one-line failure. Without these, the more autonomous the Agent, the harder production is to backstop.</p><p>Write operations also need idempotency keys and a rollback plan. Retrying the same refund request twice must not refund twice; after a failed address change, the original address must be restorable. These aren’t model-capability problems; they’re system-design problems. The Agent can decide “call the refund tool next,” but the refund tool itself must be able to reject duplicate requests, record the approver, and support revocation. Writing the responsibility boundary into the interface is far more useful than writing “please operate carefully” in the prompt.</p><h2 id="At-review-ask-for-two-things-first"><a href="#At-review-ask-for-two-things-first" class="headerlink" title="At review, ask for two things first"></a>At review, ask for two things first</h2><p>At the next review, I’ll first ask the proposer to hand in two things: the input&#x2F;output contract for a single call, and a failure classification of the most recent twenty badcases. If they can’t produce them, don’t discuss the Agent yet; if they can, and the failures cluster around path selection, then talk about autonomous decision-making. This order filters out most “advanced for the sake of being advanced” proposals, and it also lets tasks that genuinely need an Agent get the budget and observability resources they deserve.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/agent-tool-overload-candidate-set/">With more than a dozen tools available, Agents first fail by choosing the wrong one</a><span class="shared">Agent</span></li><li><a href="/en/2026/11/27/llms-txt-link-annotations/">llms.txt only contains links, so the agent can only guess</a><span class="shared">Agent</span></li><li><a href="/en/2026/11/25/parallel-tool-calls-read-parallel-write-serialized/">Parallel tool calls: reads can be concurrent, writes must be queued</a><span class="shared">Agent</span></li><li><a href="/en/2026/11/24/model-tool-calling-least-privilege-confirmation/">A model being able to call tools does not mean it can execute them directly</a><span class="shared">Agent</span></li><li><a href="/en/2026/11/23/agent-capability-ceiling-tool-design/">The ceiling of an agent lies not in the model, but in the tool interface design</a><span class="shared">Agent</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/29/dont-use-agent-for-single-prompt-task/</id>
    <link href="https://bl8ds.com/en/2026/11/29/dont-use-agent-for-single-prompt-task/"/>
    <published>2026-11-28T16:18:40.000Z</published>
    <summary>Many tasks can be completed with a single prompt plus structured validation; adding an Agent instead compounds latency, cost, and attribution difficulty. This article provides a criterion for choosing architecture based on task uncertainty and a stopping rule.</summary>
    <title>One prompt is enough, don't bring in an Agent</title>
    <updated>2026-11-28T16:18:40.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Inference Costs" scheme="https://bl8ds.com/en/tags/Inference-Costs/"/>
    <category term="Latency" scheme="https://bl8ds.com/en/tags/Latency/"/>
    <category term="Product" scheme="https://bl8ds.com/en/categories/Product/"/>
    <category term="Product Design" scheme="https://bl8ds.com/en/tags/Product-Design/"/>
    <content>
      <![CDATA[<p>Putting report generation capability into a chat box is a very common requirement. The justification in reviews is usually just one sentence: the user is already here and doesn’t want to jump to another page. Engineering-wise it really isn’t hard; the APIs are all ready-made. What’s actually hard is what happens after you do the cost math: for the same report, building it as a dialog box costs an order of magnitude more than building it as a scheduled task, and the expensive part has basically nothing to do with token count.</p><p>This gap is worth unpacking, because it determines what a lot of AI products ultimately look like. Even when you’re calling the same model once, real-time and offline are not the same business.</p><h2 id="Real-time-is-expensive-because-you-pay-for-the-time-nobody-is-using-it"><a href="#Real-time-is-expensive-because-you-pay-for-the-time-nobody-is-using-it" class="headerlink" title="Real-time is expensive because you pay for the time nobody is using it"></a>Real-time is expensive because you pay for the time nobody is using it</h2><p>First, separate the two bills. The book cost of a request is token count times unit price—anyone can calculate that. The service cost of providing that request is something else: at the moment the user presses Enter, there has to be compute that is warm, idle, and immediately available.</p><p>Offline tasks can accumulate requests, stuff them into a full batch, and run a card close to full utilization. On the same card, batch processing can complete a considerable multiple of the token volume that real-time can, depending on model size and batch limits—usually several times in order of magnitude. Real-time can’t do this: the user is waiting there, and you can’t make them queue while others fill a batch.</p><p>Hence the first thing to remember: the cost of real-time inference is determined by peak concurrency, not by average call volume.</p><p>A quick calculation makes it intuitive. Suppose a voice assistant receives 2 new sessions per second, each session lasts 90 seconds on average, so average concurrency is 180 streams. That’s before peak—morning and evening peaks can be two or three times the average. The compute kept resident to withstand that peak sits idle most of the day. If the same capability were changed to “upload a recording, get the result a few minutes later,” those 180 streams could queue and be batched, capacity demand would drop by an order of magnitude, and users would perceive no difference at all.</p><p>This calculation rarely comes up in product reviews, because everyone is used to estimating “how many calls per day” rather than “how many requests are being processed in the same second.” The former determines the token cost on the bill; the latter determines how many cards you need to buy.</p><p>The second cost comes from streaming output. To make the first token fast, the model emits text while generating, and that connection is occupied for the entire generation period. The user reads slowly, but the GPU doesn’t compute any less because of that. Session persistence, context replay, and KV cache holding VRAM without releasing it are all money paid for “the user might ask another question at any time.” Only when the user closes the page do those resources actually free up.</p><p>So when judging whether a feature should be real-time, the first question isn’t whether users want instant feedback, but how much peak concurrency differs from average concurrency. The wider the gap, the higher the extra cost of real-time.</p><h2 id="First-token-latency-is-a-hard-constraint-and-shortening-output-length-is-the-most-effective-cost-control"><a href="#First-token-latency-is-a-hard-constraint-and-shortening-output-length-is-the-most-effective-cost-control" class="headerlink" title="First-token latency is a hard constraint, and shortening output length is the most effective cost control"></a>First-token latency is a hard constraint, and shortening output length is the most effective cost control</h2><p>Real-time products have two latency budgets, and many people watch only one.</p><p>The first is first-token latency, from when the user sends a request to when they see the first character. Empirically, it needs to be in the hundreds of milliseconds to feel responsive; past one second users start wondering whether they even clicked, and after two or three seconds some start refreshing the page. Voice scenarios are stricter: the turn-taking interval in human conversation is already on the order of hundreds of milliseconds, and if the machine takes more than a second to respond, users instinctively feel the other party didn’t understand.</p><p>The second is total generation time. Users can tolerate a fast first character with slower output afterward because they’re reading; but if the whole thing takes十几 seconds, they start getting impatient halfway through.</p><p>These two budgets affect cost completely differently. First-token latency is mainly determined by prompt length and prefill; long context means recomputing history every turn, so cost grows linearly with the number of conversation turns, and latency grows with it. Total generation time is determined by output length, and output length is something the product can specify: default short answers, require structured output, set max tokens—all trade information volume for cost and latency.</p><p>Here’s a counterintuitive point: the most effective way for a real-time product to save money isn’t switching to a smaller model, it’s making answers shorter. Switching models degrades quality, users notice immediately, then ask again, and all the money saved goes right back; compressing an 800-word answer to 300 words often leaves users more satisfied.</p><p>When does this not hold? When what the user wants is a complete deliverable: a report, a contract, a modified code file. Such needs should be moved to async in the first place; forcing them into a dialog box only shortchanges both sides.</p><h2 id="Retry-rate-is-an-easily-overlooked-cost-multiplier"><a href="#Retry-rate-is-an-easily-overlooked-cost-multiplier" class="headerlink" title="Retry rate is an easily overlooked cost multiplier"></a>Retry rate is an easily overlooked cost multiplier</h2><p>In real-time products, users don’t wait quietly. If it times out, they resend; if they’re unhappy with the answer, they ask again; if the network hiccups, they click three times in a row. Every retry is a complete inference, plus a chunk of occupied capacity on top.</p><p>So when looking at cost, don’t just look at a single call; look at how many calls it takes on average to complete one effective interaction. This coefficient is clearly higher in real-time scenarios than offline. Offline tasks can retry internally on failure, invisible to the user and without consuming their attention; real-time retries are often initiated by the user, emotionally charged, and frequently concurrent.</p><p>Investment in reducing retry rates often pays back more than squeezing token unit prices. The specific methods aren’t complicated: deliver the already-generated partial result before timeout, clearly tell the user what they’re waiting for, and on failure offer one-click retry instead of making them retype everything. These are interaction design, not model optimization, but they directly change the cost structure.</p><p>Correspondingly, on metrics, looking at cost per interaction is illusory; cost per successful interaction is what matters. The denominator includes retries and abandonments, and for the abandoned portion, the cost of user churn is far more expensive than compute.</p><h2 id="On-the-same-product-line-real-time-and-offline-have-different-pricing-logic"><a href="#On-the-same-product-line-real-time-and-offline-have-different-pricing-logic" class="headerlink" title="On the same product line, real-time and offline have different pricing logic"></a>On the same product line, real-time and offline have different pricing logic</h2><p>Pricing real-time by token is a mismatch. Users can’t predict how many tokens an interaction will cost, and passing cost fluctuations directly to them only leaves a vague impression: this thing is expensive. The more common approach is pricing by seat, by session, or by duration.</p><p>But per-seat pricing immediately brings another problem: revenue and usage decouple, and heavy users become negative gross margin. So the pricing structure of real-time products usually combines three things: subscription, quotas, and degradation. Quotas aren’t stinginess; they protect the first-token latency of everyone else in the same pool. One user running a long task will slow down others’ P99, and this cost externality genuinely exists in a shared capacity pool—self-discipline can’t solve it.</p><p>Offline products, conversely, can honestly charge by usage, because request boundaries are clear, users know what they’re buying, and they can control batch size themselves.</p><p>A table makes the comparison clearer:</p><table><thead><tr><th>Dimension</th><th>Offline or async</th><th>Real-time interaction</th></tr></thead><tbody><tr><td>What capacity is provisioned for</td><td>Average throughput</td><td>Peak concurrency</td></tr><tr><td>Main cost items</td><td>Total compute</td><td>Compute, idle time, session persistence</td></tr><tr><td>Latency target</td><td>Completion time, minutes acceptable</td><td>First token and P99</td></tr><tr><td>Billing method</td><td>Pay per use</td><td>Subscription or seat plus quota plus degradation</td></tr><tr><td>Quality trade-offs</td><td>Can use large models, long output</td><td>Often needs short output, small-model fallback</td></tr></tbody></table><p>The last row doesn’t mean real-time can only use worse models than good ones; it means real-time must have a fallback path. When the model times out, gets rate-limited, or the upstream jitters, the product needs an escape route that “delivers part first” rather than leaving the user staring at a spinner. This escape route must be decided at the design stage; patching it in afterward is usually too late.</p><h2 id="Which-interactions-truly-need-real-time"><a href="#Which-interactions-truly-need-real-time" class="headerlink" title="Which interactions truly need real-time"></a>Which interactions truly need real-time</h2><p>I don’t quite believe the claim that “users all want instant feedback.” The criterion can be harder: during the wait, can the user go do something else? If yes, it should be async; only if no does real-time even come into question.</p><p>Cutting along this line, the scenarios that truly need real-time have something in common: the next action depends on the previous result, and during the wait the user is locked into this interface. Code completion, chat, voice, and search suggestions all fall into this category—time isn’t a cost item, it’s the product itself.</p><p>Conversely, real-time is basically a waste in these cases: results are consumed by downstream systems rather than shown to people; a single task is inherently minute-scale; trigger frequency is so low it’s a few times a day. Low-frequency scenarios are the worst fit for real-time—keeping a compute instance resident for those few requests makes unit cost ugly enough that you can’t even price it.</p><p>The middle ground is underestimated: give the structure first, then fill in the content. Hand out the outline, progress, and partial results first so the user starts reading, and fill in the rest gradually. It costs considerably less than full real-time, and feels close to real-time. The product form is “skeleton first, body later” and “first three items first, completion later.” This approach works especially well in reports, long-form writing, and analysis products, because it moves the wait off the user’s perception path rather than actually making computation faster.</p><p>Drawn as a decision flow, it looks roughly like this:</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[用户发起请求] --&gt; B{等待期间能去做别的事吗}    B -- 能 --&gt; C[异步任务并通知]    B -- 不能 --&gt; D{下一步依赖这一步结果吗}    D -- 否 --&gt; C    D -- 是 --&gt; E{峰值并发远高于均值吗}    E -- 是 --&gt; F[实时并做限额降级]    E -- 否 --&gt; G[实时按席位定价]    C --&gt; H[按量计费可用大模型]</pre></div><p>When a requirement that takes the left-hand path insists on being given a chat box, it’s usually not product insight—it’s that nobody wants to bear the pressure of “making the user wait.”</p><h2 id="Turning-the-latency-budget-into-tunable-parameters"><a href="#Turning-the-latency-budget-into-tunable-parameters" class="headerlink" title="Turning the latency budget into tunable parameters"></a>Turning the latency budget into tunable parameters</h2><p>Putting the above into a set of executable parameters looks roughly like this. Tune the values by scenario; the structure matters more than the values.</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 实时链路预算模板</span></span><br><span class="line"><span class="attr">first_token_ms:</span> <span class="number">800</span>        <span class="comment"># 首 token 目标，超过 1s 用户开始怀疑</span></span><br><span class="line"><span class="attr">stream_interval_ms:</span> <span class="number">60</span>     <span class="comment"># 出字间隔，太长会显得一顿一顿</span></span><br><span class="line"><span class="attr">hard_timeout_ms:</span> <span class="number">8000</span>      <span class="comment"># 超时先交付已有内容，别让用户干等</span></span><br><span class="line"><span class="attr">max_output_tokens:</span> <span class="number">400</span>     <span class="comment"># 超过这个量级的需求，默认转异步任务</span></span><br><span class="line"><span class="attr">degrade_model:</span> <span class="string">small</span>       <span class="comment"># 限流或超时时切小模型，保可用性</span></span><br></pre></td></tr></table></figure><p>The key is the last two lines. max_output_tokens isn’t just a cost switch—it’s actually a product-form switch: once you accept that long outputs go async, the design space for the real-time path suddenly widens, you no longer need to reserve capacity for large generations, and the first-token budget can be set more aggressively.</p><p>Conversely, if the product insists that all output appear in the chat box, that cap has to keep going up, capacity goes up with it, and in the end you either raise prices or quietly degrade quality. These are two sides of the same decision.</p><h2 id="Which-number-to-ask-for-first-in-review"><a href="#Which-number-to-ask-for-first-in-review" class="headerlink" title="Which number to ask for first in review"></a>Which number to ask for first in review</h2><p>Back to the requirement at the start about stuffing reports into a chat box. It’s not necessarily undoable, but the review order should be reversed: first ask how far peak concurrency diverges from average concurrency, then ask what the P99 first-token budget is, and only then discuss whether to stream and whether to render as you go.</p><p>If these three numbers can’t be answered, the proposal itself isn’t ready for review.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/27/prefix-cache-cuts-ttft-not-decode-cost/">Prefix caching saves on the first token, not on generation length</a><span class="shared">Latency · Inference Costs</span></li><li><a href="/en/2026/12/01/context-window-doubling-not-capability-doubling/">Double the context does not mean double the effective capability</a><span class="shared">Inference Costs</span></li><li><a href="/en/2026/11/29/ai-capability-discovery-by-scenario/">The reason nobody uses AI features isn't that they don't know how—it's that they don't know what to ask</a><span class="shared">Product Design</span></li><li><a href="/en/2026/11/23/personalization-needs-an-explicit-correction-channel/">The more AI understands you, the more you need to leave a path to overturn it</a><span class="shared">Product Design</span></li><li><a href="/en/2026/11/22/model-error-liability-by-control/">Responsibility for model errors is allocated by degree of control, not by who is weaker</a><span class="shared">Product Design</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/29/realtime-inference-cost-capacity-not-tokens/</id>
    <link href="https://bl8ds.com/en/2026/11/29/realtime-inference-cost-capacity-not-tokens/"/>
    <published>2026-11-28T16:17:34.000Z</published>
    <summary>The same model call, whether made into a real-time conversation or an asynchronous task, has completely different cost structures and pricing logic. This article breaks down exactly where real-time interaction gets expensive and offers a hard criterion for deciding whether real-time is warranted.</summary>
    <title>Real-time interaction values capacity reservation, not token unit price</title>
    <updated>2026-11-28T16:17:34.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Crawler Logs" scheme="https://bl8ds.com/en/tags/Crawler-Logs/"/>
    <category term="Entry Point Governance" scheme="https://bl8ds.com/en/tags/Entry-Point-Governance/"/>
    <category term="GEO" scheme="https://bl8ds.com/en/tags/GEO/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A content site’s log dashboard grouped by User-Agent, originally meant to see how much bandwidth AI crawlers eat, but the first thing visible was the 404 share: single digits site-wide, but 30–40% in the AI crawler column. The two usual next moves are adding Disallow to robots.txt or blocking by UA at the WAF. After doing so, 200-level crawl volume drops too, and citations don’t come back.</p><p>Both moves were made too early.</p><p>My read: a high 404 rate for AI crawlers is mostly not it crawling wildly, but off-site entry URLs having expired. Search engines have sitemaps, historical crawl records, and recrawl scheduling; when a page moves, they catch up within weeks. Agents have none of that. They decide per request, get a 404, and leave.</p><h2 id="First-split-404s-into-four-categories-mixing-them-guarantees-misjudgment"><a href="#First-split-404s-into-four-categories-mixing-them-guarantees-misjudgment" class="headerlink" title="First split 404s into four categories; mixing them guarantees misjudgment"></a>First split 404s into four categories; mixing them guarantees misjudgment</h2><p>In the logs all 404s look the same, but the causes are completely different, and the handling can even be opposite. At minimum, split into four categories.</p><p>The first is genuine dead links. Articles taken down, redesigns changing slugs, the site migrating from &#x2F;post&#x2F; to &#x2F;blog&#x2F; — internal links cleaned up, but external citations still point at the old address. This kind of 404 means others still remember your history.</p><p>The second is parameter URLs. Links with utm_source, ref, share tokens, or from fail route matching and return 404 directly. Many AI entry points append source parameters when redirecting to external links, and links users copy from share buttons are also full parameterized URLs.</p><p>The third is form variants. Trailing slash vs. no trailing slash, case, index.html, http vs. https, www vs. non-www. To you it’s the same page; to the server it’s four addresses, three of which may be 404.</p><p>The fourth is status code mismatch. Blocked by the WAF but returning 404 instead of 403, or a single-page app without route fallback, where any unmatched path returns the same 404 shell.</p><p>Looked at together, the only conclusion is “lots of 404s,” and then you go block crawlers. The way to look at them separately isn’t complicated: group logs by UA, then by path prefix, then overlay status code, and build a pivot table.</p><p>Here’s the criterion. If the top 10 path patterns cover over 80% of 404s, it’s an entry problem — a few redirect rules will eliminate most of it. If 404s are evenly spread across hundreds of paths, each appearing only once or twice, that’s when parameter enumeration deserves consideration. The two are handled in completely opposite ways.</p><h2 id="Why-agents-follow-old-links"><a href="#Why-agents-follow-old-links" class="headerlink" title="Why agents follow old links"></a>Why agents follow old links</h2><p>When a search engine finds a 404, it checks the sitemap, internal links, and redirects, and corrects itself after a few rounds. An agent makes one decision per session. It gets URLs from only three sources: citations in other pages’ body text, old addresses in model memory, and full links pasted by users. None of these three sources update in sync when you change internal links.</p><p>The result: old links already cleaned up internally are still alive in others’ citations; the agent crawls them, gets a 404, and skips that address for this round. It won’t guess where the new address is. So the 404 here isn’t “it’ll fix itself next time” — that citation is lost on the spot.</p><p>Parameter URLs are even more typical. Agents won’t normalize for you, and you can’t expect them to read canonical like a search engine to decide which to crawl. They fire the URL first and deal with the 404 after. The same parameter page returning 404 only wastes one crawl budget for a search engine, but for an agent it directly loses a possible citation.</p><p>The diagram below is the decision chain from logs to handling: branch first, then decide what to change.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[日志按 UA 分组] --&gt; B{404 集中在少数路径}    B -- 是 --&gt; C[查站内外旧链接]    B -- 否 --&gt; D[查参数与分页组合]    C --&gt; E[旧地址 301 到新地址]    D --&gt; F[参数归一或限流]    E --&gt; G[看引用是否回流]    F --&gt; G</pre></div><p>One counterintuitive point: returning 404 for these requests is better than a 301 to a wrong page, but far worse than a 301 to the correct page. The worst in between is returning a 200 empty shell — the agent thinks it got content and interprets the blank as body text, which is harder to correct than plainly saying there’s nothing.</p><h2 id="Redirect-with-301-where-you-can-don’t-use-410-normalize-instead-of-blocking"><a href="#Redirect-with-301-where-you-can-don’t-use-410-normalize-instead-of-blocking" class="headerlink" title="Redirect with 301 where you can; don’t use 410; normalize instead of blocking"></a>Redirect with 301 where you can; don’t use 410; normalize instead of blocking</h2><p>Status codes are instructions for machines to read, not error messages for humans. For the same old address, the four responses have very different consequences.</p><table><thead><tr><th>Situation</th><th>Should return</th><th>Consequence</th></tr></thead><tbody><tr><td>Page moved, external citations remain</td><td>301 to new address</td><td>Citation moves to the new page</td></tr><tr><td>Content permanently removed</td><td>410</td><td>Removed from candidates faster than 404</td></tr><tr><td>Only has parameters</td><td>301 to parameterless version</td><td>More reliable than 200 plus canonical</td></tr><tr><td>Unpublished or token expired</td><td>403, with no content returned</td><td>Keeps it out of the candidate pool</td></tr></tbody></table><p>404 is the worst default. It neither says it moved nor says don’t come back; the agent only knows there’s nothing here. 410 is clearer, but use it only when content is truly permanently removed — using 410 for a redesign URL change is actively giving up that citation.</p><p>The risk with 301 is in the mapping. Redirecting an old address to an unrelated page makes the agent treat that page as a replacement for the old content, which is harder to correct than a 404. So go through the redirect table manually, one by one; don’t write a single regex wildcarding all &#x2F;post&#x2F; to the &#x2F;blog&#x2F; homepage. The homepage can’t carry specific content — the agent gets a page unrelated to the original question, the citation won’t come back, and it will skew its understanding of the site.</p><p>Parameter URLs have two treatments. 301 to the parameterless version is simple and direct, and agents will definitely follow it; or return 200 with canonical pointing to the parameterless version, which is safer but requires an extra render, and you can’t count on agents reading canonical. I lean toward the former, for the reason above: they fire the URL first and look at the result after.</p><h2 id="An-entry-checklist-you-can-follow-directly"><a href="#An-entry-checklist-you-can-follow-directly" class="headerlink" title="An entry checklist you can follow directly"></a>An entry checklist you can follow directly</h2><p>Ordered by return on investment: fix the widest coverage first, then the long tail.</p><ol><li>Site-wide URLs with tracking parameters: 301 to the parameterless version</li><li>Old paths left by site redesigns: write mappings one by one, no regex wildcards</li><li>Unify trailing slashes and case, keeping only one form</li><li>Configure route fallback for single-page apps; don’t let unmatched paths spit out a 404 shell</li><li>Drafts, previews, and tokenized share links: add authentication and ensure no body content is returned</li></ol><p>The first two can be done with nginx, no application code changes needed.</p><figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 带追踪参数的 URL 统一回到无参版本</span></span><br><span class="line"><span class="comment"># if 在 nginx 里通常要少用，但只做 return 301 是安全的</span></span><br><span class="line"><span class="attribute">if</span> (<span class="variable">$args</span> <span class="regexp">~* &quot;(^|&amp;)(utm_source|utm_medium|utm_campaign|ref|from|share|fbclid)=&quot;)</span> &#123;</span><br><span class="line">    <span class="attribute">return</span> <span class="number">301</span> <span class="variable">$scheme</span>://<span class="variable">$host</span><span class="variable">$uri</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment"># 旧路径逐条映射，不要一把梭到首页</span></span><br><span class="line"><span class="section">location</span> = /post/old-slug &#123;</span><br><span class="line">    <span class="attribute">return</span> <span class="number">301</span> /blog/new-slug;</span><br></pre></td></tr></table></figure><p>The first rule only works if the parameterless path itself returns 200. If it’s also a 404, the redirect just moves the 404 to another address — the 404 count in the logs won’t drop, only a batch of 301s will appear. Run an availability check on target addresses before going live.</p><h2 id="When-rate-limiting-and-blocking-actually-apply"><a href="#When-rate-limiting-and-blocking-actually-apply" class="headerlink" title="When rate limiting and blocking actually apply"></a>When rate limiting and blocking actually apply</h2><p>The number of pages on a site is a known quantity. Use it as the denominator to judge whether a UA is crawling normally or enumerating.</p><p>Normal magnitude: an AI crawler’s daily request volume is roughly one to three times the site’s actual page count; sites with frequent content updates reach about five times, due to multiple recrawl rounds. If a UA’s daily count of unique URLs reaches more than ten times the page count, and the paths are full of enumerable parameters like p, page, and s, then it’s not an entry problem — the parameter space has been opened up. That’s when rate limiting and robots make sense, because what you’re blocking is request volume, not address errors.</p><p>What should really be blocked at the entrance isn’t AI crawlers—it’s previews and drafts. Once a tokenized share link enters some proxy’s candidate pool, unpublished content has leaked, and such links naturally expire, after which they’re just a pile of 404s. They shouldn’t rely on 404s as a fallback; noindex and an expiry should be added at the moment the link is generated.</p><p>There’s also an ordering problem here. Disallow in robots isn’t free—what it turns off is visibility itself. The request volume you block may only be a few percentage points, but if what you block is the main crawl entry point, citations disappear along with it, and that disappearance is gradual—you only notice weeks later. So reserve blocking for the one case of “confirmed enumeration.”</p><h2 id="What-metrics-to-watch-after-the-fix"><a href="#What-metrics-to-watch-after-the-fix" class="headerlink" title="What metrics to watch after the fix"></a>What metrics to watch after the fix</h2><p>Don’t stare at the total 404 count. The total fluctuates with the proxy’s crawl rhythm; a halving may just mean it didn’t come this week, unrelated to what you changed.</p><p>Watch three. First, 404 path concentration—is the share of the top 10 patterns falling? If it’s falling, normalization is working. Second, 301 hit volume—how many requests are being caught; this number should rise first, then stabilize. Third is whether citations of 200 pages in AI answers have come back—this can’t be seen in logs.</p><p>Logs can tell you the proxy came, how many times, and what it fetched; they can’t tell you who it ultimately cited or which page it cited. That requires a separate observability layer—for example, what Agentrace does is the GEO layer: seeing whether your content gets cited in AI search and which URL is cited (<a href="https://geo.moreyin.cn/">https://geo.moreyin.cn</a>). The order can’t be reversed: first fix the entry points so the proxy reliably gets 200s, then observe citations. Otherwise what you see is “citations haven’t come back,” when the actual reason is that it never crawled at all.</p><p>Next time 404s suddenly spike in the logs, first run a UA × path-prefix pivot, sorted by path pattern. If the top 10 patterns cover over 80%, write 301s one by one—don’t touch robots. If they don’t cover 80%, check parameters and pagination to see whether some UA is enumerating. If neither, then consider rate limiting. Before changing config, at least print out the top 10 path patterns and take a look—that one look is usually more useful than a week of alerts.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/schema-overload-citation-trust/">The fuller the schema is marked, the harder it is for the referencing party to trust it</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/30/troubleshooting-docs-get-cited-most/">The most frequently cited section in product docs is the troubleshooting part; almost no one excerpts the feature introductions</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/28/robots-txt-gptbot-training-not-retrieval/">Allowing GPTBot is training authorization, not search visibility</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/27/llms-txt-link-annotations/">llms.txt only contains links, so the agent can only guess</a><span class="shared">GEO</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/29/ai-crawler-404-fix-entry-before-blocking/</id>
    <link href="https://bl8ds.com/en/2026/11/29/ai-crawler-404-fix-entry-before-blocking/"/>
    <published>2026-11-28T16:16:34.000Z</published>
    <summary>In the logs, the 404 rate for AI crawlers suddenly doubled; banning is usually the worst first step. This article breaks down four types of 404s, how to choose status codes, and at what scale rate limiting becomes the next step</summary>
    <title>AI crawlers are hitting more 404s; fix the entry points before discussing bans</title>
    <updated>2026-11-28T16:16:34.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="AI Products" scheme="https://bl8ds.com/en/tags/AI-Products/"/>
    <category term="Privacy Design" scheme="https://bl8ds.com/en/tags/Privacy-Design/"/>
    <category term="Product" scheme="https://bl8ds.com/en/categories/Product/"/>
    <category term="User Consent" scheme="https://bl8ds.com/en/tags/User-Consent/"/>
    <content>
      <![CDATA[<p>A very common review scenario: Legal has revised the privacy policy to its eighth version, with more complete wording—processing purposes, data types, and retention periods are all filled in—and the product manager breathes a sigh of relief, believing the authorization work is done. But from the standpoint of whether consent is valid, this revision has barely changed the conclusion. A more detailed policy only shows that notice is more complete; whether the authorization obtained for a specific processing action is valid depends on another set of conditions.</p><h2 id="A-policy-is-general-notice-consent-is-specific-authorization"><a href="#A-policy-is-general-notice-consent-is-specific-authorization" class="headerlink" title="A policy is general notice; consent is specific authorization"></a>A policy is general notice; consent is specific authorization</h2><p>The two have different objects. A privacy policy answers “how this company processes personal information in general,” is aimed at all users and all scenarios, and is a general text; consent answers “do you agree to this one thing,” is aimed at a specific person and a specific processing action. The granularity differs, and so do the conditions for invalidation. Policy revisions are usually whole-text replacements, whereas consent must be withdrawable separately for each purpose.</p><p>The focus of the legal texts is also not on “writing it clearly.” Article 4(11) of the GDPR (General Data Protection Regulation) defines consent as a freely given, specific, informed, and unambiguous indication of will; Article 7(3) requires that withdrawing consent be as easy as giving it. Article 14 of the Personal Information Protection Law of the People’s Republic of China requires consent to be given voluntarily and explicitly by the individual on the basis of full information, and Article 15 requires processors to provide a convenient way to withdraw consent. In these two articles, neither “explicit” nor “convenient withdrawal” can be satisfied by increasing the length of the copy.</p><p>So to judge whether a consent holds up, I prefer to break it down into four verifiable attributes: specific, voluntary, withdrawable, and provable. If any one is missing, the consent will not hold up in a real dispute. Explainability is not listed separately; it is distributed across these four: whether users can clearly state what they consented to, and whether the team can clearly state why this piece of data is being processed.</p><h2 id="Specific-one-consent-corresponds-to-one-processing-action"><a href="#Specific-one-consent-corresponds-to-one-processing-action" class="headerlink" title="Specific: one consent corresponds to one processing action"></a>Specific: one consent corresponds to one processing action</h2><p>Counterexamples are easy to find. A line at the bottom of the registration page says “I have read and agree to the Privacy Policy,” and the policy contains the sentence “We may use your information to improve our services.” To users, this sentence is unforeseeable: what information, which model is improved, how long it is retained, and whether it can be refused are all blank. For scenarios such as using conversation data for training, this kind of bundled consent basically does not hold up.</p><p>The fix is to split processing actions apart and then choose a legal basis for each processing action; making the policy longer does not solve the problem.</p><table><thead><tr><th>Processing action</th><th>Legal basis</th><th>Make it a toggle?</th><th>Consequence after withdrawal</th></tr></thead><tbody><tr><td>Conversation content used for the current generation</td><td>Necessary for contract performance</td><td>No, notice is sufficient</td><td>Not applicable</td></tr><tr><td>Security review and risk-control logs</td><td>Necessary for contract performance</td><td>No, notice is sufficient</td><td>Not applicable</td></tr><tr><td>Conversations used for model training</td><td>Separate consent</td><td>Yes, off by default</td><td>Stop subsequent sampling</td></tr><tr><td>Used for personalized recommendations</td><td>Separate consent</td><td>Yes</td><td>Fall back to default ranking</td></tr><tr><td>Shared with third parties</td><td>Separate consent</td><td>Yes, recipient types must be listed</td><td>Stop sharing</td></tr></tbody></table><p>To judge whether the granularity is sufficient, there is a crude but effective standard: with only the toggle name plus one sentence of explanation, can the user clearly state “what will happen if I refuse”? If not, the granularity is too coarse, regardless of how well the copy is written.</p><p>The most common rework here does not happen in legal, but on the data side. To meet launch deadlines, teams stuff the training purpose into the privacy policy and treat authorization as complete, while historically collected data has no consent marker at all. Once separate consent has to be added retroactively, that past batch of data can only be abandoned wholesale, and the usable training set shrinks from “all history” to “newly collected”—during cold start, there may be only a few weeks’ worth left. The work to redo pop-ups and toggles is a few days; the work to backfill data is several months, and it cannot be recovered.</p><h2 id="Voluntary-the-cost-of-refusal-determines-whether-consent-holds-up"><a href="#Voluntary-the-cost-of-refusal-determines-whether-consent-holds-up" class="headerlink" title="Voluntary: the cost of refusal determines whether consent holds up"></a>Voluntary: the cost of refusal determines whether consent holds up</h2><p>If turning off personalization means losing the main functionality, then it is not freely given. Article 16 of the Personal Information Protection Law is very direct: a processor may not refuse to provide a product or service on the grounds that an individual does not consent to the processing of their personal information or withdraws consent, unless such processing is necessary to provide the product or service.</p><p>The test is not complicated: turn off each consent toggle in turn, walk through the main flow, and see where it breaks. If it breaks, ask, “Is this step really necessary?” Most of the time you will find that necessary and non-necessary processing have been mixed into the same authorization, usually because it is easier to implement: one pop-up, one boolean field, and one tracking event are much cheaper than five toggles. That cost is real, but it cannot be saved by merging authorizations.</p><p>Another hidden cost is friction. Withdrawal entrances hidden four levels deep in settings, withdrawal requiring an email application, and withdrawal requiring identity verification all over again—these all discount “voluntary.” My default practice is: the interface where consent is given must be able to turn it off, with no redirects.</p><h2 id="Withdrawable-the-truly-difficult-part-for-AI-products"><a href="#Withdrawable-the-truly-difficult-part-for-AI-products" class="headerlink" title="Withdrawable: the truly difficult part for AI products"></a>Withdrawable: the truly difficult part for AI products</h2><p>Withdrawal from traditional datasets can be done by deletion; model training cannot. Once data enters the weights, individual records cannot be deleted. This is the part most easily glossed over in privacy policies and least designed for in products.</p><p>The semantics of withdrawal must be split into at least three layers, and each layer has a different effective time and strength of commitment.</p><p>Stop subsequent collection: effective immediately, entirely achievable.</p><p>Remove from the training dataset: effective in the next data window, usually on the order of weeks.</p><p>Already-trained models: individual forgetting is impossible. Feasible alternatives are no longer feeding data back, natural phase-out with retraining cycles, and output-side filtering.</p><p>The three layers must be written clearly and separately; they cannot be glossed over with a single sentence like “after withdrawal, we will stop using your information.” Vagueness has consequences in both directions: users think the data has been completely deleted, and the team thinks it has promised something it cannot deliver.</p><p>One explicit trade-off: if removal from the model cannot be achieved, do not imply in the copy that it can be removed; instead, commit to “no longer used for subsequent training and not included in the next round of retraining data.” This is much safer than writing something beautiful that cannot be delivered. The cost is a higher withdrawal rate—users may hesitate when they see “cannot be deleted.” I accept this cost, because the risk of failing to deliver is greater than a few points lower consent rate.</p><p>A metric issue by the way. The withdrawal rate is not a good metric; the withdrawal completion time is. A low conversion rate at the withdrawal entrance is often not because users do not want to withdraw, but because they cannot find the entrance. I would split “from clicking withdraw to processing complete” into two time points and track them separately: stopping collection measured in hours, and data leaving the warehouse measured in days. These are internal commitments, not statutory values, and are more suitable for an SLA than for the privacy policy.</p><p>There is one more point on which I currently have no conclusion: whether model quality evaluation counts as an independent processing purpose. Strictly speaking, it is also processing and should be separately notified; but evaluation sampling that is completely non-withdrawable would weaken user control. The current compromise is to notify the evaluation purpose separately and allow refusal; after refusal, use immediate response-quality signals within the session, without storing them. This approach does lose evaluation capability, and long-term metrics will become duller, but I have not yet found a cleaner solution.</p><h2 id="Provable-which-fields-a-consent-record-must-retain-at-minimum"><a href="#Provable-which-fields-a-consent-record-must-retain-at-minimum" class="headerlink" title="Provable: which fields a consent record must retain at minimum"></a>Provable: which fields a consent record must retain at minimum</h2><p>When a dispute arises, what needs to be proven is: who, at what time, saw which version of the copy, from which entrance, and made what choice. Storing only a boolean and a user ID is not enough; once the policy is revised, it cannot be explained.</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">consent_record:</span></span><br><span class="line">  <span class="attr">subject_id:</span> <span class="string">u_8f21c</span>            <span class="comment"># 用户标识，脱敏存储</span></span><br><span class="line">  <span class="attr">purpose:</span> <span class="string">model_training</span>        <span class="comment"># 处理目的，枚举值</span></span><br><span class="line">  <span class="attr">decision:</span> <span class="string">granted</span>              <span class="comment"># granted 或 denied</span></span><br><span class="line">  <span class="attr">policy_version:</span> <span class="string">pp_2024_11</span>     <span class="comment"># 政策版本号</span></span><br><span class="line">  <span class="attr">copy_snapshot_hash:</span> <span class="string">a91c...</span>    <span class="comment"># 弹窗文案快照哈希</span></span><br><span class="line">  <span class="attr">entry_point:</span> <span class="string">settings_center</span>   <span class="comment"># 授权来源入口</span></span><br><span class="line">  <span class="attr">occurred_at:</span> <span class="number">2024-11</span><span class="string">-08T10:12Z</span></span><br><span class="line">  <span class="attr">withdraw:</span></span><br><span class="line">    <span class="attr">requested_at:</span> <span class="literal">null</span></span><br><span class="line">    <span class="attr">effective_at:</span> <span class="literal">null</span></span><br><span class="line">    <span class="attr">scope:</span> <span class="literal">null</span>                  <span class="comment"># sampling 或 dataset 或 both</span></span><br></pre></td></tr></table></figure><p>The fields most easily overlooked are copy_snapshot_hash and entry_point. The former addresses “how that sentence was worded at the time”; the latter addresses “which path the user came in through,” because contextual differences across entrances affect whether notice was sufficient.</p><p>Version binding is another boundary line. After a policy change, old consent cannot be carried over automatically. If a change expands the scope of processing, consent must be obtained again; changes that merely clarify wording with no substantive change may be carried over, but a snapshot of the old version must be retained. This line is often blurred in practice, especially through self-assessment claims like “we improved the wording”—worth checking item by item during review whether the processing purpose has changed.</p><h2 id="Explainability-users-ask-“why-are-you-asking-me-now”—there-must-be-an-answer"><a href="#Explainability-users-ask-“why-are-you-asking-me-now”—there-must-be-an-answer" class="headerlink" title="Explainability: users ask “why are you asking me now”—there must be an answer"></a>Explainability: users ask “why are you asking me now”—there must be an answer</h2><p>Explainability has two directions, often merged into a single document. Externally, it is “why this authorization prompt appears at this moment, and what refusing will affect”; internally, it is “why this piece of data is processed, which legal basis it rests on, and how long it is retained.”</p><p>A privacy policy can only carry a small part of the external side, because it has no “this moment.” What is really needed is an entry point that can answer specific questions at specific moments—for example, a single screen in an authorization center that shows three things at a glance: what I have enabled, where the data flows, and how to turn it off. This screen has a much higher information density than the policy and is far more likely to actually be read.</p><h2 id="Several-criteria-you-can-take-straight-into-review"><a href="#Several-criteria-you-can-take-straight-into-review" class="headerlink" title="Several criteria you can take straight into review"></a>Several criteria you can take straight into review</h2><p>Next time you review a privacy popup, don’t touch the copy first. List this processing-action inventory, and fill in three things for each row: the legal basis, whether it can be refused separately, and what happens after withdrawal. The row you cannot fill in is where the problem lies—and no copy edit will fix it.</p><p>Beyond the inventory, there are four checkpoints worth fixing into the pre-release process. Whether each processing action can be refused separately, and whether the main flow remains usable after refusal. Whether the withdrawal entry point is at the same level as the consent entry point, and whether withdrawal takes effect with disclosure split into three tiers. Whether consent records are bound to copy versions, and whether historical data contains unmarked gray zones. Whether revocable consent has been misapplied to necessary processing—withdrawing that would break the service outright.</p><p>One final metric suggestion: don’t make consent rate your north star. Consent rate can be pushed very high by dark patterns, but it can be negatively correlated with whether users actually know what they are consenting to. What is more worth measuring is whether sampled users can name which items they have enabled, and how long withdrawal requests take to complete.</p><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li>Full text of the Personal Information Protection Law of the People’s Republic of China, gov.cn: <a href="https://www.gov.cn/xinwen/2021-08/20/content_5632486.htm">https://www.gov.cn/xinwen/2021-08/20/content_5632486.htm</a></li><li>Official text of Regulation (EU) 2016&#x2F;679 (GDPR), EUR-Lex: <a href="https://eur-lex.europa.eu/eli/reg/2016/679/oj">https://eur-lex.europa.eu/eli/reg/2016/679/oj</a></li></ul><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/29/ai-capability-discovery-by-scenario/">The reason nobody uses AI features isn't that they don't know how—it's that they don't know what to ask</a><span class="shared">AI Products</span></li><li><a href="/en/2026/11/26/ai-take-home-should-test-tradeoffs/">AI roles' take-home assignments should test trade-off decisions, not precision</a><span class="shared">AI Products</span></li><li><a href="/en/2026/11/23/badcase-review-meeting-pricing-errors/">Badcase review meeting: price the error first</a><span class="shared">AI Products</span></li><li><a href="/en/2026/11/20/rag-interview-depth-failure-cases/">How deep do RAG interview questions go: memorizing the architecture is less useful than clearly explaining one failure</a><span class="shared">AI Products</span></li><li><a href="/en/2026/11/14/b2c-b2b-agent-product-shape/">Consumers want it to stop asking me, businesses want every step traceable</a><span class="shared">AI Products</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/28/consent-not-just-notice/</id>
    <link href="https://bl8ds.com/en/2026/11/28/consent-not-just-notice/"/>
    <published>2026-11-27T17:34:59.000Z</published>
    <summary>Notification is only a necessary condition for consent. This piece breaks it down into four attributes—specific, voluntary, revocable, and provable—and explains why revocation is hard to do in AI products, as well as what minimum consent records should be kept.</summary>
    <title>A clear privacy policy does not equal valid consent</title>
    <updated>2026-11-27T17:34:59.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Free Quotas" scheme="https://bl8ds.com/en/tags/Free-Quotas/"/>
    <category term="Product" scheme="https://bl8ds.com/en/categories/Product/"/>
    <category term="Risk Control" scheme="https://bl8ds.com/en/tags/Risk-Control/"/>
    <category term="Unit Economics" scheme="https://bl8ds.com/en/tags/Unit-Economics/"/>
    <content>
      <![CDATA[<p>How much free quota to offer—most teams start from the same place: see what competitors give, then give a bit more. When finance asks “which line item does this go under,” the room goes quiet for a few seconds.</p><p>Those few seconds of silence are actually the most valuable part. They show everyone knows this spend doesn’t have a clear acquisition metric like a marketing budget, nor a stable capacity plan like server costs. It hangs in the middle, so no one truly owns it.</p><p>After years of building AI products, the most expensive bills I’ve seen usually aren’t the per-call model price—they’re the free calls no one claims.</p><h2 id="The-free-tier-bill-is-heavy-tailed-averaging-guarantees-you-overspend"><a href="#The-free-tier-bill-is-heavy-tailed-averaging-guarantees-you-overspend" class="headerlink" title="The free-tier bill is heavy-tailed; averaging guarantees you overspend"></a>The free-tier bill is heavy-tailed; averaging guarantees you overspend</h2><p>An AI writing product needs to set its free quota. The common calculation: estimate a few thousand DAU, five uses per person per day, a few cents per generation, multiply out to a few thousand yuan a month, approved.</p><p>The implicit assumption is that usage is roughly normal-distributed. It isn’t. Most people open it three to five times a week, a few run hundreds of calls a day, and some accounts are running scripts from the first minute after registration. The first group brings word of mouth, the last group brings the bill, and the middle group brings retention. Averaging them out means hiding the most dangerous part inside the mean.</p><p>The trouble is the distribution shape also changes. When the product just launched and arbitrageurs haven’t found it yet, usage is unimodal and heavy-tailed; once the free quota’s discount gets posted in some group chat, the distribution becomes bimodal: one peak near normal usage, another peaking at the quota ceiling, with almost nothing in between. The mean barely moves, but P95 has multiplied several times, and the bill follows.</p><p>I prefer to estimate free-tier cost in three segments. Normal usage by real active users, estimated at the median; heavy usage among real users, estimated at P95; arbitrage account usage can’t be estimated, only capped. The magnitudes of the three often differ by more than tenfold, and none can be replaced by the average of the other two.</p><p>The actionable formula: monthly free-tier budget equals target effective users, times per-user P95 usage cost, times an abuse coefficient. The abuse coefficient can’t be guessed—it must be measured during the gray release, using the share of total consumption taken by arbitrage accounts. Before that number exists, stress-test at 1.5 to 3x and see whether the circuit breaker trips frequently. Tripping too often means the quota is too generous; never tripping once means the threshold is set too loosely.</p><h2 id="Free-quota-is-an-asset-that-can-be-arbitraged"><a href="#Free-quota-is-an-asset-that-can-be-arbitraged" class="headerlink" title="Free quota is an asset that can be arbitraged"></a>Free quota is an asset that can be arbitraged</h2><p>As long as the face value of the free quota exceeds the cost of registration, arbitrage will happen. This isn’t a question of black market or not—it’s arithmetic.</p><p>Three paths are most common. Multiple accounts: SMS verification platforms, email aliases, temporary domains—per-account cost from a few cents to a few yuan. Key leakage: users paste their keys into open-source projects, post them in group chats, write them into frontend config files, and these keys get consumed far faster than expected. Invite-rebate self-cannibalization: invites grant quota, and the quota can be used to invite yourself.</p><p>Here’s a directly usable criterion: convert the free quota’s face value into the public price of an equivalent API, then compare it against the cost of the registration threshold you require. If the ratio exceeds ten, arbitrage is essentially certain, and risk control must be designed on the assumption that “it will happen”; below three, the incentive is weak and light rate limiting suffices; in between depends on your category—the more commoditized the competition, the lower the arbitrageurs’ switching cost, and the more you should lean toward the tight side.</p><p>The most expensive part of arbitrage accounts isn’t the inference cost they burn—it’s that they pollute the funnel. Registration conversion, next-day retention, free-to-paid conversion all get dragged down. The team looks at the polluted reports, concludes “free users are low quality,” and cuts the entire free strategy—real users included. I’ve seen this misjudgment more than once, and correcting it costs far more than the risk control itself.</p><p>Before the quota goes live, run through the path below; it answers whether this quota will become an exposure.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[额度方案定稿] --&gt; B{面值超过注册成本十倍}    B --&gt;|是| C[先补身份验证]    B --&gt;|否| D{单次任务成本可被放大}    D --&gt;|是| E[按任务限额并限制输入]    D --&gt;|否| F[按调用量限额即可]    C --&gt; G{是否有共用出口 IP}    E --&gt; G    F --&gt; G    G --&gt;|是| H[按行为分档 不做 IP 封禁]    G --&gt;|否| I[只保留熔断基线]    H --&gt; I</pre></div><h2 id="Whether-it’s-booked-as-COGS-or-marketing-spend-determines-when-you-discover-the-problem"><a href="#Whether-it’s-booked-as-COGS-or-marketing-spend-determines-when-you-discover-the-problem" class="headerlink" title="Whether it’s booked as COGS or marketing spend determines when you discover the problem"></a>Whether it’s booked as COGS or marketing spend determines when you discover the problem</h2><p>Inference cost is cost of goods sold financially—a direct cost incurred with delivery. Where free-tier consumption is booked changes how the team sees it.</p><p>Booked as marketing spend, you see acquisition cost, which sounds like investment and meets little psychological resistance when scaling. Booked as COGS, you see gross margin diluted—ugly numbers, but the problem surfaces earlier. Both bookings make sense; mixing them is the worst: marketing thinks it’s running ads, product thinks it’s a product configuration, finance sees gross margin fluctuating, and all three look at their own reports until gross margin drops a few points one quarter and they start blaming each other.</p><p>My approach is to split by purpose. The portion used for capability demos and invite rewards goes under marketing spend, with acquisition metrics and a per-effective-user cost cap. The long-standing free tier goes under COGS, participates in gross margin accounting, and is evaluated quarterly for whether it’s still worth keeping.</p><p>The direct benefit of splitting is that every yuan in the free tier has a counterparty. The marketing portion must be compared against paid acquisition cost; the product portion against paid conversion. Spend with no counterparty only grows until someone calls a halt.</p><p>There’s also an easily overlooked knock-on effect: when you temporarily raise quota for an acquisition campaign, if you change the quota without updating the circuit-breaker baseline, risk control judges “everything normal” by the old consumption level—and by the time you notice, most of a quarter’s free budget is gone. Quota, risk thresholds, and circuit-breaker baselines must change together; changing any one alone leaves a window.</p><h2 id="After-adding-risk-control-collateral-damage-is-the-second-bill"><a href="#After-adding-risk-control-collateral-damage-is-the-second-bill" class="headerlink" title="After adding risk control, collateral damage is the second bill"></a>After adding risk control, collateral damage is the second bill</h2><p>The first reaction after discovering abuse is to add risk control: device fingerprints, IP rate limiting, behavioral verification. Then the second bill arrives.</p><p>A typical scenario is teams or schools sharing an egress IP. Dozens of people at a company register from the same IP, a bootcamp’s students run assignments from the same lab, a lab’s grad students share one server. Rate-limit by IP and these people get blocked the first time they open the product—and they’re often the best distribution nodes.</p><p>My current default is to tier by behavior, not by identity.</p><table><thead><tr><th>Signal</th><th>Observation cost</th><th>Collateral risk</th><th>Action</th></tr></thead><tbody><tr><td>Single account, short-term high frequency</td><td>Low</td><td>Low; heavy users will hit errors and appeal</td><td>Slow down, don’t ban</td></tr><tr><td>Multiple accounts on same device or IP</td><td>Low</td><td>Medium; shared egress is common</td><td>Only restrict stacked quota</td></tr><tr><td>Perfectly fixed request intervals</td><td>Low</td><td>Low</td><td>Route to manual verification</td></tr><tr><td>Content unrelated to product use</td><td>Medium</td><td>Medium</td><td>Downrank, don’t block</td></tr><tr><td>Invite chain forms a closed loop</td><td>Medium</td><td>Low</td><td>Freeze rebates, not usage</td></tr></tbody></table><p>The principle is rate limiting over banning, freezing rebates over freezing accounts. Bans are irreversible; falsely hit users won’t appeal—they just leave. Rate limiting and quota caps are reversible, with collateral cost an order of magnitude lower.</p><p>Another way to reduce collateral damage is to change the quota’s unit of measure from tokens to tasks. Grant by token and users see a string of numbers—and so do arbitrageurs; grant by “complete twenty full tasks” and you can cap per-task input length, so batch scripts must make multiple rounds of calls to extract value, exposing far more obvious behavioral signatures. This change lowers costs on both sides: users understand “twenty more articles,” not “800,000 tokens left.”</p><h2 id="What-the-free-quota-is-buying-determines-whether-it’s-expensive"><a href="#What-the-free-quota-is-buying-determines-whether-it’s-expensive" class="headerlink" title="What the free quota is buying determines whether it’s expensive"></a>What the free quota is buying determines whether it’s expensive</h2><p>Free quota serves at least three different purposes, and discussing ROI with them mixed together is impossible.</p><p>First, capability demonstration. Users need to complete a full task once to know whether the product is worth it. Here the quota’s goal is “enough to complete a run,” not “enough for a month.” The cost of one complete run may be only a few dozen times less than heavy monthly usage.</p><p>Second, lowering the trial threshold. The quota is the first level of the conversion funnel, measured by the free-to-paid conversion rate and the next-day retention of free users. Giving more quota does not equal better conversion; giving too much makes users unhurried and pushes the decision later.</p><p>Third, earning distribution. Quota as an invitation reward is measured by the cost per effective invitation, against the customer acquisition cost of paid media. This is where things most easily go wrong: the heavier the reward, the stronger the incentive for self-referral, and the registrations from self-referral masquerade as distribution results, causing the team to misjudge this channel as very cost-effective.</p><p>The three uses differ in cost ceiling, risk-control strategy, and metrics. The worst approach is to merge them into one “free tier” package, with no owner, no accounting standard, a look at the total bill once a quarter, and then shock.</p><p>This judgment can be summed up in one sentence: when free quota serves as a marketing budget, it must have a customer acquisition cost standard; when it serves as a product feature, it must have tiering and an upgrade path. Free quota with neither is a default configuration, and a default configuration will only keep rising until someone calls a halt.</p><h2 id="A-quota-design-you-can-implement-directly"><a href="#A-quota-design-you-can-implement-directly" class="headerlink" title="A quota design you can implement directly"></a>A quota design you can implement directly</h2><p>The configuration below turns the judgments above into parameters.</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">free_tier:</span></span><br><span class="line">  <span class="attr">unit:</span> <span class="string">task</span>                 <span class="comment"># 按完成任务计数，不按 token</span></span><br><span class="line">  <span class="attr">grant:</span> <span class="number">30</span>                  <span class="comment"># 注册即得，够跑通三到五个典型任务</span></span><br><span class="line">  <span class="attr">refresh:</span> <span class="string">daily_5</span>           <span class="comment"># 每日刷新少量，防止囤号</span></span><br><span class="line">  <span class="attr">max_input_per_task:</span> <span class="number">4000</span>   <span class="comment"># 单任务输入上限，压制批量长文本</span></span><br><span class="line">  <span class="attr">cost_ceiling:</span></span><br><span class="line">    <span class="attr">per_account_month:</span> <span class="number">2.</span><span class="string">5x</span>  <span class="comment"># 相对单个典型任务成本的倍数</span></span><br><span class="line">    <span class="attr">global_daily:</span> <span class="string">auto</span>       <span class="comment"># 取前七日 P90 消耗动态设定</span></span><br><span class="line">  <span class="attr">abuse_actions:</span></span><br><span class="line">    <span class="attr">high_frequency:</span> <span class="string">throttle</span></span><br><span class="line">    <span class="attr">multi_account:</span> <span class="string">cap_bonus</span></span><br><span class="line">    <span class="attr">invite_loop:</span> <span class="string">freeze_reward</span></span><br><span class="line">  <span class="attr">circuit_breaker:</span></span><br><span class="line">    <span class="attr">trigger:</span> <span class="string">global_daily</span> <span class="string">&gt;</span> <span class="number">1.5</span> <span class="string">*</span> <span class="string">baseline_7d</span></span><br><span class="line">    <span class="attr">action:</span> <span class="string">require_verification</span></span><br></pre></td></tr></table></figure><p>The reasoning behind a few parameters. Quota is given per task rather than per token, because tokens mean nothing to users and everything to arbitrageurs. Refreshing a small amount daily rather than giving it all at once is to let the value of stockpiled accounts decay over time, while real users’ experience is barely affected. A per-task input cap is the cheapest means of preventing bulk long-text abuse, with almost zero implementation cost. A per-account monthly cost cap must exist, because risk control will always miss some, and a hard cap is the last line of defense. The circuit-breaker action is “raise the threshold” rather than “stop service,” because stopping service hurts real users too, while verification only blocks scripts.</p><p>This configuration does not aim to reduce abuse to zero. The goal is to make the marginal cost of arbitrage higher than the gain, while keeping collateral damage within an appealable range. Solutions that pursue zero abuse usually come at the cost of sacrificing a large number of real users, and that bill is more expensive than the abuse itself.</p><h2 id="When-free-quota-is-genuinely-worth-it"><a href="#When-free-quota-is-genuinely-worth-it" class="headerlink" title="When free quota is genuinely worth it"></a>When free quota is genuinely worth it</h2><p>Not every category should tighten its free tier. In several cases, free quota is the cheapest way to acquire customers.</p><p>Marginal cost is low enough. For text generation, with caching and batching done well, the per-run cost can be pressed very low, the absolute spend of the free tier is limited, and the exposure is controllable.</p><p>The product has network effects. Users bring users, and free quota directly buys distribution. Here it should be compared with paid media cost, not server cost; compare against the wrong benchmark and the conclusion will be wrong.</p><p>B2B sales front-loading. The quota plays the role of proof of concept, aimed at letting the buyer complete a run internally. In this case the quota should be generous, while requiring a corporate email or arranging a point of contact to squeeze out the arbitrage space. Being stingy instead slows down closing.</p><p>Conversely, three categories need special care: video generation, ultra-long context, and multi-step agents. What they share is that the consumption of a single task can easily be amplified to dozens of times the average, and the exposure of free quota does not grow linearly. For these products, I prefer a time-limited trial over a quota limit; a time window is easier to control than a quota number, and easier for users to understand.</p><p>There is another category that is easily overlooked: highly commoditized categories. User migration cost is near zero, and the account cost for arbitrageurs is also near zero. In such categories, the actual effect of free quota is to transfer budget to the people least sensitive to price and least loyal to the product.</p><p>If I had to act right now, I would do one thing first: sort the free-tier consumption of the most recent billing cycle by account and see how much the top one percent of accounts consumed. If that number exceeds thirty percent, don’t discuss how much quota to give away yet; plug the tail first. Plug it, then talk about growth. Reverse the order, and growth will amplify the hole along with it.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/26/content-safety-unified-baseline-scenario-thresholds/">Content safety should be unified, but thresholds must vary by scenario</a><span class="shared">Risk Control</span></li><li><a href="/en/2026/11/22/model-error-liability-by-control/">Responsibility for model errors is allocated by degree of control, not by who is weaker</a><span class="shared">Risk Control</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/28/free-tier-cost-tail-abuse/</id>
    <link href="https://bl8ds.com/en/2026/11/28/free-tier-cost-tail-abuse/"/>
    <published>2026-11-27T17:34:22.000Z</published>
    <summary>What basis should the free quota actually be set on? Once usage distribution, arbitrage costs, and risk-control false positives are all factored in, it becomes clear that the real cost was never in the average but in those few accounts in the tail.</summary>
    <title>The cost of free quota depends on the tail, not the average</title>
    <updated>2026-11-27T17:34:22.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Annotation Consistency" scheme="https://bl8ds.com/en/tags/Annotation-Consistency/"/>
    <category term="Evaluation Sets" scheme="https://bl8ds.com/en/tags/Evaluation-Sets/"/>
    <category term="Model Evaluation" scheme="https://bl8ds.com/en/tags/Model-Evaluation/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A team is preparing to expand its evaluation set from 200 items to 2,000. Before expanding, they ran a double-annotation spot check: on the 200 items, the two annotators’ raw agreement was 85%, and Cohen’s kappa came out to 0.6. In the meeting someone asked: is this set still usable, or do we need to throw it out and re-annotate from scratch?</p><p>That question is backwards. 0.6 by itself is not a verdict; it is just a coordinate that tells you what the disagreement looks like, where it is, and whether it can be eliminated by tightening the guidelines. The real questions are: under what distribution was this 0.6 computed, where is the disagreement concentrated, and what decision are your evaluation conclusions supposed to support?</p><h2 id="First-confirm-which-0-6-this-is"><a href="#First-confirm-which-0-6-this-is" class="headerlink" title="First confirm which 0.6 this is"></a>First confirm which 0.6 this is</h2><p>There are at least three ways to compute agreement, and the reported numbers can differ by several times.</p><p>Raw agreement is the simplest: the number of items both annotators labeled the same, divided by the total number of items. Its flaw is that it doesn’t discount chance. Two people who close their eyes and label everything “pass” will still get 90% agreement on a set with a 90% pass rate.</p><p>Cohen’s kappa discounts that: kappa &#x3D; (Po - Pe) &#x2F; (1 - Pe), where Pe is the expected agreement when both annotators label randomly according to their own marginal distributions. For three or more annotators, missing values, or ordinal labels (say, a 1-to-5 usefulness score), Fleiss’ kappa or Krippendorff’s alpha is more appropriate; alpha handles missing data and any measurement scale.</p><p>The key is the Pe term. The more skewed the label distribution, the larger Pe, the smaller the denominator, and the more kappa gets pushed down—this is the well-known kappa paradox. Here’s an example you can verify yourself: 100 items, annotator A marks 92 as pass, annotator B marks 89 as pass, 83 are marked pass by both, 2 are marked fail by both, and 15 disagree. Raw agreement is 85%, Pe is about 0.83, and kappa is only 0.13.</p><p>So when you hear “agreement is 0.6,” the first follow-up must be: which metric, and how skewed is the class distribution? On a set with a 90% pass rate, kappa 0.6 translates back to roughly 93% raw agreement; on a 50&#x2F;50 balanced set, kappa 0.6 corresponds to exactly 80% raw agreement. These two 0.6s represent work quality an order of magnitude apart.</p><table><thead><tr><th>Metric</th><th>Discounts chance?</th><th>When to use</th><th>Behavior under skewed distributions</th></tr></thead><tbody><tr><td>Raw agreement</td><td>No</td><td>Quick health check</td><td>Inflated; almost always looks good when the pass rate is high</td></tr><tr><td>Cohen’s kappa</td><td>Yes</td><td>Two annotators, unordered labels</td><td>Pushed down by Pe; severely distorted when skewed</td></tr><tr><td>Krippendorff’s alpha</td><td>Yes</td><td>Multiple annotators, missing data, ordinal</td><td>Also affected, but more comparable across studies</td></tr></tbody></table><p>I prefer to report both numbers: raw agreement and alpha (or kappa). The former tells you how many items are actually misaligned; the latter tells you how much is left after discounting chance. Looking at only one will mislead you.</p><h2 id="The-0-6-threshold-is-a-rule-of-thumb-not-a-standard"><a href="#The-0-6-threshold-is-a-rule-of-thumb-not-a-standard" class="headerlink" title="The 0.6 threshold is a rule of thumb, not a standard"></a>The 0.6 threshold is a rule of thumb, not a standard</h2><p>0.61 to 0.80 counts as “substantial agreement,” a line that comes from Landis and Koch’s 1977 paper on observer agreement. Its context was behavioral science and clinical rating; the bands were drawn empirically, not derived backward from task risk. It has been cited for nearly fifty years, and many people have mistaken it for a universal standard. That is a misreading.</p><p>What actually determines the threshold is the task type.</p><p>On objectively decidable matters, 0.6 is a clear anomaly. Whether a model’s output is valid JSON, whether a cited link actually exists, whether the retrieved passage contains the answer—disagreement on these should only come from an annotator missing something, not from “different interpretations.” On such tasks, if agreement is below 0.85, my first reaction is that the annotation process has a hole, not that the task itself is ambiguous.</p><p>On subjective dimensions, 0.6 is very common. “Is this response helpful,” “does this content count as harmful”—in public datasets, alpha falling in the 0.4 to 0.6 range is not rare, because annotators’ judgment criteria differ systematically to begin with. Chasing 0.8 on such tasks usually results in extremely long guidelines, after which annotators start mechanically matching keywords: agreement goes up, and the information content of the labels goes down.</p><p>There’s one more thing that’s easy to overlook: confidence intervals. A kappa computed on 200 samples has a 95% confidence interval on the order of plus or minus 0.1. That is, 0.6 and 0.7 are statistically indistinguishable at this sample size. Taking a number whose interval width is close to your own decision threshold into a meeting to decide life or death is itself a mistake.</p><h2 id="The-total-score-carries-no-information-the-distribution-does"><a href="#The-total-score-carries-no-information-the-distribution-does" class="headerlink" title="The total score carries no information; the distribution does"></a>The total score carries no information; the distribution does</h2><p>A single global agreement number is what you get after averaging away all the disagreement. And disagreement is never uniformly distributed.</p><p>I usually ask to see three things: agreement broken down by label, agreement broken down by source, and the confusion matrix between the two annotators.</p><p>Breaking down by label shows which label is dragging agreement down. A common case: 0.6 across the whole set, but agreement between the two big categories “pass” and “fail” is 0.9, and the problem is entirely concentrated in the 15% middle band of “partially pass.” That middle band should either be split into more specific sub-labels or simply not used in evaluation.</p><p>The confusion matrix shows direction. The same amount of disagreement can be two different diseases: one-sided and symmetric. One-sided means 80% of the disagreements are “A says pass, B says fail,” indicating one side’s standard is systematically looser and a single sentence in the guidelines can pull it back. Symmetric means the disagreements are evenly spread in both directions, indicating these samples have no consensus answer to begin with; changing the guidelines won’t save it—you can only change the label scheme or drop that slice.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[一致性低于预期] --&gt; B{分片看分歧}    B --&gt;|集中在某个标签| C[拆标签或弃用该档]    B --&gt;|集中在某个来源| D[查该来源的采样偏差]    B --&gt;|均匀散布| E{看混淆矩阵方向}    E --&gt;|一边倒| F[补判定顺序和边界例]    E --&gt;|对称| G[样本本身有歧义]    G --&gt; H[加裁决或缩小适用范围]    F --&gt; I[重标少量样本验证]    C --&gt; I    D --&gt; I</pre></div><p>Breaking down by source has a side benefit: it can expose sampling bias. If a batch of samples in the evaluation set comes from a particular channel, and that channel’s corpus has a distinctive style, annotators’ judgments of it will deviate systematically. This kind of bias is invisible in the global number, but it will cause the model’s performance on this slice to be overestimated or underestimated.</p><h2 id="Label-noise-eats-resolution-proportionally"><a href="#Label-noise-eats-resolution-proportionally" class="headerlink" title="Label noise eats resolution proportionally"></a>Label noise eats resolution proportionally</h2><p>The direct consequence of poor agreement is not “dirty data”—it’s that “the evaluation set can’t detect differences.”</p><p>Suppose the probability of a label being flipped is e, and the flips are symmetric in direction. For a true difference Δ between two groups, the observed difference is Δ(1-2e). The formula is plain, but the magnitudes it implies are worth remembering.</p><p>At 80% raw agreement, under the symmetric-error assumption, the one-sided flip rate is about 11% (solving 0.2 ≈ 2e(1-e)). Plugging into the formula above, the observed difference is discounted to 0.78 of its true value. To maintain the same statistical power, the sample size must be multiplied by 1&#x2F;0.78², about 1.7 times.</p><p>If the flip rate reaches 20%, the discount factor becomes 0.6, and the sample size must be multiplied by 2.8. A 2,000-item evaluation set under 20% label noise is equivalent to 700 clean items. You think you expanded tenfold; in fact you expanded only three and a half times.</p><p>This doesn’t even count directional bias. Symmetric noise only makes you imprecise; one-sided noise biases your evaluation conclusions systematically toward one side. For example, if annotators are generally lenient on the dimension “does the answer cite information that doesn’t exist,” a model can pass just by sounding smooth, and then the higher the score it racks up on this evaluation set, the greater the probability it will fail after deployment.</p><p>Scaling up amplifies this process. At 200 items, a 15% adjudication rate means 30 items need discussion; scale to 2,000 and that becomes 300 items—and those 300 were labeled without an alignment meeting or on-the-spot discussion, so spec gaps get copied verbatim ten times over. By the time you want to go back and fix things, you’re facing not just relabeling costs but the question of whether to overturn model selection decisions already made based on this batch of labels.</p><h2 id="Fix-the-spec-first-and-make-the-actions-concrete"><a href="#Fix-the-spec-first-and-make-the-actions-concrete" class="headerlink" title="Fix the spec first, and make the actions concrete"></a>Fix the spec first, and make the actions concrete</h2><p>“Fix the spec” easily becomes an empty phrase. At the executable level, I typically change these things.</p><p>Split compound labels. One label should ask only one thing. A formulation like “is the answer accurate and complete” will leave two annotators arguing forever over “accurate but incomplete.” Split it into two independent judgments—“are there factual errors” and “is any key information missing”—and agreement usually improves immediately.</p><p>Define decision order. When multiple labels have dependencies, you must judge upstream before downstream. A typical order: first judge whether the question itself is answerable, then whether the answer has factual errors, and finally expression quality. Without a consistent order, two annotators reach different conclusions at different levels, and the disagreement looks random.</p><p>Keep an “unable to judge” option. Forcing a binary choice shoves boundary samples into one category and creates false disagreement. Give it an outlet, then watch the proportion: above 10% means the spec doesn’t cover enough; below 2% means annotators are guessing.</p><p>Pair every rule with boundary counterexamples. Saying “what counts as acceptable” isn’t enough—you need to write “what doesn’t.” Each rule needs at least three counterexamples, especially cases that look like they qualify but don’t.</p><p>Change the double-labeling process. Full double-labeling is too expensive; the usual approach is to independently label 50 items first, hold an alignment meeting, discuss each disagreement into a rule, then label the rest separately. Agreement after the alignment meeting is what’s meaningful, because it measures whether the spec can be reproduced, not how far apart two people’s improvised standards are.</p><p>Spec entries themselves can be written in structured form for version management and training:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">rule_id:</span> <span class="string">R-014</span></span><br><span class="line"><span class="attr">dimension:</span> <span class="string">factual_error</span></span><br><span class="line"><span class="attr">question:</span> <span class="string">回答中的事实陈述是否有可验证的错误</span></span><br><span class="line"><span class="attr">decision_order:</span> <span class="number">1</span></span><br><span class="line"><span class="attr">pass_when:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">所有事实陈述都能在检索到的文档中找到支持</span></span><br><span class="line"><span class="attr">fail_when:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">任一事实陈述与文档矛盾</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">回答引入了文档中不存在且无法从常识推出的具体数字或名称</span></span><br><span class="line"><span class="attr">unknown_when:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">文档本身未覆盖该事实且无法外部验证</span></span><br><span class="line"><span class="attr">boundary_examples:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">text:</span> <span class="string">回答把文档中的“约三成”写成“30.2%”</span></span><br><span class="line">    <span class="attr">label:</span> <span class="string">fail</span></span><br><span class="line">    <span class="attr">reason:</span> <span class="string">精度被凭空抬高</span></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">text:</span> <span class="string">回答省略了文档中的限定条件但结论方向一致</span></span><br><span class="line">    <span class="attr">label:</span> <span class="string">pass</span></span><br><span class="line">    <span class="attr">reason:</span> <span class="string">省略归完整性维度，不在本维度扣分</span></span><br><span class="line"><span class="attr">version:</span> <span class="number">3</span></span><br></pre></td></tr></table></figure><p>The most important parts of this structure are decision_order and boundary_examples. The former eliminates level-based disagreement; the latter eliminates back-and-forth over “does this count.” The version number is for traceability: months later, when someone questions a label, you can look up which version of the spec applied at the time.</p><h2 id="When-0-6-can-be-used-as-is"><a href="#When-0-6-can-be-used-as-is" class="headerlink" title="When 0.6 can be used as-is"></a>When 0.6 can be used as-is</h2><p>Not every low-agreement case requires stopping. There are three situations where I’d push forward.</p><p>Disagreement is concentrated in slices you don’t make decisions on anyway. For example, if 15% of the eval set is extremely long multi-turn conversations and the product doesn’t support that scenario at all, poor agreement in that slice doesn’t affect conclusions.</p><p>Decision granularity is inherently coarse. If your judgment only needs to distinguish “clearly unusable” from “usable,” with everything in between going to human review, then low agreement in the middle tier isn’t an obstacle. What you should do is flag the middle tier, not fix it.</p><p>The eval is only for internal ranking, with no external commitments. If two models differ by 5 points, even discounted by 30% that’s still 3.5 points—the ranking conclusion doesn’t change. But if that difference goes into a customer SLA or serves as a billing basis, 0.6 isn’t enough, because what you need is reproducible absolute judgment.</p><p>Conversely, there’s one hard boundary: whenever eval results determine “ship or don’t ship,” label noise directly becomes release risk. The annotation rework cost you save will come back doubled in production incidents.</p><p>The purpose of an agreement number is to locate, not to judge. 0.6 tells you “15% to 20% of samples here have no consensus.” The next step is to find that slice, characterize it, and decide whether to fix the spec, split labels, or discard—not to start labeling 2,000 items.</p><p>Next time someone comes to you with an agreement number, ask three questions first: which metric computed it, what it looks like after slicing, and whether the sample size supports that precision. If all three can’t be answered, the number isn’t enough to support any decision.</p><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li>Landis, J. R. &amp; Koch, G. G. (1977). The Measurement of Observer Agreement for Categorical Data. Biometrics, 33(1), 159-174. <a href="https://doi.org/10.2307/2529310">https://doi.org/10.2307/2529310</a></li><li>The implementation and documentation of cohen_kappa_score in scikit-learn (can be used to recompute the examples above): <a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.cohen_kappa_score.html">https://scikit-learn.org/stable/modules/generated/sklearn.metrics.cohen_kappa_score.html</a></li></ul><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/21/completion-vs-code-review-evaluation/">Completion depends on the acceptance rate; review depends on the miss rate</a><span class="shared">Model Evaluation</span></li><li><a href="/en/2026/11/18/random-negatives-inflate-rerank-metrics/">Random negatives inflate reranking metrics; only hard negatives reveal true discriminative power</a><span class="shared">Evaluation Sets</span></li><li><a href="/en/2026/06/05/deepseek-v4-intel-roundup-sealion-lite-dualpath-and-million-context/">The price of a million-token context is hidden in the paper's appendix</a><span class="shared">Model Evaluation</span></li><li><a href="/en/2025/03/08/regression-test-triggers/">Regression testing shouldn't be scheduled weekly; it should be scheduled by change source</a><span class="shared">Evaluation Sets</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/28/annotator-agreement-06-fix-guidelines-before-scaling/</id>
    <link href="https://bl8ds.com/en/2026/11/28/annotator-agreement-06-fix-guidelines-before-scaling/"/>
    <published>2026-11-27T17:33:34.000Z</published>
    <summary>A consistency of 0.6 is often taken as a sign that the evaluation set is unusable, but it more likely points to a specification gap. First distinguish the metric, the shard, and the confidence interval, then decide whether to expand the sample size.</summary>
    <title>Consistency 0.6, don't scale up yet—the root cause is the annotation guidelines</title>
    <updated>2026-11-27T17:33:34.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="AI Search" scheme="https://bl8ds.com/en/tags/AI-Search/"/>
    <category term="GEO" scheme="https://bl8ds.com/en/tags/GEO/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <category term="robots.txt" scheme="https://bl8ds.com/en/tags/robots-txt/"/>
    <content>
      <![CDATA[<p>“GPTBot is allowed, so why can’t I find our brand terms in ChatGPT?”</p><p>This question has come up more than once on the content team, and whoever asks it assumes a causal chain: allowing an AI crawler in robots.txt equals being AI-friendly, which equals being findable by AI. The chain breaks at the first link. Allowing GPTBot means exactly one thing: you permit your pages to be crawled into the training corpus for foundation models. It has no causal relationship with “whether your pages will be retrieved and cited by AI search”—that’s a different set of crawlers and a different set of rules.</p><h2 id="robots-txt-isn’t-one-rule-it’s-a-set-of-rules-split-by-UA"><a href="#robots-txt-isn’t-one-rule-it’s-a-set-of-rules-split-by-UA" class="headerlink" title="robots.txt isn’t one rule; it’s a set of rules split by UA"></a>robots.txt isn’t one rule; it’s a set of rules split by UA</h2><p>The file format is plain: each User-agent starts a section, followed by a list of Allow &#x2F; Disallow paths. Before crawling, a bot fetches this file, finds the section that best matches its UA, and executes only that section; anything not named falls through to <code>*</code>. So it has always been a table of “who sees what”—it’s just that for the past decade or so most sites only filled in two lines: Googlebot and <code>*</code>.</p><p>What AI vendors have done in recent years is essentially split one crawler into several, so site owners can authorize by intent. OpenAI’s public crawlers fall into three categories by purpose: one that crawls training corpora for foundation models, one that maintains the ChatGPT search index, and one that fetches pages in real time when a user asks a question. Anthropic and Perplexity have made similar splits. Google separates search crawling from Gemini training authorization—turning off the latter doesn’t affect your ranking in search results.</p><p>I won’t copy the UA names verbatim here; vendors are still changing them, and anything hardcoded in an article goes stale fast—refer to the official docs (links at the end). What matters is the structure: training, retrieval, and user-triggered are three switches, not one.</p><p>So the statement “GPTBot is allowed” carries about as much information as “I agree to my content entering the training set.” It contains no promise about search visibility and solves no citation problem.</p><h2 id="Three-intents-with-completely-different-costs-and-reversibility"><a href="#Three-intents-with-completely-different-costs-and-reversibility" class="headerlink" title="Three intents, with completely different costs and reversibility"></a>Three intents, with completely different costs and reversibility</h2><table><thead><tr><th></th><th>Training crawl</th><th>Retrieval index</th><th>User-triggered crawl</th></tr></thead><tbody><tr><td>Trigger</td><td>Batch, periodic</td><td>Continuous incremental</td><td>The user’s current question</td></tr><tr><td>Scope per crawl</td><td>Large, often the whole site</td><td>Medium, follows content updates</td><td>Single page</td></tr><tr><td>Can it be revoked later</td><td>No</td><td>Yes, with lag</td><td>Not applicable</td></tr><tr><td>Direct value to you</td><td>Delayed, hard to attribute</td><td>Cited, traffic can flow back</td><td>You’re in this answer</td></tr><tr><td>Who mainly bears the consequences</td><td>The content owner</td><td>The content owner benefits</td><td>The user asking</td></tr></tbody></table><p>The most expensive thing about the training column is irreversibility. Once a page enters the corpus and the weights, changing robots.txt won’t take it back. The value is delayed and nearly impossible to attribute: you can’t prove “the model answered well this time because it read my article.” That’s fatal in budget meetings, because unattributeable returns are always the first thing cut when budgets shrink.</p><p>The retrieval column is the opposite. Its value shows up fast—at minimum you can observe click-through traffic returning—and after you change the rules, old snapshots linger for a while, but the direction is recoverable. So this column should be managed as an operational action, not a one-time legal decision.</p><p>The user-triggered column is the easiest to overlook. It’s closer to an ordinary visit: a user asks something, and the crawler fetches the relevant page. Blocking it is telling the other side “you may cite me, but when you actually come to fetch it, I won’t give it to you”—and the usual result is that you’re absent from the answer.</p><p>One criterion: if a robots.txt rule can’t say which intent it governs, it’s probably governing the wrong thing.</p><h2 id="The-two-most-common-mismatches"><a href="#The-two-most-common-mismatches" class="headerlink" title="The two most common mismatches"></a>The two most common mismatches</h2><p>The first: wanting to be cited by AI but only adjusting the training switch. After editing the file and seeing the training crawler stop coming, you assume “the AI side is configured.” In reality, nobody checks whether the retrieval-index crawler should come or whether it has. In more extreme cases, to prevent scraping, <code>*</code> gets written as Disallow: &#x2F;, and retrieval crawlers get shut out too—the site’s presence in AI search drops straight to zero. This zeroing is silent: it doesn’t appear in any report, only as a vague feeling that “nobody seems to mention our brand terms lately.”</p><p>The second: not wanting content used for free, so every UA with “AI” in it gets blocked wholesale—including retrieval UAs. The loss doesn’t show up immediately, because AI-referred traffic is already scattered and poorly tagged in analytics tools; lose half of it and the curve doesn’t visibly change. By the time you notice competitors are repeatedly mentioned in AI answers and you never are, a quarter has usually passed.</p><p>There’s a subtler layer: blocking the training crawler and assuming the training path is sealed. Not necessarily. Training corpora don’t come only from first-party crawling—public corpora are a common link in the chain; what crawls your pages is the corpus’s collector, not the model vendor’s crawler. And once a corpus dump is downloaded, how downstream users use it is no longer constrained by robots.txt. So the accurate statement is: robots.txt only constrains the part that is “willing to comply and crawls directly from your domain.” That sounds deflating, but it’s the real starting point for your decision.</p><h2 id="Set-the-goal-first-then-pick-UAs-then-write-rules"><a href="#Set-the-goal-first-then-pick-UAs-then-write-rules" class="headerlink" title="Set the goal first, then pick UAs, then write rules"></a>Set the goal first, then pick UAs, then write rules</h2><p>The order can’t be reversed. People who write rules first usually end up maintaining a UA list they can’t explain themselves.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[想控制 AI 抓取] --&gt; B{目标是哪个}    B --&gt;|被引用| C[放行检索型 UA]    B --&gt;|不被训练| D[屏蔽训练型 UA]    B --&gt;|两个都要| E[两套规则分开写]    C --&gt; F[内容做成可抽取]    D --&gt; G[接受语料库绕行]    E --&gt; F    E --&gt; G    F --&gt; H[按季度复查清单]    G --&gt; H</pre></div><p>On the file, it roughly looks like:</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"># 训练：不放行</span><br><span class="line">User-agent: GPTBot</span><br><span class="line">Disallow: /</span><br><span class="line"></span><br><span class="line"># 搜索索引：放行</span><br><span class="line">User-agent: OAI-SearchBot</span><br><span class="line">Allow: /</span><br><span class="line"></span><br><span class="line"># 用户触发：放行</span><br><span class="line">User-agent: ChatGPT-User</span><br><span class="line">Allow: /</span><br><span class="line"></span><br><span class="line"># 其余未点名的爬虫，单独决定</span><br><span class="line">User-agent: *</span><br><span class="line">Disallow: /admin/</span><br></pre></td></tr></table></figure><p>One detail worth spelling out: a named crawler only reads its own section; what’s written in the <code>*</code> section doesn’t affect it—the two sections don’t stack. Don’t expect to write Disallow in <code>*</code> and have a specific section’s Allow “override” it, or vice versa. <code>*</code> only catches those not named, so it’s actually the broadest-reaching and most easily forgotten line in the whole file.</p><p>The second detail is maintenance cost. UA lists rot: vendors add crawlers, rename them, split off another one for a new product line. A robots.txt nobody owns is basically a random number two years later. Either assign an owner or set a quarterly review calendar event—pick one, don’t skip both.</p><p>While we’re at it, let’s be clear about the boundary: robots.txt is, at the spec level, a voluntary protocol; UA strings can be forged; it is not a lock. To actually block requests, you need to do it at the IP layer, the WAF (Web Application Firewall) layer, or by validating against vendor-published IP ranges—CDN vendors have also been rolling out default policies by crawler category and per-request billing in recent years. But for most content sites, I wouldn’t recommend investing there as step one. Do two calculations first: the loss from content being trained on is fuzzy, delayed, and unattributeable; the opportunity cost of being missed by AI search is also fuzzy, but at least attribution is possible. When both sides are fuzzy, people tend to pick the side that looks safest—block everything. The real problem with that choice isn’t that it’s conservative; it’s that it trades a measurable loss for an unmeasurable one.</p><h2 id="GEO-governs-the-retrieval-layer"><a href="#GEO-governs-the-retrieval-layer" class="headerlink" title="GEO governs the retrieval layer"></a>GEO governs the retrieval layer</h2><p>GEO (generative engine optimization) is often understood as “getting the model to remember me.” That’s a training-layer way of thinking—you can neither control nor verify it. What you can actually control is the retrieval and citation stage: which pages AI search pulls when answering a question, what it extracts, and how it labels sources when citing. The levers at this stage are allowing retrieval-type UAs, the extractability of facts on the page (entity names, numbers, dates, conclusions that fit in one sentence), and the return path after you’ve been cited.</p><p>Agentrace works on this stage (<a href="https://geo.moreyin.cn/">https://geo.moreyin.cn</a>). It is a separate matter from allowing training crawlers in robots.txt, and the two should not substitute for each other: one is about whether content can be retrieved and cited accurately during retrieval and citation, the other is a one-off corpus authorization decision. Conflating the two most often ends with neither done well—and the belief that you’ve already completed a round of “AI optimization.”</p><h2 id="Four-things-I’d-do-first"><a href="#Four-things-I’d-do-first" class="headerlink" title="Four things I’d do first"></a>Four things I’d do first</h2><p>Write the goal in two sentences: do you want to be cited by AI search, and do you want to be trained on. If you want both, that’s two sets of rules—don’t expect one rule to cover both.</p><p>Add a comment line to each UA block in robots.txt stating which intent it governs. Delete any block you can’t explain—it’s probably legacy.</p><p>Tag AI-referred traffic separately, even if only at the domain level. Without this, every later judgment is guesswork.</p><p>Set a review cadence. Crawler lists are alive, rules are static, and mismatches are the norm.</p><p>Blocking is the default action because it needs no justification. Allowing needs a reason, so it’s worth thinking through first: do you actually want AI to say your name, or do you just not want it reading your content without notice? These two questions have different answers, and different answers mean different actions.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/schema-overload-citation-trust/">The fuller the schema is marked, the harder it is for the referencing party to trust it</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/30/troubleshooting-docs-get-cited-most/">The most frequently cited section in product docs is the troubleshooting part; almost no one excerpts the feature introductions</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/29/ai-crawler-404-fix-entry-before-blocking/">AI crawlers are hitting more 404s; fix the entry points before discussing bans</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/27/llms-txt-link-annotations/">llms.txt only contains links, so the agent can only guess</a><span class="shared">GEO</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/28/robots-txt-gptbot-training-not-retrieval/</id>
    <link href="https://bl8ds.com/en/2026/11/28/robots-txt-gptbot-training-not-retrieval/"/>
    <published>2026-11-27T17:32:30.000Z</published>
    <summary>In robots.txt, training, retrieval, and user-triggered are three separate switches. Merging them into one rule causes two kinds of loss: &quot;allowed but unsearchable&quot; and &quot;blocked but silently losing traffic.&quot; This article gives the order of separation and the criteria.</summary>
    <title>Allowing GPTBot is training authorization, not search visibility</title>
    <updated>2026-11-27T17:32:30.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Agents" scheme="https://bl8ds.com/en/tags/Agents/"/>
    <category term="Failure Handling" scheme="https://bl8ds.com/en/tags/Failure-Handling/"/>
    <category term="Launch Acceptance" scheme="https://bl8ds.com/en/tags/Launch-Acceptance/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>An agent demo review has a fixed shape: first a page of architecture diagrams, then a sentence typed live that was prepared in advance, the model plans three steps, the tools return success in sequence, and finally a nicely formatted conclusion pops up. Everyone in the meeting room nods, and the project enters scheduling.</p><p>Once the same thing is connected to real traffic, the most common feedback is “sometimes it doesn’t do it” and “it does half of it.” The model hasn’t changed, the prompt hasn’t changed—only the environment it faces has.</p><p>The demo environment actually shields the product from three things: noise, adversarial input, and partial failure. None of these three ever appear in a demo, so what a demo measures is not the agent’s capability ceiling, but how well it fits a clean world.</p><table><thead><tr><th>Dimension</th><th>Demo environment</th><th>Production environment</th></tr></thead><tbody><tr><td>Input</td><td>Chosen by the developer, all fields present</td><td>Colloquial, missing parameters, multiple intents mixed in one sentence</td></tr><tr><td>Tools</td><td>Just integrated, same subnet, low latency</td><td>Timeouts, empty results, rate limiting, insufficient permissions</td></tr><tr><td>Intent</td><td>Single, benign</td><td>Mixed, some probing boundaries</td></tr><tr><td>Steps</td><td>3 to 5 steps</td><td>More than 10 steps, including clarification and retries</td></tr><tr><td>Failure handling</td><td>Fixed on the spot, kept out of the demo</td><td>Requires retry, degradation, or handoff to a human</td></tr></tbody></table><h2 id="Every-step-in-the-demo-returns-200"><a href="#Every-step-in-the-demo-returns-200" class="headerlink" title="Every step in the demo returns 200"></a>Every step in the demo returns 200</h2><p>Demo scripts are usually prepared by the people who wrote the code. The inputs are hand-picked, the tools were just integrated, and the network is in the same office. In this environment, tool calls have only two outcomes: success, and failure (failures get fixed on the spot, then the demo is run again).</p><p>In the real environment, tools return a whole spectrum. Timeouts, empty results, missing fields, insufficient permissions, rate limiting, returning 200 but with semantically wrong content—for example, a search returns 20 results and none of them are relevant. Pull the production failure logs by type and look: 5xx is often just the small head; the bulk is timeouts and empty results. These two categories never surface in a demo, because they don’t look like bugs—they look more like “didn’t find it this time.”</p><p>The agent’s default reaction to these inputs is usually to keep going. It won’t stop just because a field is missing; it fills in a plausible-looking value. In a demo this is called fluency; in production this is called fabrication.</p><p>This difference changes a team’s judgment. A smooth demo means the model can plan on this task; a stuck demo means the tool interface has a problem. But a smooth demo does not imply smooth production, because in between sits a layer nobody has tested: what it does when the tools don’t cooperate.</p><h2 id="95-per-step-is-not-95"><a href="#95-per-step-is-not-95" class="headerlink" title="95% per step is not 95%"></a>95% per step is not 95%</h2><p>An agent task split into 10 steps, with 95% success per step, has an end-to-end success rate of 0.95 to the 10th power, about 60%. At 90% per step, the same 10 steps leave only 35%. A demo usually runs only 3 to 5 steps, and every step is the path that was picked because it works.</p><p>This multiplicative relationship is the most easily overlooked piece of arithmetic in shipping an agent. A two-point gain in per-step accuracy sounds like “the model got upgraded” in a meeting; end-to-end success going from 60% to 66% still sounds like “unstable” on the business side. The two numbers describe the same thing, but they lead to opposite decisions.</p><p>Real tasks also have more steps than demos. The extra part is clarification, validation, retries. Every extra step consumes both success rate and latency budget, and latency in turn affects success rate: the user gets impatient, closes the page midway, and the task counts as failed.</p><p>So when evaluating an agent, I only accept end-to-end task success rate. And I require stating how many steps, how many retries allowed, and what time budget produced that number. Without these three preconditions, success rates can’t be compared across versions, nor against demo numbers.</p><h2 id="Demo-samples-are-picked-production-samples-grow"><a href="#Demo-samples-are-picked-production-samples-grow" class="headerlink" title="Demo samples are picked; production samples grow"></a>Demo samples are picked; production samples grow</h2><p>The refund requirement makes the gap very clear.</p><p>In the demo, the input is “help me refund that order from last week,” the order number is in context, account information is complete, and the user is already logged in. The agent looks up the order, checks whether it has shipped, calls the refund API—three steps done.</p><p>In production the user says “don’t want this anymore, just refund it.” That one sentence hides at least four judgments: which order, whether it has shipped, whether it’s past the refund deadline, and which account the money goes back to. If any of the four lacks information, the correct behavior is to ask, not to guess. And the demo script has never tested the asking path, because asking looks like failing to get things done in a demo.</p><p>The shape of real traffic input is far from the internal eval set. A user’s sentence is often only eight to twelve characters, dropping the subject and object, carrying typos and emotion. This isn’t dirty data—this is the data itself.</p><p>There’s a low-cost check: have someone not involved in developing this agent pull a few real conversations straight from the work chat, unprocessed, and throw them in. The input shapes that show up in the first five minutes are usually closer to production than the internal eval set. This process needs no labeling and no scoring—just record “where it gets stuck, and what it does after getting stuck.”</p><h2 id="How-partial-failure-is-handled-determines-the-product-shape"><a href="#How-partial-failure-is-handled-determines-the-product-shape" class="headerlink" title="How partial failure is handled determines the product shape"></a>How partial failure is handled determines the product shape</h2><p>The demo has no layer between success and failure. In a usable system, that layer is the norm. Where the agent goes after a tool timeout determines not only the success rate, but also what this product is in the user’s mind.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[Agent 发起工具调用] --&gt; B{工具返回什么}    B --&gt;|正常结果| C[进入下一步]    B --&gt;|超时或空结果| D{动作能否撤回}    B --&gt;|权限不足| F[停下并请人确认]    D --&gt;|能撤回| E[限次重试]    D --&gt;|不能撤回| F[停下并请人确认]</pre></div><p>Automatic retry is only safe for read-only, idempotent calls. Looking up orders, checking logistics, searching the knowledge base—retrying twice costs little. Write operations are different: placing orders, issuing coupons, changing addresses—a retry may become a duplicate execution. To do retries you must first have an idempotency key, so the server recognizes this as the same request, not a new one.</p><p>A degraded response must state clearly what’s missing. “Based on your last three orders” and “based on your orders” are understood completely differently by users. The first is an acceptable degradation; the second disguises an incomplete answer as a complete one, and the user will find the mismatch elsewhere.</p><p>Handoff to a human needs a channel. “Suggest contacting customer service” without a human entry point equals failure. You also need to state the expected wait: a few minutes until someone picks up, or a few hours. If you can’t say it, the user will try again themselves, pumping duplicate requests into the system.</p><p>There’s a criterion here more reliable than model confidence: whether this action can be undone. What can be undone can be done first and reported after; what can’t must be confirmed first. Confidence is a number the model reports about itself; reversibility is a system fact. The two should not be mixed.</p><p>The time budget also needs to be split before calling tools, rather than taking the default for each tool. In customer-service scenarios, what users tolerate is usually on the order of seconds, not tens of seconds. Give 8 seconds end to end, and the budget for five tool calls must be allocated up front; if each defaults to a 30-second timeout, the first timeout eats the entire budget.</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">tool_policy:</span></span><br><span class="line">  <span class="attr">read:</span></span><br><span class="line">    <span class="attr">timeout_ms:</span> <span class="number">3000</span></span><br><span class="line">    <span class="attr">max_retries:</span> <span class="number">2</span></span><br><span class="line">  <span class="attr">write:</span></span><br><span class="line">    <span class="attr">timeout_ms:</span> <span class="number">5000</span></span><br><span class="line">    <span class="attr">max_retries:</span> <span class="number">0</span></span><br><span class="line">    <span class="attr">require_confirm:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">task_budget:</span></span><br><span class="line">  <span class="attr">end_to_end_ms:</span> <span class="number">8000</span></span><br><span class="line">  <span class="attr">on_budget_exceeded:</span> <span class="string">degrade_and_report</span></span><br></pre></td></tr></table></figure><h2 id="The-most-expensive-agent-is-the-one-that-can’t-answer-“what-other-failures-are-there”"><a href="#The-most-expensive-agent-is-the-one-that-can’t-answer-“what-other-failures-are-there”" class="headerlink" title="The most expensive agent is the one that can’t answer “what other failures are there”"></a>The most expensive agent is the one that can’t answer “what other failures are there”</h2><p>One class of error invisible in demos is the agent saying it’s done while the system has no corresponding record. The user finds out two days later that the order wasn’t refunded, the ticket wasn’t created, the calendar wasn’t scheduled. This class of error is more expensive than a wrong answer, because what it consumes is trust, and trust has no retry mechanism.</p><p>The criterion is one sentence: for actions with side effects, the server receipt is authoritative, not the model’s self-report. The receipt must have an ID, a status, and a timestamp. Without a receipt, the UI should mark “pending confirmation,” not put a checkmark.</p><p>For measurement, sample a batch of production sessions for manual reconciliation and compute the proportion of “claimed complete but actually not complete.” This number usually doesn’t make it into the weekly report, because handling the problems it surfaces is a hassle—but it predicts whether users will use it a second time better than accuracy does.</p><h2 id="Five-things-I-check-before-launch"><a href="#Five-things-I-check-before-launch" class="headerlink" title="Five things I check before launch"></a>Five things I check before launch</h2><ol><li>End-to-end task success rate. Samples drawn from real logs, including final outcomes after retries, with step counts and time budgets clearly stated.</li><li>Fault injection. Randomly make some tool calls time out, return empty, or return 500, and see whether it retries, degrades, or makes things up.</li><li>Adversarial inputs. Prompt injection, privilege escalation requests, and attempts to induce skipping confirmation—prepare a few of each.</li><li>P95 latency and tool calls per task. Call count exposes design problems earlier than latency does.</li><li>Consistency rate between claimed completion and actual execution. Sample and reconcile to see how big the gap is.</li></ol><p>The first four can be done within a week; the fifth has to be ongoing. Of the first four, the one most easily skipped is the second, because it requires changing code to simulate failures, which looks like going out of your way to make trouble for yourself. But it is precisely the widest gap between the demo and production.</p><h2 id="Scenarios-where-the-gap-isn’t-that-large"><a href="#Scenarios-where-the-gap-isn’t-that-large" class="headerlink" title="Scenarios where the gap isn’t that large"></a>Scenarios where the gap isn’t that large</h2><p>There are also cases with little degradation: internal tools, where users are trained operations or support staff, input is constrained by structured forms, and every action is reversible. In such scenarios, noise and adversarial input are kept out by process, and part of the demo’s success rate carries over to production.</p><p>Conversely, when free-text input, cross-system write operations, and unattended batch processing all come together, degradation is greatest. To judge whether an agent should be scheduled based on demo numbers, you don’t need to look at how strong the model is—look at three variables: the freedom of the input, the side effects of the actions, and whether there is a human in the loop. If all three trend in the bad direction, even halving the demo numbers is optimistic.</p><p>After ten years in AI products, I now look less at whether a demo runs smoothly and more at what it does when it gets stuck. Next time you sit in an agent review meeting, you can ask just one question: in this workflow, which tool is most likely to time out, and what does it do after the timeout. Teams that answer clearly have usually already thought through retries, degradation, and who provides the safety net; teams that can’t answer—no matter how smooth the demo—should hold off on scheduling launch.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/01/stop-worshiping-prompts-in-2026-the-core-moat-of-top-agents-is-harness/">Getting an agent online is hard; the difficulty lies in the shell around the model</a><span class="shared">Agents</span></li><li><a href="/en/2026/09/14/from-full-stack-engineer-to-ai-orchestrator-the-interview-guide-for-th/">The arranger's job is to decide for the model where it should stop</a><span class="shared">Agents</span></li><li><a href="/en/2026/07/28/stop-just-chatting-with-ai-step-by-step-guide-to-deploying-openclaw-le/">I stop the Agent's permissions at the point where it can finish half a task.</a><span class="shared">Agents</span></li><li><a href="/en/2026/02/24/agentic-rag-retrieval-as-a-tool/">Agentic RAG: Multi-hop questions should not go through a fixed pipeline</a><span class="shared">Agents</span></li><li><a href="/en/2025/12/22/deepseek-v4-released-the-first-key-step-for-an-opensource-model-to-app/">Open-source models are good enough, but replacing closed-source ones is still a stretch</a><span class="shared">Agents</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/27/agent-demo-hides-partial-failure/</id>
    <link href="https://bl8ds.com/en/2026/11/27/agent-demo-hides-partial-failure/"/>
    <published>2026-11-26T17:49:11.000Z</published>
    <summary>Demo environments have no noise, no adversarial inputs, and no partial failures, so single-step accuracy is mistaken for end-to-end success rate. This article dismantles these three layers of shielding and provides executable pre-launch acceptance criteria and trade-off criteria for failure handling</summary>
    <title>The agent demo crashed right after its stunning launch because the demo had no failures</title>
    <updated>2026-11-26T17:49:11.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Inference Costs" scheme="https://bl8ds.com/en/tags/Inference-Costs/"/>
    <category term="Latency" scheme="https://bl8ds.com/en/tags/Latency/"/>
    <category term="Prefix Caching" scheme="https://bl8ds.com/en/tags/Prefix-Caching/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>The customer service assistant needs to cut first-token latency from 1.5 seconds to 500 milliseconds. At the review meeting, someone added: let’s turn on prefix caching and halve inference costs while we’re at it. The latency half largely holds up; the cost half needs a hefty discount. These two things often get bundled together, and once bundled, it’s easy to get the budget wrong.</p><h2 id="A-request-is-split-into-two-phases-and-caching-only-touches-the-first"><a href="#A-request-is-split-into-two-phases-and-caching-only-touches-the-first" class="headerlink" title="A request is split into two phases, and caching only touches the first"></a>A request is split into two phases, and caching only touches the first</h2><p>Prefill computes the entire input in parallel and produces the KV cache for every position; it is compute-intensive. Decode emits tokens one at a time, and each emission requires reading the entire historical KV; it is memory-bandwidth-intensive. The bottleneck resources of the two phases are not the same at all.</p><p>What prefix caching does is very narrow: it stores the KV computed during prefill keyed by a hash of the prefix, and if the next request starts with a token-for-token identical prefix, that segment of computation is skipped. Only prefill is skipped.</p><p>Generation cannot be precomputed. The 500th output token depends on the 499th, and its own KV does not exist until it is generated. Decode takes exactly the same number of steps, and each step reads exactly the same amount of memory. What a cache hit saves is the computation at admission, not the cost of every second after.</p><p>Total latency is roughly the sum of three terms: queueing time, time to first token (TTFT), and output token count times time per output token (TPOT). Caching only compresses the prefill term within TTFT, and only on a hit. Even after a hit, TTFT does not go to zero: the KV still has to be read, attention still has to run, and the first token still has to be sampled. Going from 1.5 seconds to 400 milliseconds is a reasonable order of magnitude; going to 50 milliseconds is not realistic.</p><h2 id="The-longer-the-output-the-less-this-latency-math-is-worth"><a href="#The-longer-the-output-the-less-this-latency-math-is-worth" class="headerlink" title="The longer the output, the less this latency math is worth"></a>The longer the output, the less this latency math is worth</h2><p>Take a set of assumptions: an 8k-token fixed prefix, prefill a bit over one second, TPOT 25 milliseconds.</p><p>With 800 output tokens, total time is about 1.2 + 20 &#x3D; 21.2 seconds, and about 0.3 + 20 &#x3D; 20.3 seconds after a hit—total wait drops only around 4%. First token going from 1.2 seconds to 0.3 seconds feels very different, but that’s because for that second-plus, nothing was happening on screen.</p><p>With 80 output tokens, 3.2 seconds becomes 2.3 seconds, a drop of about 28%.</p><p>For a quick estimate on the spot, use this ratio: T_prefill &#x2F; (T_prefill + N_out × TPOT). If output time exceeds prefill by five times, total latency improves by less than 17%; beyond twenty times, by less than 5%. These two numbers can be taken straight into the review meeting to push back on requirements.</p><p>Longer contexts make the denominator look worse. Every decode step reads the entire KV, and TPOT for a 100k-token context may be several times higher than for 10k tokens, depending on hardware and attention implementation. Prefix caching does not change this read. So in long-document QA, caching saves the admission fee, not the monthly rent.</p><p>This difference directly determines product shape. For streaming output, render-as-you-generate, and interactions where the user can interrupt mid-generation, first token is the experience bottleneck and caching is well worth it. For scenarios that return a long document all at once and the user can only use it after everything finishes, total duration is the bottleneck, and caching won’t save you.</p><h2 id="Only-input-gets-discounted-on-the-bill"><a href="#Only-input-gets-discounted-on-the-bill" class="headerlink" title="Only input gets discounted on the bill"></a>Only input gets discounted on the bill</h2><p>For APIs priced per token, a cache hit usually discounts only the input portion; the output unit price does not move at all. The common discount range is one-tenth to one-half of list price; check each vendor’s documentation.</p><p>Using a set of relative unit prices (input 1, cached input 0.1, output 4; order of magnitude only, not any vendor’s actual pricing):</p><table><thead><tr><th>Input &#x2F; Output (tokens)</th><th>Miss cost</th><th>Hit cost</th><th>Reduction</th></tr></thead><tbody><tr><td>8k &#x2F; 200</td><td>8.8</td><td>1.6</td><td>82%</td></tr><tr><td>8k &#x2F; 2k</td><td>16</td><td>8.8</td><td>45%</td></tr><tr><td>8k &#x2F; 8k</td><td>40</td><td>32.8</td><td>18%</td></tr></tbody></table><p>The same caching mechanism produces financial effects that differ by more than four times across these three businesses. The higher the input share, the more caching looks like a price cut; the higher the output share, the more it looks like a speedup. These are not the same thing on a budget sheet, and writing them together in an OKR will eventually fail to reconcile.</p><p>Self-hosted inference is a different set of books. What caching saves is GPU prefill time, and whether that turns into money depends on whether other work fills that time. If the cluster wasn’t fully utilized to begin with, the saved compute just leaves cards idle while depreciation and electricity keep being paid. Only when prefill is the bottleneck, queues are piling up, and batch size can’t be raised does saved compute turn into throughput. Teams buying APIs and teams running their own clusters need to look at completely different metrics when evaluating the same technology.</p><h2 id="Common-patterns-that-zero-out-the-hit-rate"><a href="#Common-patterns-that-zero-out-the-hit-rate" class="headerlink" title="Common patterns that zero out the hit rate"></a>Common patterns that zero out the hit rate</h2><p>Prefix matching is token by token, and most implementations hash in blocks of a dozen to a few dozen tokens. One wrong token at the start invalidates the entire rest; there is no partial hit.</p><p>One class of rework I’ve seen: to “let the model know what time it is,” the prompt template prepends the current time and request id to the very front of the system prompt. The first token differs on every request, so the hit rate is permanently zero, but monitoring only shows “caching enabled, no effect,” and the team starts suspecting the framework.</p><p>There are several other variants of the same problem: tool definitions generated by iterating a map, with unstable serialization order; retrieved snippets reordered by similarity, so the same document comes out in a different order twice; a system reminder saying “please answer in Chinese” inserted before the history in a multi-turn conversation. Each of these looks reasonable on its own; stacked together, they kill the cache.</p><p>One rule covers most cases: static content first, dynamic content last. System prompts, tool schemas, few-shot examples, and long document bodies go first; the user’s current question, timestamps, retrieval results, and conversation summaries go last. Putting the conversation summary first is a high-frequency anti-pattern: it changes every turn, and every change invalidates the prefix of the entire history.</p><p>Another easily overlooked variable is interaction cadence. Caches have a time to live, mostly minutes to hours. When a human types in a customer service conversation, the gap between turns is minutes to tens of minutes, so the second turn has likely expired and the hit rate stays low. When an agent loops through tool calls on its own, the gap between turns is tens of milliseconds, so it almost always hits. Same model, same code: the cache benefit in agent scenarios will be markedly higher than in human conversation scenarios, and the reason is cadence, not technology.</p><h2 id="The-hit-rate-metric-itself-is-misleading"><a href="#The-hit-rate-metric-itself-is-misleading" class="headerlink" title="The hit rate metric itself is misleading"></a>The hit rate metric itself is misleading</h2><p>The first trap is computing hit rate by token. A 20k shared system prompt can push overall token hit rate to 90%, but if those requests are only a tenth of traffic and each has a long output, the bill barely moves. At minimum, look at three numbers together: request-level hit rate, token-level hit rate, and the share of total cost saved by hits. The third is the one the boss cares about.</p><p>The second pitfall is multiple replicas. Requests are randomly load-balanced across N replicas, so each replica sees only 1&#x2F;N of the traffic, and the hit-rate ceiling is roughly 1&#x2F;N. With four replicas and no prefix routing, the theoretical ceiling is 25%, and the real number is lower. Add prefix-hash routing and the hit rate goes up, but then you hit hotspots: all requests share the same 20k prefix, the replica holding it gets hammered while the rest sit idle.</p><p>Each mitigation has a cost: pre-warming the shared prefix on every replica costs a copy of GPU memory per replica; sharding by tenant instead of prefix hash flattens the hotspot but drops the hit rate back toward 1&#x2F;N; shortening the shared prefix itself is a separate engineering effort. There are no free options here—you pick one based on your traffic distribution.</p><p>The third pitfall is on the self-hosted side. Cache blocks occupy KV memory, and when the hit rate is low, those blocks squeeze out space for concurrent batches, so throughput actually drops. If cache occupancy stays high over time while the request hit rate is only 20–30%, turn it off or cap it first, then talk about optimization.</p><h2 id="When-is-it-worth-changing-the-architecture-for-caching"><a href="#When-is-it-worth-changing-the-architecture-for-caching" class="headerlink" title="When is it worth changing the architecture for caching"></a>When is it worth changing the architecture for caching</h2><p>Walk through the following chain first, then decide whether to touch the architecture.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[请求进入] --&gt; B{前缀逐token一致}    B -- 否 --&gt; C[先修提示词布局]    B -- 是 --&gt; D{同前缀复用三次以上}    D -- 否 --&gt; E[命中率接近零]    D -- 是 --&gt; F{输出token占比小}    F -- 是 --&gt; G[缓存收益明显]    F -- 否 --&gt; H[只省首token]    H --&gt; I[去优化生成侧]</pre></div><p>Break it into criteria you can check off one by one:</p><ol><li>The same prefix is reused at least three times within a single session. For a one-off summary reused only once, caching is pointless.</li><li>Output tokens × TPOT does not exceed three times the prefill time. Beyond that magnitude, the gain from changing the architecture is mainly in experience, not cost.</li><li>The prefix contains nothing that changes over time or per request—no timestamps, random ids, or dynamic ordering.</li><li>In a multi-replica deployment, prefix routing or a pre-warming scheme is already in place; otherwise the hit-rate ceiling is 1&#x2F;N.</li><li>Monitoring records cached_tokens, prefill latency, TTFT, and output token count separately. A gain you can’t measure is a gain that didn’t happen.</li></ol><p>The boundaries on the other side are just as clear. In multi-tenant knowledge-base Q&amp;A, the retrieved snippets differ each time and are placed at the front, so the hit rate is inherently low—what needs fixing there is prompt layout, not more cache machines. For one-off long-document analysis, one document and one question, the reuse count is one, and caching saves nothing. In both scenarios, prefix caching is a “just know it exists” technology.</p><p>The real levers for output cost are on the generation side: capping max_tokens, using structured output to cut redundancy, routing by difficulty to smaller models, speculative decoding, and batching. These don’t conflict with prefix caching, but they solve completely different problems. Mix the two up and you’ll end up in a retrospective meeting saying “we turned on caching and costs still didn’t drop.”</p><p>Next time someone in review says “let’s add caching and cut costs along the way,” make them answer one question first: in this pipeline, what share of the bill is output tokens. If they can’t answer, the proposal isn’t ready to be signed off.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/11/29/realtime-inference-cost-capacity-not-tokens/">Real-time interaction values capacity reservation, not token unit price</a><span class="shared">Latency · Inference Costs</span></li><li><a href="/en/2026/12/01/context-window-doubling-not-capability-doubling/">Double the context does not mean double the effective capability</a><span class="shared">Inference Costs</span></li><li><a href="/en/2026/03/20/the-underlying-physics-of-the-divergence-in-china-us-ai-paths-oppenhei/">Those who build atomic bombs, and those who build steam engines</a><span class="shared">Inference Costs</span></li><li><a href="/en/2025/12/22/deepseek-v4-released-the-first-key-step-for-an-opensource-model-to-app/">Open-source models are good enough, but replacing closed-source ones is still a stretch</a><span class="shared">Inference Costs</span></li><li><a href="/en/2025/12/15/ai-pm-interview-cost-structure-first/">When I ask interviewees to calculate costs, what I want to see isn't multiplication</a><span class="shared">Inference Costs</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/27/prefix-cache-cuts-ttft-not-decode-cost/</id>
    <link href="https://bl8ds.com/en/2026/11/27/prefix-cache-cuts-ttft-not-decode-cost/"/>
    <published>2026-11-26T17:48:21.000Z</published>
    <summary>Prefix caching brings down first-token latency without reducing output tokens at all. This piece breaks down prefill and decode as two separate cost components, explaining which part of the cost it reduces and what kinds of pipelines are worth re-architecting for it</summary>
    <title>Prefix caching saves on the first token, not on generation length</title>
    <updated>2026-11-26T17:48:21.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Agent" scheme="https://bl8ds.com/en/tags/Agent/"/>
    <category term="Document Structure" scheme="https://bl8ds.com/en/tags/Document-Structure/"/>
    <category term="GEO" scheme="https://bl8ds.com/en/tags/GEO/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A team building developer tools ran into a phenomenon that was hard to classify as either a bug or a content problem. Their documentation site had an llms.txt, formatted according to the proposal, with clear entries and links all pointing to the correct pages. But when users asked an AI assistant “what authentication methods do you support,” the assistant cited an early integration tutorial from the blog, whose token expiration had long since changed.</p><p>Investigation showed the links were correct. The problem was that the file only said “I have these pages here,” not “for answering authentication questions, only this page counts.”</p><p>llms.txt is a proposal that appeared in 2024, hosted at llmstxt.org, put forward by Answer.AI, and is not yet a formal standard in the W3C or IETF sense. Its positioning is complementary to robots.txt: robots.txt governs “whether you can crawl,” llms.txt governs “which one you should crawl.” The latter is the genuinely hard part, and most implementations omit this section.</p><h2 id="The-proposal-originally-had-a-description-slot-which-got-lost-in-copying"><a href="#The-proposal-originally-had-a-description-slot-which-got-lost-in-copying" class="headerlink" title="The proposal originally had a description slot, which got lost in copying"></a>The proposal originally had a description slot, which got lost in copying</h2><p>The structure of llms.txt is simple: an H1 with the project name, a blockquote with a one-sentence summary, and the body grouped under H2 headings, with Markdown link lists inside each group. The key is that in the examples given in the proposal, each link can be followed by a colon and a description.</p><p><code>- [API 参考](https://example.com/api): v2 接口的权威定义</code></p><p>This section is optional, so almost nobody writes it. The reason isn’t hard to understand: navigation is written for humans, and a URL plus page title is enough—a human clicks in and knows within three seconds what the page is. Agents can’t do that. They can’t click, only crawl, and crawling has a cost.</p><p>Omitting this section is equivalent to shifting the judgment cost from the file’s author to the reader. The reader has far less information than you do—it only knows the link text and the URL path.</p><h2 id="With-only-URLs-the-agent-makes-four-judgments-on-your-behalf"><a href="#With-only-URLs-the-agent-makes-four-judgments-on-your-behalf" class="headerlink" title="With only URLs, the agent makes four judgments on your behalf"></a>With only URLs, the agent makes four judgments on your behalf</h2><p>The first is relevance. When titles are short and paths are meaningless strings like &#x2F;docs&#x2F;a1b2, the only thing the agent can rely on is the words in the path. On the same site, blog post titles often look more like “this is what’s being discussed” than spec pages do, so it crawls the blog. This isn’t stupidity—the material you gave it only supports that kind of inference.</p><p>The second is authority. When three or four pages on the same topic coexist—a tutorial, an API reference, a blog post, and a changelog—with no annotations, the agent can only guess based on length, keyword density, or order in the file. The odds of guessing right aren’t high.</p><p>The third is currency. With no version number and no “superseded” marker, the agent can’t tell which entry is the current spec. It might even read a migration guide as the current documentation, because that one is written in more detail.</p><p>The fourth is coverage. A file with only five links leads the agent to infer that the site has only that much content. It won’t go looking for what’s missing.</p><p>Of these four judgments, the first three produce wrong answers and the fourth produces missing answers. Neither shows up as an error in the logs—they just quietly appear in what the user sees.</p><p>Add one more real-world constraint: agents have a crawl budget and won’t crawl every page you list—they sample. The sampling is based on link text and paths. The real function of a description sentence is to give that sampling a reason.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[代理读取 llms.txt] --&gt; B{条目带说明吗}    B --&gt;|没有| C[按标题和路径猜]    B --&gt;|有| D{说明含用途和时效吗}    D --&gt;|不含| C    D --&gt;|含| E[按用途和时效过滤]    C --&gt; F[抓到旧文或营销页]    F --&gt; G[引用过期结论]    E --&gt; H[抓到权威页]</pre></div><h2 id="What-to-write-in-the-description-give-constraints-not-summaries"><a href="#What-to-write-in-the-description-give-constraints-not-summaries" class="headerlink" title="What to write in the description: give constraints, not summaries"></a>What to write in the description: give constraints, not summaries</h2><p>The most common mistake is writing the description as a summary. “This article introduces our authentication flow” is roughly the same as writing nothing—the reader still doesn’t know whether to use it or when not to use it.</p><p>The description needs to answer “under what conditions should this page be used, and can it serve as a basis for an answer.” Four kinds of information are worth writing:</p><ul><li>Type: spec, tutorial, changelog, sample code, background explanation</li><li>Currency: the corresponding version number, or a deprecation marker like “superseded by v2”</li><li>Applicable scenario: which kinds of questions this page should be read for</li><li>Authority level: whether it can serve directly as a basis for an answer, or only as background material</li></ul><p>Fifteen to thirty characters is enough. Beyond forty, it starts turning into a summary, with another side effect: the agent may quote your summary directly instead of reading the original. The more conclusion-like the summary, the higher this risk, because it looks like it has already answered the question.</p><p>By the same logic, don’t put adjectives in descriptions. “Industry-leading complete solution” provides no filtering basis whatsoever—it’s as useless to agents as it is to humans.</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"># 示例产品文档</span><br><span class="line"></span><br><span class="line">&gt; 面向开发者的鉴权与配额说明，供 AI 代理按需抓取</span><br><span class="line"></span><br><span class="line">## 必须读</span><br><span class="line">- [鉴权 v2](https://example.com/auth/v2): 现行规范，回答鉴权问题只引用这一页</span><br><span class="line">- [配额与限流](https://example.com/rate-limit): 当前生效阈值，旧文中的数字已作废</span><br><span class="line"></span><br><span class="line">## 背景材料</span><br><span class="line">- [鉴权 v1 迁移指南](https://example.com/auth/v1): 仅用于解释历史行为，不能当现行规范</span><br><span class="line">- [接入教程](https://example.com/blog/onboarding): 教学示例，参数可能过期</span><br></pre></td></tr></table></figure><h2 id="Saying-what-not-to-read-is-more-useful-than-saying-what-to-read"><a href="#Saying-what-not-to-read-is-more-useful-than-saying-what-to-read" class="headerlink" title="Saying what not to read is more useful than saying what to read"></a>Saying what not to read is more useful than saying what to read</h2><p>Most agent failures aren’t about failing to find the right page—they’re about finding both the right and wrong pages at once, then treating the wrong one as authoritative. It doesn’t have your common sense that “blogs don’t count, only the docs site counts.” You have to write that common sense in.</p><p>So explicitly marking downranked pages is worth doing: pricing pages, marketing landing pages, historical announcements, early blog posts. A sentence like “for historical context only, not to be used as current spec” is more useful than ten more correct links.</p><p>The other thing is grouping. Separating “must read” from “background material” is far better than a flat list of a hundred links. Most agents read in file order, and order itself carries priority—this works without any extra explanation.</p><p>Entry count also needs controlling. For documentation sites I’d recommend staying within 20 to 30 entries; beyond that scale, it basically means you’re using sitemap as llms.txt, pushing the filtering cost back onto the reader.</p><h2 id="The-file-will-rot-so-you-need-a-generation-pipeline"><a href="#The-file-will-rot-so-you-need-a-generation-pipeline" class="headerlink" title="The file will rot, so you need a generation pipeline"></a>The file will rot, so you need a generation pipeline</h2><p>Version upgrades, page path changes, rewording of terms—llms.txt won’t update itself. Its failure mode is quiet: agents keep reading it, reading a structure from three months ago, and citing according to that structure.</p><p>The minimum viable rule is to hook llms.txt into the release process: check this file whenever the documentation version number changes; put link 404 checks into CI; decide whether each new doc page goes into the “must read” group. If conditions allow, add one more: version numbers appearing in descriptions must be findable verbatim in the page body—flag an error if they don’t match.</p><p>Without this rule, the file’s value drops to zero within a quarter, and nobody will notice, because it’s still there, still opens, and is still correctly formatted.</p><h2 id="When-it’s-not-worth-doing"><a href="#When-it’s-not-worth-doing" class="headerlink" title="When it’s not worth doing"></a>When it’s not worth doing</h2><p>There are three types of sites where llms.txt yields low returns.</p><p>When the total page count is under ten, crawling the whole site costs less than reading this file—the agent can just crawl everything. For sites with daily content updates and no automated generation pipeline, manual maintenance will inevitably rot faster than the benefits accrue. There’s a more common case too: the real problem is chaotic page titles, missing meta descriptions, and the same concept described three different ways across three articles. In that case, adding llms.txt just puts an index on top of a bad structure—the agent reads the index and still gets tangled up in the body text.</p><p>One more boundary is easy to overlook. llms.txt is not a standard; no model has read it by default during training. Only agents that actively request this path will use it. It affects “agents willing to read it,” not all models. Misconceptions already baked into training data are beyond its reach.</p><p>Over the past decade I’ve mostly worked on B2B tools and assistant-type products, where documentation is the main entry point for both. So my default choice on llms.txt is: documentation products do it first; marketing sites fix their page structure first.</p><h2 id="Pushing-the-filtering-cost-back-is-the-most-common-design-error"><a href="#Pushing-the-filtering-cost-back-is-the-most-common-design-error" class="headerlink" title="Pushing the filtering cost back is the most common design error"></a>Pushing the filtering cost back is the most common design error</h2><p>Back to the case from the beginning. What the team changed wasn’t the links—it was the description sentences: after the authentication page they added “for answering authentication questions, cite only this page,” and after the old tutorial they added “for explaining history only, numbers are obsolete.” Similar mis-citations basically disappeared, with less than twenty lines of text changed.</p><p>A lot of work in the GEO space is actually doing the same thing: getting AI to cite the right page, the right version, when it answers. llms.txt is just one entry point, and a narrow one—its value depends entirely on whether what’s written inside is links or constraints. Teams offering this kind of service, such as Agentrace (<a href="https://geo.moreyin.cn/">https://geo.moreyin.cn</a>), are dealing with the same layer of the problem: the goal isn’t to get AI to mention you more, but to make sure that when it does, it doesn’t use the wrong material.</p><p>A self-check method: cover up the description of each link in your llms.txt, look only at the title and URL, and ask yourself whether someone who has never read your site could tell which one they should read. If they can’t, your description sentences aren’t finished yet.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/agent-tool-overload-candidate-set/">With more than a dozen tools available, Agents first fail by choosing the wrong one</a><span class="shared">Agent</span></li><li><a href="/en/2026/12/01/schema-overload-citation-trust/">The fuller the schema is marked, the harder it is for the referencing party to trust it</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/30/troubleshooting-docs-get-cited-most/">The most frequently cited section in product docs is the troubleshooting part; almost no one excerpts the feature introductions</a><span class="shared">GEO</span></li><li><a href="/en/2026/11/29/dont-use-agent-for-single-prompt-task/">One prompt is enough, don't bring in an Agent</a><span class="shared">Agent</span></li><li><a href="/en/2026/11/29/ai-crawler-404-fix-entry-before-blocking/">AI crawlers are hitting more 404s; fix the entry points before discussing bans</a><span class="shared">GEO</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/27/llms-txt-link-annotations/</id>
    <link href="https://bl8ds.com/en/2026/11/27/llms-txt-link-annotations/"/>
    <published>2026-11-26T17:47:19.000Z</published>
    <summary>llms.txt only lists URLs, so agents can only guess what a page is from its title, ending up fetching outdated docs and marketing pages. This breakdown explains what four kinds of constraints the description sentences should contain, how to group entries, and which sites shouldn't do this at all.</summary>
    <title>llms.txt only contains links, so the agent can only guess</title>
    <updated>2026-11-26T17:47:19.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>Lu's Blog</name>
    </author>
    <category term="Code Completion" scheme="https://bl8ds.com/en/tags/Code-Completion/"/>
    <category term="Engineering Efficiency" scheme="https://bl8ds.com/en/tags/Engineering-Efficiency/"/>
    <category term="Legacy Systems" scheme="https://bl8ds.com/en/tags/Legacy-Systems/"/>
    <category term="Technology" scheme="https://bl8ds.com/en/categories/Technology/"/>
    <content>
      <![CDATA[<p>A common task: add a refund status field to an order service that has been running for seven or eight years. You open the file, and the same method has three versions—two commented out, one wrapped in a condition that is always false. You type <code>self.refund_</code> on some line in the middle, and the completion popup shows three lines, calling methods from another payment gateway in the repository that has already been decommissioned.</p><p>You read it twice before confirming that it is a deprecated path, delete it, and write four lines yourself. This interaction repeats dozens of times a day, and the conclusion is clear.</p><p>The same model, in a TypeScript project that started only six months ago, often gets three lines right on the first try. The difference is not the model; it is the quality of the few hundred lines of context around the cursor. The benefit of code completion does not grow with project size; it grows with how clean the context is. Legacy projects happen to be where the context is dirtiest, so the benefit is close to zero, and in some files it is even negative.</p><h2 id="Acceptance-rate-is-a-misleading-metric"><a href="#Acceptance-rate-is-a-misleading-metric" class="headerlink" title="Acceptance rate is a misleading metric"></a>Acceptance rate is a misleading metric</h2><p>The acceptance rate reported by the editor has accepted characters as the numerator and displayed characters as the denominator. This metric is almost inevitably higher in old projects, because old projects contain more repeated boilerplate: field declarations, getters, log lines, error code mappings. The model suggests quickly, and you cannot be bothered to change it, so you just press Tab.</p><p>But boilerplate does not take time in the first place. Roughly estimating an afternoon of bug fixing: reading code and tracing call chains take up most of it, locating the problem takes a chunk, and the time actually typing on the keyboard may be only a little over ten percent. This is not a statistical conclusion; you can get roughly the same order of magnitude by logging a day’s operations every ten minutes. Completion optimizes that ten percent, and even if you cut it in half, the overall effect is only a few percentage points. That magnitude cannot support the expectation that “AI doubles efficiency.”</p><p>There is also an asymmetry: rejecting a suggestion is more expensive than accepting it. The suggestion is already displayed; accepting takes one Tab, while rejecting requires pressing Esc, reselecting, and checking again for leftovers. Under this cost structure, people tend to accept first and fix later, so the acceptance rate is pushed up, and the fixing part is not recorded in the metric.</p><p>More troublesome is that acceptance does not equal correctness. A suggestion that is changed after acceptance counts as a success in the metric, but in reality it is a rework. In old projects, this kind of rework does not surface immediately, because many errors only show up at runtime.</p><h2 id="The-dirtier-the-context-the-more-the-suggestions-look-like-guesses"><a href="#The-dirtier-the-context-the-more-the-suggestions-look-like-guesses" class="headerlink" title="The dirtier the context, the more the suggestions look like guesses"></a>The dirtier the context, the more the suggestions look like guesses</h2><p>Completion is essentially sampling the next segment of tokens given a prefix (now commonly also a suffix, fill-in-the-middle). Sampling relies on local statistical patterns, and legacy projects contaminate this pattern on several layers.</p><p>The first layer is the coexistence of multiple versions. A utility function has five similar implementations in the repository, four of which are old versions, and their combined line count is several times that of the new version. Retrieval or the context window votes by similarity and frequency, and what it votes out is dead code. The model is not doing anything wrong; it faithfully learned the majority style in this repository, and that majority style is wrong.</p><p>The second layer is the proportion of generated code. Protobuf and Thrift outputs, ORM migration files, frontend build artifacts, and multilingual string tables are highly repetitive and absolutely consistent in style, making them the model’s favorite context. They may account for more than half the lines, yet not a single character in them can be changed. Completion performs best in these files precisely because these files do not need humans to write them.</p><p>The third layer is uninferable naming. <code>flag2</code>, <code>bizType</code>, and <code>doProcess</code> in old code have semantics that exist only in someone’s head or on a Wiki that has long been unmaintained. The model can only guess literally; the call order it guesses looks reasonable but is wrong when run. The type system could have caught this at this layer, but old code heavily uses dictionaries, string keys, and reflection, so it cannot.</p><p>The fourth layer is dependency version mismatch. The repository locks a library version from three years ago, while the model knows the new API it saw during training. It gives <code>client.request(...)</code>, while this version only has <code>client.send(...)</code>. This kind of error is caught by a single compilation in a new project, but in an old project it drifts all the way to the test environment.</p><p>There is also a purely engineering reason: functions are too long. The context window is limited. If the few hundred lines near the cursor all fall inside a six-hundred-line giant method, the truly relevant information—such as where this variable is initialized or why this branch exists—may be two thousand lines away. What the model sees is a fragment.</p><div class="mermaid-block" data-pagefind-ignore><pre class="mermaid">flowchart TD    A[补全弹出建议] --&gt; B{用到仓库里没出现过的 API}    B --&gt;|是| C[删掉 自己写]    B --&gt;|否| D{建议超过五行}    D --&gt;|否| E[能一眼判断就接受]    D --&gt;|是| F{本文件风格一致}    F --&gt;|否| C    F --&gt;|是| G[对照相邻函数再决定]</pre></div><p>This judgment order can be used directly. The core is the first rule: if a suggestion contains an API that has never appeared in this repository, delete it and rewrite it; do not try to modify it. The cost of fixing a wrong suggestion is usually higher than writing from scratch.</p><h2 id="The-slower-the-feedback-the-more-expensive-the-wrong-suggestions"><a href="#The-slower-the-feedback-the-more-expensive-the-wrong-suggestions" class="headerlink" title="The slower the feedback, the more expensive the wrong suggestions"></a>The slower the feedback, the more expensive the wrong suggestions</h2><p>The net benefit of completion is roughly the typing time saved minus the time spent judging whether a suggestion is correct. In a new project, the second term is close to zero: the editor marks errors in red within a second, a type mismatch is a type mismatch, and tests finish in seconds. In an old project, the second term can be large.</p><p>To judge whether a suggestion is correct, you have to run several things through your head: Does this API exist? Does this field exist in this version? Does this logic conflict with the branch above? Is this style consistent with our conventions? Each one requires looking through code or searching the repository. After three rounds of searching, you could have finished writing it yourself.</p><p>So one criterion can be established here first: when the cost of judging a suggestion is higher than the cost of writing it yourself, completion is a net negative. The judgment cost roughly rises with two things: the number of lines in the suggestion, and how far the information it references is from the cursor. A multi-line suggestion over five lines that also references symbols not present in this file is basically a loss.</p><p>This also explains why “turning on completion makes things more tiring” in old projects is not an illusion. Writing code is a continuous state, and every popup is a context switch, and the cost of switching is especially high in files that require deep understanding. After a few interruptions, a piece of logic that needs to be thought through has to be picked up again.</p><p>For someone who has just taken over an old project, the cost is even higher. They are not yet able to judge whether a suggestion is correct. Seeing a syntactically fluent piece of code, they tend to think this is how the repository is written, learn from it, and copy the wrong style again. What completion does here is accelerate the spread of errors, not accelerate development.</p><h2 id="Where-it-is-actually-useful-in-old-projects"><a href="#Where-it-is-actually-useful-in-old-projects" class="headerlink" title="Where it is actually useful in old projects"></a>Where it is actually useful in old projects</h2><p>Saying the benefit is close to zero does not mean zero. There are several kinds of work that are “greenfield” in legacy projects, where completion works almost as well as in new projects.</p><p>The most obvious is test code. The old logic under test can be very dirty, but the test file itself is new, consistent in style, clear in dependencies, and only a few dozen lines per file. Adding tests to old code is exactly what legacy projects should do most, and completion is useful for this.</p><p>The second kind is one-off scripts: data migration, log cleaning, reconciliation, batch fixes. This code does not go into the main branch, does not need to cater to the repository style, and is deleted after running. The model’s generic style becomes an advantage here.</p><p>The third kind is new modules. As long as the new directory is not mixed with old code and retrieval does not pull old code in, the effect is close to that in a new project. This places engineering requirements: directory boundaries must really be separated, and new code must not be stuffed back under the old package’s <code>utils/</code>.</p><p>The fourth kind is structured text: SQL, YAML, regular expressions, log parsing expressions. The correct way to write these languages is highly consistent worldwide and is not affected by this repository’s style.</p><p>Putting these together, the pattern is clear: the benefit does not depend on the age of the project, but on the local consistency of the two hundred lines around the cursor. In a repository that started ten years ago, the newly created directory works just as well.</p><table><thead><tr><th>Directory type</th><th>Suggested strategy</th><th>Reason</th></tr></thead><tbody><tr><td>New modules, test directories</td><td>Fully on, including multi-line</td><td>Locally consistent, fast feedback</td></tr><tr><td>One-off script directories</td><td>Fully on</td><td>Not merged into mainline, high tolerance for errors</td></tr><tr><td>Config, SQL, YAML</td><td>Fully on</td><td>Globally uniform syntax</td></tr><tr><td>Core legacy services</td><td>Single-line only or off</td><td>Multiple versions coexist, high cost of judgment</td></tr><tr><td>Generated code directories</td><td>Off</td><td>Should never be hand-edited anyway</td></tr><tr><td>Giant files over a thousand lines</td><td>Off</td><td>Context gets truncated</td></tr></tbody></table><h2 id="How-to-measure-it-once-don’t-go-by-feel"><a href="#How-to-measure-it-once-don’t-go-by-feel" class="headerlink" title="How to measure it once, don’t go by feel"></a>How to measure it once, don’t go by feel</h2><p>Most debates about completion stop at the level of gut feeling. To judge whether it’s worth turning on, you have to change the metrics.</p><p>Acceptance rate cannot be used as a decision metric; it rewards boilerplate code. Two substitutable metrics are: the number of review reworks per unit of change, and the time from starting work to merge. The former reflects suggestion quality, the latter reflects overall efficiency. Don’t group by project; group by the “dirtiness” of directories: the number of near-duplicate implementations in the same directory, whether there is test coverage, and the average function length. These three can be computed by script in most repositories, which is more reliable than manual judgment.</p><p>A lightweight approach is to record, over one week, the number of times each “deleted suggestion” and “kept suggestion” occurs, aggregated by directory. For directories with a keep rate below one-fifth, just turn off multi-line completion. This rule has a small sample size, so use it only to decide on&#x2F;off, not to draw conclusions about “how much efficiency was gained”—the latter requires a much larger sample size.</p><p>The configuration looks roughly like this, graded by path rather than a global one-size-fits-all switch:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">completion:</span></span><br><span class="line">  <span class="attr">default:</span> <span class="string">single_line</span></span><br><span class="line">  <span class="attr">overrides:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">path:</span> <span class="string">&quot;src/new/**&quot;</span></span><br><span class="line">      <span class="attr">mode:</span> <span class="string">multi_line</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">path:</span> <span class="string">&quot;tests/**&quot;</span></span><br><span class="line">      <span class="attr">mode:</span> <span class="string">multi_line</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">path:</span> <span class="string">&quot;src/legacy/billing/**&quot;</span></span><br><span class="line">      <span class="attr">mode:</span> <span class="string">&quot;off&quot;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">path:</span> <span class="string">&quot;**/*_pb2.py&quot;</span></span><br><span class="line">      <span class="attr">mode:</span> <span class="string">&quot;off&quot;</span></span><br></pre></td></tr></table></figure><h2 id="A-stop-rule-you-can-use-right-away"><a href="#A-stop-rule-you-can-use-right-away" class="headerlink" title="A stop rule you can use right away"></a>A stop rule you can use right away</h2><p>If you delete completion suggestions in the same file three times in a row, turn off multi-line completion in that directory and keep only single-line. Three times is a very low threshold, but it’s enough to show that the file’s context and the model’s understanding don’t match; the loss after turning it off is small, because single-line completion is still there, and variable names and API names can still be completed.</p><p>Second rule: if suggestions that were accepted and then changed by you exceed half in a directory, it means most of the writing style in that directory is itself wrong, and completion is amplifying it. At this point what you should do is clean up dead code, unify style, and add type annotations, not switch models or tweak prompts.</p><p>One last judgment call. Poor completion performance in old projects is not a model capability problem, it’s a context governance problem. Dirty context is the repository’s historical debt, and the model merely holds up this debt to the light. If you don’t plan to pay off the debt, turning it off in these directories is less trouble than any tuning.</p><section class="geo-related" data-pagefind-ignore><p class="geo-related__title">Related reading</p><ul class="geo-related__list"><li><a href="/en/2026/12/01/ai-code-review-shift-to-intent-and-boundaries/">The more code AI writes, the more reviews should focus on intent and boundaries</a><span class="shared">Engineering Efficiency</span></li><li><a href="/en/2026/11/14/small-team-code-review/">A four-person team, with only three rules for code review</a><span class="shared">Engineering Efficiency</span></li></ul></section><style>.geo-related {  margin: 56px auto 8px;  padding: 20px 22px;  border: 1px solid var(--color-border-secondary);  border-radius: var(--radius-small);  background-color: var(--color-background-secondary);}.geo-related__title {  margin: 0 0 12px;  font-size: 15px;  font-weight: 600;  color: var(--color-text-primary);}.geo-related__list {  list-style: none;  margin: 0;  padding: 0;}.geo-related__list li {  display: flex;  align-items: baseline;  gap: 12px;  padding: 7px 0;  border-bottom: 1px solid var(--color-border-secondary);}.geo-related__list li:last-child { border-bottom: none; }.geo-related__list a {  flex: 1;  color: var(--color-text-primary);  text-decoration: none;}.geo-related__list a:hover { color: var(--color-text-accent); }.geo-related__list .shared {  flex: none;  font-size: 12px;  color: var(--color-text-tertiary);}@media (max-width: 600px) {  .geo-related { padding: 16px; }}</style>]]>
    </content>
    <id>https://bl8ds.com/en/2026/11/26/code-completion-roi-in-legacy-codebases/</id>
    <link href="https://bl8ds.com/en/2026/11/26/code-completion-roi-in-legacy-codebases/"/>
    <published>2026-11-25T18:05:52.000Z</published>
    <summary>In an old repository with multiple coexisting versions, piles of generated code, and missing types, why does code completion turn from a productivity tool into an attention tax, and which directories are still worth keeping it on?</summary>
    <title>Code completion yields near-zero benefit in legacy projects; the problem is not the model</title>
    <updated>2026-11-25T18:05:52.000Z</updated>
  </entry>
</feed>
