This example compares a small classifier that can decide before answer generation with a particular confidence gate that generates a draft first. These are alternative implementations, not a rule that every confidence signal requires a full draft. The estimates below separate arithmetic and weight-stream components from stipulated wall time.
1. The four outcome groups
Fix a paired evaluation of closed-book and retrieval-augmented answers. Divide the scored questions by their observed binary outcomes:
- : both answers are correct.
- : the closed-book answer is correct and retrieval is wrong.
- : retrieval is correct and the closed-book answer is wrong.
- : both answers are wrong. Always retrieving scores ; answering closed-book scores . An outcome-clairvoyant selector reaches , ten percentage points above always retrieving. This ceiling is for the fixed paired outcomes, not a promise that an input-only gate can recognize every successful branch. All four percentages are scenario assumptions. A reported PopQA harm result motivates the example but does not establish that its harm rate has this example's all-query denominator.
2. What the 30% skip rate does
The hypothetical gate skips retrieval on of all questions. Its skips rescue six percentage points from and lose three percentage points from . These are fractions of the entire workload, not conditional percentages of skipped questions. The resulting accuracy is
The net gain recovers of the outcome-oracle's ten-percentage-point headroom, not one third. Skips in or change cost but not this paired score. At daily queries, always using a -token prompt processes prompt tokens. If the skipped queries instead use tokens, the daily total is
Prompt-token work falls by , while retrieval calls fall by . Neither percentage is automatically the reduction in total serving cost or latency.
3. Why the classifier saves time
Under the serial proxy used in section , retrieval adds of embedding/search/reranking and of extra-prompt arithmetic: in total. Skipping it on of queries avoids an average per query. Charging a separately stipulated classifier to every query leaves of modeled mean saving. This is approximately , not a measured production result.
4. Why the confidence check can cost more than it saves
For the compared confidence implementation, a thirty-token draft incurs of modeled weight-stream work before every decision. In the no-reuse comparison, the draft is additional to the common answer-generation budget. Thus
That implementation is approximately slower per query under the stated proxy. A draft reused as the final answer on skipped queries changes the comparison; discarded drafts, extra prefill, cache validity and answer length must be accounted for explicitly. Token-logit, hidden-state and pre-answer control-token gates have different timing.
5. Use one reconciled set of numbers
Using full precision until the final rounding gives approximately saved by the classifier and added by this no-reuse draft gate. The earlier and summaries do not follow from these inputs and are not alternative computed results.
00-START-HERE · 01-READING-ROUTES · 24_query_reformulation · 26_iterative_recursive_and_agentic_retrieval This chapter explains how a Retrieval-Augmented Generation (RAG) system decides whether to retrieve, which permitted stores to query, which operation to run, and how to manage uncertain or unfamiliar inputs without equating more computation with safety.
TL;DR
- Optimize retrieval against expected answer benefit, resource cost and operational risk. In a fixed paired binary-outcome evaluation, only the closed-book-only cell supplies accuracy headroom over always retrieving; stochastic expected-accuracy oracles require a different definition.
- A useful gate separates cases retrieval spoils from cases it saves. “Easy versus hard” is not the same decision boundary.
- Unified Active Retrieval (UAR) combines external intent, world-knowledge need, time sensitivity and self-knowledge. Separately trained probes are not necessarily statistically independent, and their shared generator prefill has a cost.
- Source routing can enforce permissions and reduce calls, transferred candidates and fan-out exposure. It can also silently miss the right store. Deduplication, version-aware evidence handling and score fusion are separate controls.
- A descriptive classifier names query properties; a prescriptive router selects an operation such as direct answering, rewriting or decomposition. Their quality must be judged by final outcomes and asymmetric costs, not routing accuracy alone.
- Query stratification distinguishes explicit facts, combinations of facts, written procedures and policies inferred from cases. Retrieval and corpus design matter at all four levels; case examples do not necessarily identify a unique hidden rule.
- Adaptive-RAG can obtain silver labels by executing candidate policies and selecting the cheapest observed success. Handle ties, failed policies, stochasticity and version changes explicitly. Router confidence is not a general distance-to-data measure or an OOD safety certificate; an input-distance signal is useful only with its own calibration and failure analysis.
The story
Imagine a library with a service desk, archive rooms, and a clerk who can sometimes answer from memory. A records runner can rescue an answer the clerk does not know, but an old or distracting page can also spoil an answer the clerk would have given correctly. The librarian compares the rescued pile with the spoiled pile. A gate should learn that distinction, not merely “easy” versus “hard.” Four cards help organize the decision: whether the patron wants outside knowledge, whether facts beyond the supplied text are needed, whether those facts can change, and whether the clerk already knows a stable answer. Checking freshness prevents confident recall of an obsolete office holder from masquerading as current knowledge. If a trip is appropriate, the librarian chooses permitted rooms. Broadcasting may call a costly partner desk, cross a residency boundary, or bring back several photocopies of one stale memo. Copies are not independent witnesses. The librarian merges comparable evidence, groups copies by provenance, and distinguishes an amendment from an older version before using agreement. Routing and deduplication help in different ways; a routed room can still return duplicates, and broadcasting need not use a bad merge policy. The next choice is the operation: answer directly, reason from the supplied facts, search as written, rewrite a follow-up, or split a compound question. A label such as “needs outside knowledge” does not choose between those operations. Some requests need one written fact; others need several facts, a procedure, or representative past decisions. Different evidence units and budgets may be appropriate. Past cases alone need not reveal a unique unwritten policy. To train the dispatcher, the library can run its candidate routes on questions with known answers and retain the cheapest observed success. This is silver supervision, not clairvoyance about future answers. If every route fails, a dataset-based fallback is a heuristic label rather than a verified success. Finally, an unfamiliar patron can receive a confidently wrong route. Neither confidence nor distance to familiar requests is a safety proof. The library checks both where useful, validates them on held-out traffic, and has a permitted fallback that may be broader retrieval, clarification, abstention or human review—not automatically the most expensive investigation.
Decoder table
| Technical term | Plain-English meaning | Why it matters |
|---|---|---|
| Retrieval-Augmented Generation (RAG) | A generator answers with retrieved external context | Retrieval can add evidence or corrupt an answer the model already knew |
| Closed-book answer | An answer produced without retrieved context | It is the baseline branch that a retrieval gate may preserve |
| Parametric memory | Facts represented in the model’s weights | Popular facts may already be available without retrieval |
| Non-parametric memory | Facts stored outside the model and fetched at request time | It provides updateable evidence but can add noise |
| Exact match (EM) | A declared exact-string/normalized-answer scorer against a gold answer | Observed success is scorer-dependent; semantic equivalence and truth can differ |
| Retrieval gate | A controller that chooses retrieve or skip | It can recover accuracy and cost when always-retrieve is harmful |
| Oracle gate | Either an oracle over conditional mean accuracies or a selector that sees realized paired outcomes | Define which oracle; the second can have a strictly higher ceiling |
| cell | Questions both closed-book and retrieval answer correctly | Skipping these changes cost but not accuracy |
| cell | Closed-book correct and retrieval wrong in the fixed paired evaluation | Its mass is outcome-oracle headroom, not necessarily attainable query-only gain |
| cell | Questions only the retrieval branch answers correctly | Skipping these questions gives accuracy back |
| cell | Both specified branches wrong in the paired evaluation | Selection cannot repair these fixed outputs; other policies or new generations may differ |
| Classifier-based gate | Predict retrieve/skip from query features or an acquired hidden state | Query-only can act before prefill; hidden-state gating must obtain or reuse prefill |
| Discriminative model | A model predicting a class or score rather than a free-form answer | Can be inexpensive; validate latency and calibration rather than assuming either |
| Large Language Model (LLM) | The generator whose weights and hidden states support answering | Its competence boundary determines useful routes |
| Hidden state | An activation produced while the generator processes the prompt | Includes model-specific features, but requires state acquisition and is not certified self-knowledge |
| Frozen model | A model whose weights stay unchanged while small probes train | UAR adds control without retraining the generator |
| Confidence-based gate | Thresholds a competence proxy, model score or draft-based estimate | Timing depends on the signal; a full draft is not inherent to every confidence gate |
| Token probability | The model-assigned conditional probability of a token | Not a calibrated probability of truth; useful confidence requires task-specific validation |
| Perplexity | A scalar derived from how surprising tokens are to a model | It is a possible confidence signal, not a truth detector |
| Entity popularity | A query-side proxy for how likely a fact appeared in pre-training | It is available before generation and supported adaptive retrieval in PopQA |
| Self-reflective gate | A model-produced control requesting retrieval or critique | May occur before a full answer or later in generation; charge the work already performed |
| Control token | A special generated token that changes the pipeline action | It lets the generator request retrieval itself |
| Prefill | Processing prompt and retrieved context before token generation | Retrieved chunks can make this stage expensive |
| Decode | Generating output tokens one step at a time | A confidence gate may pay a full draft decode before deciding |
| Floating-Point Operation (FLOP) | An arithmetic-operation count | Measures arithmetic work, not memory traffic, wall time or monetary cost |
| 16-bit floating-point (FP16) | A compact weight format used in the decode estimate | The 7B example occupies at this precision |
| High Bandwidth Memory 3 (HBM3) | Accelerator-memory technology in a stated byte-rate example | Byte rate supplies a weight-stream component or bound, not full decode latency |
| bfloat16 (BF16) | A sixteen-bit format with a separately stated peak device rate | Peak arithmetic division omits actual utilization, weight reads and kernel latency |
| Unified Active Retrieval (UAR) | Four binary probes composed into a retrieval decision tree | It separates intent, knowledge, freshness, and self-knowledge |
| Intent-aware probe | A test for whether the instruction seeks external knowledge | It skips creative or formatting tasks that do not need facts |
| Knowledge-aware probe | A test for whether world knowledge is required | It skips pure reasoning over text already present |
| Time-aware probe | A test for whether the answer can become stale | It retrieves current facts even when the model is confident |
| Self-aware probe | A test for whether this model already knows a stable answer | It can skip retrieval for known facts |
| Multilayer Perceptron (MLP) | A small feed-forward classifier | UAR uses one lightweight probe per criterion |
| Logit | An unnormalized class score | A score gap is not automatically a calibrated risk or input-distance measure |
| Boolean composition | A stated rule using AND, OR and NOT on predicted bits | Preserves chosen logical precedence, not the truth of noisy predictions |
| Cascade | Stop later checks when an earlier verdict is terminal | Serial early exit can save work even when per-check costs are equal |
| Conditional termination rate | Termination probability conditional on reaching a gate in the current order | Valid for the current-order expectation; changes after reordering can change the rates |
| Hit-rate per unit cost | Stopping probability divided by positive evaluation cost | Local exchange criterion for interchangeable verdicts after the same prefix; static optimal sorting needs more assumptions |
| Source routing | Select a permitted subset of sources for the current request | Can reduce calls and transfer but does not itself deduplicate evidence or guarantee recall |
| Broadcast | Query every permitted source in the chosen baseline | Avoids source-selection omission, not all retrieval misses; duplicates and fusion remain separate choices |
| Fan-out | Issue multiple source calls, possibly concurrently | Wait-for-all retrieval follows a maximum plus overhead; cancellation/timeouts change the path |
| Tail latency | High quantiles or budget-exceedance probability of latency | Independent source tails give a union formula; correlated tails need their joint law |
| Source-selection accuracy | A defined measure of source selection relative to useful evidence | Unchosen sources require audits or controlled exploration to measure omissions |
| Cross-source duplication | The same document appearing in several stores | Copies consume context slots and create false agreement |
| Lineage | Provenance linking copies, common origins and effective versions | Collapse copies without discarding distinct authoritative versions or treating them as independent votes |
| Heterogeneous stores | Sources with differing corpora, models, filters or score distributions | A shared model does not by itself make scores calibrated across stores |
| BM25 | A lexical ranking function whose score depends on collection statistics | Equal scores from different stores need not mean equal relevance |
| Cosine similarity | The angular similarity used by many embedding systems | Different models can occupy different effective score ranges |
| Pointwise cross-encoder | Scores query-document pairs without explicit list-level redundancy control | May give duplicates similar high scores; does not necessarily promote every near-copy |
| Reciprocal Rank Fusion (RRF) | Combine ranks without directly comparing raw score magnitudes | An alternative to raw-score calibration, not a guarantee of relevance, recall or deduplication |
| Metadata filtering | Narrowing candidates inside a chosen store | It cannot recover a store that routing never opened |
| Source abstention | Choose no source or a no-relevant-source outcome under a tested rule | Can avoid weak evidence, but low scores alone do not prove every source irrelevant |
| Descriptive controller | A classifier that outputs properties of a query | Its label still needs a separate action policy |
| Prescriptive router | A controller that directly outputs the operation to execute | It closes the gap between description and behavior |
| Label space | Descriptions a classifier can emit | Four binary criteria allow up to patterns; not all need be feasible or observed |
| Action space | The set of operations the system can execute | The chapter’s router uses five concrete actions |
| Hand-written policy | An explicit mapping from properties to operations | Can be valid and small; missing properties and large products can complicate maintenance |
| Action label | A route selected from observed outputs and a stated cost/scorer | Define ties, all-failed cases, execution randomness and the producing system version |
| Bidirectional Encoder Representations from Transformers base model (BERT-base) | An approximately -parameter encoder | Its short-query arithmetic can be small; compare measured end-to-end latency on matched hardware |
| Softmax | Normalize logits to nonnegative class scores summing to one | Probabilistic form does not imply calibration, OOD reliability or literal geometric distance |
| Reason without retrieval | Reasoning over available inputs; in this action set, no retrieval | A reasoning method may also be combined with retrieval in other policies |
| Query rewrite | Turning an underspecified follow-up into a self-contained search query | It restores terms that lexical and dense retrievers can match |
| Query decomposition | Split an information need into focused subqueries | Can change coverage and cost; gains and dependence must be measured |
| Margin threshold | A cutoff on a defined route-score or logit difference | Can trigger a fallback after validation, but is not inherently a calibrated error probability |
| Query stratification | Classifying what kind of information the corpus must supply | It reveals which pipeline changes can raise the ceiling |
| Level 1 explicit facts | One written passage contains the answer | Chunk retrieval and reranking can solve it |
| Level 2 implicit facts | Combine evidence facts to support an answer | Decomposition or iteration may help; a single colocated result can also suffice |
| Level 3 interpretable rationales | A written procedure or rationale supplies relevant steps and exceptions | Preserve needed context and authority; the whole manual is not always necessary |
| Level 4 hidden rationales | Examples may reflect an unwritten decision process | Case retrieval helps only if representative evidence and governance support the inference |
| Joint coverage | The chance every required fact reaches usable context | needs independent capture events with common marginal , not merely distinct required facts |
| Parent-document retrieval | Matching a chunk but returning its full document | It preserves multi-step procedures that chunking would cut apart |
| Exemplar selection | Retrieving prior cases to guide a new decision | It is the relevant form of retrieval when no rule is written |
| Outcome match | Evaluate selected cases against appropriate held-out outcomes | Outcome similarity alone does not establish authority, fairness or generalization |
| Adaptive-RAG | A three-way router over no retrieval, single-step retrieval, and multi-step retrieval | Its main contribution here is executable supervision |
| Silver label | An automatically produced, potentially noisy training label | Execution can yield model-specific observed-policy labels; not an annotation-impossibility theorem |
| Policy execution | Run a complete versioned pipeline on a labeled question | Observes one scored outcome and cost; repeat trials where success is stochastic |
| Hop count | A defined count of retrieval/reasoning steps for a policy or task | Dataset structure and minimal reliable model-specific route are different quantities |
| Multi-step loop | Repeated retrieval/generation under a specified stop rule and cap | Cost depends on output length, accumulated prompts, caching and final-answer accounting |
| Source-corpus bias | A source-dataset-based heuristic for all-failed execution cases | May retain difficult examples, but must not be called an observed successful route |
| Class prior | The fraction of labels assigned to each route | It inherits the benchmark mix and may not match production |
| Reinforcement Learning (RL) | Optimize a policy from stated sampled rewards and costs | A gold scorer can supply reward in training; unlabeled production traffic need not have it |
| Out-of-distribution (OOD) query | A query unlike the router’s training inputs | The router can classify it confidently and silently choose the wrong plan |
| Decision boundary | A surface separating predicted classes | Softmax confidence is not general geometric distance; a binary linear relationship needs a fixed norm |
| Training centroid | A prototype of familiar query embeddings | Distance is an additional fallible diagnostic, not statistically independent proof of novelty |
| Cluster radius | A specified scale of dispersion around a prototype | Define its metric and estimator; no universal radius threshold certifies OOD safety |
| -nearest-neighbor (-NN) distance | Distance to nearby reference examples | Can represent multiple modes but still has coverage, metric and high-dimensional limitations |
| Under-routing | Sending a hard query to a cheaper, insufficient branch | It can cause a wrong answer that downstream stages cannot recover |
| Over-routing | Use a higher-cost route when a cheaper one would suffice | Can waste work, introduce bad evidence or violate constraints; not inherently harmless |
| Cost-sensitive threshold | A decision rule using calibrated event probabilities, route benefit/harm and commensurate costs | The simple ratio threshold assumes perfect rescue and no new harm |
| Branch share | The fraction of traffic assigned to each route | It is observable without production route labels and can expose shift |
| Distribution shift | A change in inputs, sources or other relevant deployment conditions | May break learned assumptions or calibration; not every shift necessarily does so |
| Corrective Retrieval-Augmented Generation (CRAG) | A system with a trained evaluator in front of retrieval decisions | It illustrates the shared OOD weakness of supervised controllers |
| , , and | Closed-book correctness, retrieval correctness, and the binary retrieve decision for query | They define the retrieval-gating objective |
| , , , and | Gate, retrieve-only, closed-book and explicitly defined oracle accuracies | Distinguish conditional-mean and realized-outcome ceilings; estimate uncertainty |
| Set of queries on which a real gate skips retrieval | Its intersections with and determine accuracy gained and lost | |
| , , , and | External intent, world-knowledge need, time sensitivity, and model self-knowledge bits | UAR composes these distinct predicates instead of learning one opaque label |
| The binary retrieval decision of the chosen UAR composition | Noisy inputs can still produce a wrong route | |
| and | Acquired prompt hidden state and its vector width | Share valid prefill state where possible; include its incremental cost |
| , , , and | Gate cost, current-order conditional termination, gate count and expected work | Common-prefix stopping-per-cost gives a local exchange test under verdict-preserving conditions |
| , , , and | Source count, store, indexed-unit count and selected-source subset | Catalog size differs from actual ANN visits and from request latency |
| and tail probabilities | Per-source latency and budget-exceedance probability | Use wait-for-all semantics and a joint tail law; independence is an additional assumption |
| , replication , and | Result slots, maximum duplicate-group size and distinct count | Maximum group size implies at least distinct objects, not equality |
| A precisely labeled query-conditioned source-usefulness target | Need not equal static authority; learn/calibrate against the downstream objective | |
| , , , , , , and | Query, property/action spaces, descriptive/prescriptive maps, label and policy | Count feasible source-free actions and source subsets; a naive product can miscount |
| , per-fact , pooled , and decomposed | Required facts and stipulated marginal capture probabilities | General joint coverage uses conditional probabilities; independent common marginals give powers |
| Policies , , and | Direct, one-retrieval and capped multi-step pipelines | Choose a cheapest observed success only for a nonempty successful set |
| , , , , , , and | Gold answer, policy set/output/cost, silver label, loop cap and router | Version the producer, define cost units, break ties and distinguish unsuccessful fallbacks |
| , wrong-answer loss , , and | Needed-route probability, error loss, added cost and decision threshold | Compare utilities in common units; validate benefit, harm and calibration |
| OOD fraction and retrieval lift | Replaced traffic share and router disadvantage within the shifted slice | Exact mixture gap is , where is the original ID advantage |
| Text-to-Text Transfer Transformer (T5) | Encoder-decoder family used by the Adaptive-RAG router and CRAG evaluator | It shows that these controllers are trained models, not score thresholds |
| Forward-Looking Active Retrieval augmented generation (FLARE) | Mid-generation retrieval triggered by low token confidence | Its signal arrives only after generation has begun |
| Self-RAG | A system whose model emits retrieval and critique controls | It is another supervised controller exposed to distribution shift |
| RAGRoute | A learned source router in the chapter-reported comparison | Its reported aggregate reductions do not independently establish OOD failure rates or a source-affinity explanation |
| Interleaving Retrieval with Chain-of-Thought (IRCoT) | A method alternating reasoning and retrieval | Its reported gains do not determine the toy per-fact coverage assumptions |
| Approximate Nearest Neighbor (ANN) search | Approximate indexed neighbor search | May avoid exhaustive scanning; visited work and recall depend on implementation and data |
| Hierarchical Navigable Small World (HNSW) graph | An approximate vector index often efficient in practice | No universal corpus-size-to-latency bound or speedup follows from its catalog sizes |
| Generative Pre-trained Transformer 4 (GPT-4) | Model used to produce reflection labels in the Self-RAG example | Distillation transfers its label blind spots into the critic |
| Medical Information Retrieval-Augmented Generation Evaluation (MIRAGE) | Medical benchmark used in the source-routing measurements | It grounds the reported query, transfer, and accuracy changes |
| PageRank | A query-independent recursive link-authority score in its standard form | Query-conditioned variants exist; authority alone does not establish query relevance |
| Binary cross-entropy | A loss applied to binary targets, possibly one target per source | Separate binary heads or summed losses do not prove statistical independence of source events |
| Mutual information | A dependence measure for a stated joint distribution | Marginal association can reflect query mix; choose joint versus factorized heads by held-out quality and cost |
Core mechanics
Mathematical conventions
Probabilities and accuracy are fractions unless followed by ; a change from to is three percentage points. Use natural logarithms and decimal storage units, with and . Retain full precision until rounding. The compute proxies are and , with sustained arithmetic rate where specified. An fp16/bf16 weight-stream component is at byte rate . A simple roofline-style proxy compares both components through ; attention, cache traffic, kernels, communication and scheduling can change the actual execution time. Neither component by itself is measured wall time. A separately stipulated encoder latency must not be replaced by its much smaller arithmetic component. Billing, work, critical-path latency and tail latency have different units and denominators. Distinguish an oracle over conditional expected accuracies from an oracle that sees realized outcomes of both branches. Binary outcome tables concern a specified paired evaluation, generator/corpus/prompt versions, decoding policy and scoring rule. Their empirical headroom need not be attainable by a query-only classifier. Treat reported study percentages and hardware specifications as inputs, not mathematical guarantees. All routing policies remain subject to provenance, privacy, residency and tool-permission constraints.
25.1 When to retrieve: classifier, confidence, and self-reflective families
What it is
Let and be closed-book and retrieval-branch correctness probabilities for fixed system versions and a stated scoring rule. Let choose retrieval. If the gate uses additional features, condition both correctness models on that same available information. With branch randomness averaged under the prescribed decoding law,
Always retrieving has expected accuracy and never retrieving has . An oracle that knows the conditional means achieves ; its gain is , where . For a specified joint pairing of realized binary outcomes, define , , and . An outcome-clairvoyant oracle reaches and gains exactly over always retrieving. In general ; equality is not automatic. For example, with the same observable input and independent branches each correct with probability , the two ceilings are and . A real gate cannot observe future decoding outcomes. The cell-based examples below concern fixed paired outcomes; their attainable accuracy must still be measured.
Why it exists
The chapter cites Mallen et al.'s PopQA result as evidence that retrieval can turn correct closed-book answers into errors, giving a roughly harm figure and reporting harm for popular facts. Verify that study's denominator, model and setup before treating its percentage as a population cell mass: a percentage conditional on closed-book success is not an all-query . The worked below is an explicit scenario assumption, not a transferred estimate. Popularity may help predict useful retrieval, but is neither a correctness guarantee nor a substitute for current evidence.
Failure without it
Skipping saves resource cost without changing paired accuracy; skipping improves it, skipping worsens it, and skipping leaves it wrong. “Easy” questions can belong to more than one cell. The exact paired-score change is . A gate should optimize this trade-off together with costs and required grounding, rather than treating confidence or difficulty as the objective.
Signal families and timing
Classifier gates can use the query before generator work or a frozen generator's hidden state after prefill. A hidden-state signal is pre-answer, not pre-compute. Confidence signals also vary: popularity is available before answering, next-token entropy requires logits and usually prefill, and a draft-based confidence estimate incurs the draft's work. Confidence is not simply fluency; it can be useful when calibrated for the relevant event, but may be wrong or miscalibrated. Self-RAG's retrieval token can occur before a full answer, while FLARE-style triggers occur during generation. Repeated sentence-level checks have their own accumulated cost. Compare specific implementations and valid cache reuse, not an inherent timing hierarchy among the family names.
Cost and worked example
The constructed system serves queries daily with parameters. Set the fixed paired-outcome cells to , , , . Always retrieving scores , closed-book , and the outcome-clairvoyant oracle . A hypothetical popularity gate skips of all queries, including six percentage points from and three from . Its score becomes , recovering of the ten-percentage-point headroom. The closed-book prompt has tokens; five retrieved chunks of tokens give a -token RAG prompt. Daily prompt work changes from to tokens, a reduction. Embedding, ANN search and reranking take stipulated serial times . Extra-prompt arithmetic is , making the combined retrieval proxy . At the stated skip rate the avoided mean is ; charging a stipulated classifier leaves saved. A -million-parameter encoder on tokens has a forward proxy FLOPs, or at . That component does not establish its wall time; the allowance is a separate assumption. The fp16 generator has of weights. At , streaming them once per token costs per token. A thirty-token draft therefore has a streaming component. If every query pays this additional draft and no draft output replaces later answer generation, mean net saving is . If the draft instead supplies the complete closed-book answer on skipped queries, its additional decode work may be charged only to the remaining under a matched common-answer budget. That changes the extra draft component to and the proxy to , before differing answer lengths, draft prefill and validation. Retrieved context can invalidate reuse of a draft's prefix states. Benchmark the actual implementation. Neither case proves that all confidence gates lose. Use the reconciled saving and no-reuse penalty, not the unsupported summary.
Practice decisions and limits
Evaluate both branches on representative production queries, retaining paired outcomes, attempt counts, scoring rules and system versions. Estimate and for that setup, and evaluate the learned gate independently; an empirical oracle ceiling is not an attainable guarantee. A stronger generator or a changed corpus can change either cell. Account for a false retrieval call's latency, money, possible answer harm and compliance risk. Use query features before generation where adequate; include shared generator prefill when probes need it. Deploy a fallback appropriate to the permissions and loss function, not a universal “retrieve on every doubt.” Preserve required evidence even when the model appears to know the answer.
25.2 Unified Active Retrieval: four criteria as a decision tree
What it is
Let binary criteria , , and indicate external-knowledge intent, need for world knowledge, time sensitivity and sufficient stable self-knowledge. Under this chosen UAR policy, the retrieval decision is
First skip if external intent is absent; otherwise skip if no world knowledge is needed. Retrieve for a time-sensitive request. For a stable request, skip only if the self-knowledge criterion is positive. This tree is one implementation of the Boolean rule; it prioritizes freshness over self-knowledge. Its bits are predictions whose errors can still produce a bad decision.
Why it exists
A skip label alone does not distinguish missing external intent, no need for outside facts and sufficient stable knowledge. Separately supervising these criteria can provide a useful inductive bias; it does not prove the criteria are statistically independent or that they are the unique necessary decomposition. A probe can read a frozen model's final-prompt hidden state, but obtaining that state entails generator prefill unless already available and validly reusable. Shared representations do not certify introspective self-knowledge; simpler query/metadata features may suffice for some decisions.
Failure without it
An intent-only gate may retrieve roadmap text for a limerick. A self-knowledge-only gate may preserve an obsolete office holder because the model remembers the name confidently. The chosen Boolean policy handles those cases differently. “Freshness before memory” is a precedence rule for this policy, not a theorem about all classifiers. If all bits are precomputed, the order of an OR expression changes no logical value. A frozen corpus does not imply a timeless domain: it may contain stale facts, and a current-world question may require a permitted fresh source or abstention.
Cost and ordering
A probe with input width , hidden width and two logits has matrix weights. Including biases gives parameters. At two FLOPs per multiply-accumulate, its linear-layer work is FLOPs; four probes use FLOPs, omitting nonlinearities and other overhead. A 7B forward-token proxy is FLOPs, so the four-probe arithmetic ratio is , or of that one-token work—not of end-to-end latency. For scale, acquiring a -token hidden state with the same generator has a -FLOP prefill proxy, of arithmetic; whether it is incremental depends on the actual reuse path. For a serial cascade, let be gate evaluation cost and . With deterministic costs, the chain rule gives
Conditional termination rates make this expectation valid without independence, provided they are measured for the actual order. They cannot in general be reused unchanged after reordering correlated gates. For interchangeable terminal predicates that preserve the same overall verdict, compare two candidates after a common prefix. If their stopping probabilities under that prefix are , the local costs are versus . The first is no larger exactly when , for positive costs. A universal static sort needs additional stability assumptions, such as independent terminal events; arbitrary UAR criteria are not all interchangeable because some terminal verdicts differ. Equal-cost gates still save arithmetic with serial early exit: fewer gates are evaluated on stopped queries. Running all four probes in a batch may instead have lower wall time by exploiting parallelism. That scheduling trade-off is not “no work saving.” Measure prefill, weight reads, launch overhead and elapsed time in addition to FLOPs.
Worked example
The example serves prompts daily. A retrieval adds tokens and a stipulated : embedding, ANN search, reranking and extra prefill. Input billing at per million tokens gives per retrieval and daily for always retrieving. Let the actual-order conditional termination rates be , , . Gate 1 skips queries; gate 2 skips of survivors; gate 3 retrieves for of . Gate 4 skips and retrieves for of the remaining : skips and retrievals. Total retrieval rate is . Retrieved-token billing becomes daily, saving per day or over days. Retrieval-only mean latency is before incremental gating costs. Evaluating all four probes on every prompt uses . Dividing by the cited A100 dense-BF16 peak of gives of ideal arithmetic, or at one percent of that rate. These are not accelerator wall times: probe weight traffic, state acquisition, kernels and utilization are omitted. Serial early exit evaluates an expected probes per query. Its linear work is , below evaluating all four, despite equal per-probe costs. If the last criterion instead uses a sixty-four-token draft, its forward proxy is per reached query. Only reach it, giving of expected draft work per original query; the first three cheap probes add about . The combined daily total is about FLOPs. Thus “ GFLOPs” is a per-query expectation, not a daily total. The last decision always terminates routing, but that does not mean its prediction is always correct. Gate 1's termination-per-linear-cost ratio is per MFLOP, versus for that draft, a ratio of about . This is an illustration of conditional compute avoidance, not a proof that all four UAR tests may be reordered.
Practice decisions and limits
Version the probes with their generator, tokenizer, state extraction, prompts and data. Revalidate after changes rather than promising “fail closed” by invoking an unpermitted or low-quality source. A time-sensitivity criterion can be constant only when the allowed questions and source freshness justify it, not merely because a corpus snapshot is frozen. A structured self-knowledge verdict may require fewer generated tokens than a full draft, but remains a fallible prediction. Compare accuracy, calibration, token billing, prefill reuse and elapsed latency for the chosen implementation.
25.3 Where to retrieve: source selection, conflict, heterogeneity
What it is
Let stores have indexed units, and let be the permitted sources selected for query . Broadcast issues source calls; routing issues . Their covered catalog sizes are and . These are indexed-unit counts, not the number of vectors an ANN algorithm actually visits. Calls may run in parallel, so call count is not a sum of serial round-trip latencies. Source selection can precede within-store formulation, but the useful order and shared features depend on the architecture.
Why it exists
Residency, permissions and contractual rules can exclude stores before relevance is considered. Other stores impose per-call charges, bulk-export restrictions, stale replicas or incompatible scores. A source-level target might be , with “useful” defined for the downstream answer and available budget. It is not a static popularity leaderboard or necessarily a calibrated probability. Document counts and citation totals alone do not identify per-query usefulness. Standard PageRank is a query-independent recursive link-authority signal; personalized or topic-conditioned variants are different models. Neither raw inbound-link counts nor recursive authority alone proves source credibility or relevance.
Failure without it
If a request waits for every selected source, its parallel retrieval latency is approximately the maximum source latency plus shared overhead, subject to deadlines and cancellation. With independent per-source budget-exceedance events of probability , the request exceeds that budget with probability . At , six calls give and two give . Without independence, the union probability lies between and ; perfect correlation can eliminate the purported fan-out multiplier. If one document occupies of slots and every other slot is unique, the number of distinct documents is . If every duplicate group has at most members, the distinct count is at least , not necessarily equal to it. With and a maximum group size of three, the distinct count can range from four to ten. Separate exact duplicates, policy families and distinct effective versions before counting evidence. Copies are not independent votes. A pointwise reranker may give copies similar high scores, but need not promote every near-copy identically. Raw scores across stores need calibration or an explicitly justified common scale. BM25 depends on document frequencies and length normalization: in a short wiki need not mean the same relevance as in a long-PDF collection. Cosines from different embedding models—or differently distributed stores using one model—are not automatically comparable relevance probabilities. Relevant-pair means near and illustrate that risk; their nominal cosine range alone does not fix it. Rank fusion can avoid directly comparing score magnitudes, but does not guarantee correct rankings or remove duplicate votes. Unopened stores provide no observed relevance evidence, so measure skipped-source recall through audits or controlled exploration.
Reported measurement
The chapter reports RAGRoute results on MIRAGE medical question answering and MMLU: fewer source calls, less transferred data, and accuracy moving from to . The accuracy change is percentage points; without sample sizes, paired outcomes and uncertainty it is not evidence of a statistically significant improvement or exact equivalence. If the call reductions have a common workload denominator, broadcast uses times as many calls. The four-corpus fan-out interpretation needs the additional checks in section .
Worked example
The six-store toy catalogs contain , , , , and chunks, totaling . Call the first two stores (human-resources wiki) and (Singapore portal). Each source returns twenty candidates averaging tokens. Broadcast issues six calls, returning candidates and transferred tokens. Routing to issues two calls, returning forty candidates and tokens: a reduction in candidates and transfer. Parallel call latencies need not fall in the same proportion. The selected catalogs have indexed vectors; the catalog-size ratio is . It is neither a search-latency estimate nor a universal upper bound on search savings: index topology, filters, caches, hardware and recall targets determine actual work. Assume the reranker processes pairs per second at a fixed -token query-document window. The nominal reranking service work is versus , a difference before other work. The -token transferred chunks must be windowed or truncated for this assumption; missing relevant text can change quality. A rate measured at tokens cannot silently be applied to full longer pairs. For the final ten slots, suppose four hits belong to one policy family: three are copies of its old version and one is an amendment. Six other slots are unrelated unique documents. This gives seven policy families but eight distinct versioned source objects—not seven distinct versioned documents. A raw vote is three stale hits to one amendment. Grouping identical old copies leaves one old version and one amendment, not independent witnesses of equal authority. Select the amendment only if its provenance and effective/supersession metadata establish that it governs this question; recency alone need not trump an older contract or ruling. Deduplicate and resolve version lineage before using agreement, regardless of whether source routing was used.
Practice decisions and limits
The source suggests broadcast for homogeneous, permitted, in-region stores; that is a workload heuristic, not a threshold proved by the fan-out equation. Route sooner for billed, restricted or tail-dominating sources. Deduplicate exact copies with provenance keys, but retain legally or technically distinct translations, jurisdictions, effective versions and amendments. Rank fusion such as RRF with constant is an option for heterogeneous lists; do not confuse its constant with context depth . Reserving at least one slot per selected store requires and can displace better evidence. A shared scorer or embedding model does not by itself establish cross-store score calibration. Stamp chunks with source, ingest time, effective date, authority and version relations. Surface unresolved conflicts. Permit a no-relevant-source or clarification/abstention branch when warranted; a low source score is not proof that all sources are irrelevant. Within-store metadata filtering cannot recover an unqueried store. In the source's seventh-store scenario, a -million-document billed partner interface and residency restrictions motivate unrestricted replication where allowed and live federation for the restricted European slice. Permission enforcement is a hard constraint, not a learned relevance trade-off.
25.4 Query routers: descriptive versus prescriptive
What it is
A descriptive controller maps to properties ; a prescriptive router maps it to an action . Four binary properties admit at most bit patterns, not necessarily sixteen feasible or observed semantic classes. This chapter considers five actions: answer directly, reason from the supplied information without retrieval, retrieve as issued, rewrite then retrieve, and decompose then retrieve. Choosing a non-retrieval action also resolves whether to retrieve, but computing that action decision is not free. Conversely, a retrieve/skip bit does not identify the right retrieval operation.
Why it exists
“Needs external knowledge” can fit as-issued retrieval, rewriting or decomposition. Ambiguity, evidence structure, context and system capabilities affect the choice. A small hand-written policy may be appropriate when these distinctions are explicit and tested; it is not automatically baseless because it uses descriptive labels. Direct action supervision is useful when the available actions can be executed and their final answer quality and costs evaluated. Select a cheapest observed successful operation with tie and failure handling, rather than treating descriptive classification as equivalent to prescriptive optimization.
Failure without it
A follow-up such as “what about the second one” can lack standalone referents and need dialogue context or clarification before retrieval. A fully specified arithmetic problem can need reasoning over its supplied facts rather than outside documents. An action set containing only “retrieve as issued” cannot express these distinctions. Other retrieval variants may help a follow-up, so it is not true that all retrieval-only dispatchers necessarily fail it; the limitation is the chosen operations and context, not the descriptive label format itself.
Cost and alternatives
A five-way BERT-base classifier has roughly parameters. At , a thirty-two-token query has FLOPs and a arithmetic component at . The model still has to move weights and activations and launch kernels. An 8B bf16 generator has of weights; at its single-sequence weight-stream component is per decoded token, or for five tokens, before its prompt prefill. The roughly thousand-fold ratio between these different components is not an end-to-end encoder-versus-generator latency result. A comparison with a separately stipulated encoder is on a different, still conditional footing. A generator can expose logits or class-token log probabilities when its interface supports them; generated routing labels do not inherently lack a score distribution. Sampling-based scores and calibrated action probabilities require their own design. A router can use a separate generation model or adapter without modifying the answer generator. A fixed softmax can enumerate hundreds of known tools; its trade-off is closed-set supervision and updates for changing catalogs. A generative or retrieval-based router can support dynamic tool descriptions, but still needs permission checks, evaluation and cost accounting.
Worked example
For the 8B example, Query A asks the capital of France and is assumed suitable for direct answering. Its thirty-two-token prompt proxy is FLOPs, or of arithmetic; five output tokens add of weight streaming, for a partial serial estimate . Query B gives four animals with ten legs. If every animal is either a two-legged chicken or a four-legged rabbit, and yield . Without that species/leg assumption, the question is underdetermined. Fetching five four-hundred-token chunks adds prompt tokens and of arithmetic under the same 8B proxy, not a guaranteed distractor penalty or measured latency. Query C is an ambiguous follow-up; a twenty-token rewrite has a streaming component before retrieval, plus rewrite prefill and validation. Query D compares two Frankfurt data-center renewal dates; a two-subquery policy can spend two retrieval calls and two extra-prefill components. Parallel subqueries may overlap those components, so their sum is work, not necessarily critical-path latency. Ignoring quality changes, an arithmetic-only diversion threshold is . With a stipulated encoder latency and the same avoided-prefill proxy, the fraction is instead . Neither is a valid business break-even if routing makes new errors or changes other costs. A -million-parameter cross-encoder over one hundred -token pairs processes positions, eight hundred times thirty-two. Its linear proxy is FLOPs or of arithmetic. Attention-length effects mean total FLOPs are not exactly proportional to that position ratio.
Practice decisions and limits
Prefer a small supervised action space when it can be evaluated reliably; a descriptive policy remains an option while labels are limited. Include non-retrieval operations unless the product requires corpus grounding for every answer. A small logit margin can trigger a risk-appropriate fallback, but is not a calibrated probability of answer failure. Extra retrieval can corrupt an answer or breach a permission boundary, not merely add a bill. Grade final answer quality, asymmetric error costs, resource use and compliance. A reported routing accuracy can coexist with worse answers because confusions have different consequences. Count feasible joint decisions before estimating supervision. If all five actions independently choose exactly one of sources, the product has labels, but this needlessly sources the two non-retrieval actions. With two source-free actions and three retrieval actions choosing exactly one source, there are possibilities. If each of the latter can select any nonempty source subset, there are before other constraints; decomposition can have a richer policy space still. Factorized or multilabel source prediction need not enumerate every subset as a softmax class. Compare separate and joint heads by held-out quality and cost. Marginal mutual information between action and source can reflect the query mixture; it is not by itself a proof that one architecture is better or that conditional dependence is absent.
25.5 Query stratification: four levels of information need
What it is
The level describes a query-and-corpus pair. Level 1 needs an explicit answer fact; Level 2 combines several facts; Level 3 applies a written procedure, rationale or regulation; Level 4 infers an unwritten decision policy from examples. The same question can change levels when documentation changes. These are useful design categories, not a mathematically exhaustive or mutually exclusive ontology. A case collection may support predictions without uniquely identifying the hidden policy or justifying its use for a new person or jurisdiction.
Why it exists
Retrieval tuning can improve all four levels, but different failures need different remedies. Fact coverage matters for Levels 1 and 2; preserving relevant steps and exceptions matters for Level 3; representative cases, outcome labels and policy identifiability matter for Level 4. Better retrieval cannot manufacture evidence that the corpus does not contain, yet it can improve the selection of procedures or exemplars. One chunk size, depth and reranker need not address every information need. No theorem here says retrieval has zero possible benefit at Levels 3 and 4.
Coverage mechanics
Let mean that required fact reaches the usable context, for facts. The general identity is . Distinct required facts do not imply independent retrieval events. If those events are independent with common coverage , joint coverage is . With , it is . With only equal marginals and no dependence assumption, the bounds are , giving to in that example. Under the independent common- scenario, achieving joint coverage at least for three facts needs . Raising from to raises joint coverage from to , a fractional gain, or percentage points. Ten context slots do not guarantee equal allocation across three facts: a chunk can contain multiple facts, several chunks can duplicate one, and dependencies affect coverage. Answer correctness additionally requires interpreting the retrieved evidence.
Worked example
The toy corpus has chunks of tokens, totaling tokens. At , Level 1 uses retrieved tokens with stipulated single-fact coverage . A Level 2 query about Tier-2 products and an EU minimum needs three facts. Assume independent pooled per-fact coverage , giving . A decomposed policy is separately assumed to reach per fact, giving joint coverage: a factor , not a general benefit guaranteed by decomposition. Three top-ten searches return thirty raw chunks and tokens before deduplication, overlap or further selection. For Level 3, a nine-step procedure spans nine -token evidence chunks, or tokens in this accounting. Returning it as a parent unit plus six other chunks uses tokens. This is a changed evidence unit and budget, not ten unchanged -token slots. If the physical chunks overlap, count unique assembled tokens and repeated prompt tokens separately. Level 4 retrieves eight resolved tickets averaging tokens, or tokens. Such cases need representative outcomes, relevant exceptions and privacy controls; they do not necessarily determine a unique rule. With traffic proportions , mean retrieved context is tokens, times the level-blind -token budget. The remaining of traffic is non-Level-1; the mix alone does not prove the baseline fails all of it or that the new policy repairs it. The chapter reports IRCoT gains up to twenty-one retrieval percentage points in its own setup. That result does not establish the toy's change. As an independent sensitivity assumption, taking pooled coverage gives and ratio . Do not treat this sensitivity as a reproduced empirical effect.
Practice decisions and limits
The source suggests labeling two hundred production queries by level as an initial diagnostic, not a confidence guarantee. Multiple evidence dependencies can motivate decomposition, while reliably colocated facts can favor parent-document retrieval or one search; alone is not a necessary or sufficient routing rule. Preserve fine fact chunks and larger procedure units where appropriate. The source's -token chunks with overlap need not preserve a nine-step procedure. A procedure fits one such chunk only if it fits its actual usable capacity; “under four hundred tokens” does not imply it fits two hundred. A larger parent unit is a separate choice. Evaluate case selection with held-out outcomes and policy/ethical constraints, and document a rule when it can be justified. Report quality and abstention separately by level. A slice below of traffic can still dominate risk and cannot be discarded merely for being rare. The source's one-week, failing-slice scenario motivates labeling two hundred failures before choosing new infrastructure; sample requirements depend on the decision and uncertainty.
25.6 Adaptive-RAG and silver-label supervision
What it is
Adaptive-RAG selects among A (no retrieval), B (one retrieval) and C (a retrieve-and-reason loop capped at iterations). For fixed system versions, let be the output for query and execution randomness , and let be a specified measured or modeled cost. The illustrative configuration orders nominal costs A, B, C, but real costs can vary with length, early stopping and scheduling. With gold answer , form the observed successful set . Exact match is a declared scoring convention, not universal truth or complete semantic correctness. For a nonempty set,
Break cost ties by an explicit rule. If no tested policy succeeds, there is no cheapest successful policy; record “unsolved,” improve the policy set, or retain a clearly marked heuristic fallback. The source uses a dataset's single-hop/multi-hop bias as such a fallback. That label is not an observed success and should not silently be mixed into verified successful-policy labels. Repeated stochastic executions can estimate route success and cost more reliably than one lucky output.
Why it exists
Some QA datasets annotate supporting facts or reasoning structure, but they do not generally provide the minimal reliable route for each particular generator, corpus, prompt and tool configuration. A human cannot infer memorized model facts merely by inspecting the question; humans can still design and run tests. Execution changes that inference problem into an observed-policy evaluation, not an impossible annotation problem solved exactly. Run each candidate policy on each labeled training query, score the outputs, and retain costs, failures, ties and randomness. One trial needs policy executions per query; a multi-step policy can contain several generation calls. A router, including a small encoder-decoder, can learn these silver labels without independently proving that its chosen route will solve an unseen question. Freeze/version the producing system and relabel or revalidate after changes.
Failure without it
Always using a multi-step loop can waste substantial work on simple questions; one retrieval can miss bridging evidence. The magnitude is configuration-dependent, not inherently tenfold. Unsolved or noisy silver labels need separate accounting. A correct route label does not ensure final correctness when generation, retrieval, sources or inputs change.
Worked example
Assume serial service rates of decoded tokens per second and prompt tokens per second, plus per retrieval returning five -token chunks. Instruction and question use tokens. A generates answer tokens and takes . B takes . These are conditional service-time proxies, not measured request latencies. For C, specify the accumulated prefix. Each of iterations retrieves new tokens and generates tokens; take the last iteration's output as the final answer, so no extra final-generation call is hidden. Retain all previous retrieved text and generated outputs, and recompute the full prompt without valid KV reuse on each iteration. Iteration prefills tokens. Thus
At , prefill is tokens or , retrieval is and decode is , totaling — times B. The earlier proxy corresponds instead to dropping all previous generated reasoning from subsequent prompts: and . It is not the full retained-reasoning accounting. Valid append-only KV reuse, summaries, changed prompts or an additional final answer would require a different cost model. For silver-labeled queries, suppose a perfect label router chooses A/B/C in proportions . Its mean proxy is , versus for always C, a factor . Equal success to always C is an additional empirical condition, not implied by those proportions or single-run labels. Testing all policies uses generation calls per query, or calls. Decode alone takes serial service-hours, ideally hours at thirty-two-way independent capacity. Including the modeled prompts and retrieval across all policies gives service-hours, or ideal hours at the same capacity. Batching, dependencies, shared hardware and queues can prevent that ideal speedup. Human work at thirty seconds per query is annotator-hours but is a different activity and does not reveal model-specific memory without tests. The chapter's roughly tenfold reported multi-step timing cannot be reproduced from this five-iteration configuration alone. Solving the retained-prefix model for gives continuous ; integer eight and nine give and . That is a sensitivity check, not evidence that the reported experiment actually used those iterations.
Practice decisions and limits
Start with a small policy set that covers meaningful alternatives and evaluate whether added routes pay for labeling and data fragmentation. The source's dominant-class, roughly one-third unsolved and two-thousand-query relabel checks are workflow heuristics; imbalance alone does not require splitting a class, and an unsolved label is not a successful route. Version the generator, corpus, tools, prompts and scorer. Quantify uncertainty and confusion costs, not only changes in class frequencies. In the retained-reasoning example the A-to-B gap is , B-to-C is , and A-to-C is . A hypothetical routing accuracy says nothing sufficient about final answer quality. Under-routing can miss evidence; over-routing can waste work, introduce bad evidence or violate constraints. Favor a higher-cost route only when its expected benefit justifies its cost and risk. A product of three policies, two rewrite settings, three source choices and two rerank depths has nominal configurations, twelve times the number of policy executions if every combination is feasible and tested. Execution counts do not necessarily multiply actual service cost twelvefold because paths can differ or share work. Thirty thousand balanced labels would average per class before imbalance. Factorized supervision, sampled evaluations or a learned policy can reduce exhaustive enumeration. Gold-answer exact match can supply a verifiable training reward under that scorer; it is not automatically a reward available for unlabeled production traffic or a semantic-correctness oracle.
25.7 The out-of-distribution weakness every router shares
What it is
The chapter reports several learned controllers: CRAG's fine-tuned -million-parameter T5-large document evaluator, Adaptive-RAG's silver-label route predictor, RAGRoute's query/centroid network with binary cross-entropy, and Self-RAG reflection supervision distilled from GPT-4 judgments. These have different inputs, architectures, labels and timing; separate binary source predictions are not proof that source usefulness events are independent. Their common concern is that finite training/evaluation coverage does not establish reliable routing under every deployment shift. This is not a theorem that every router fails every OOD input or that all of these controllers are equivalent small classifiers.
Why it is different from retrieval failure
A bad retrieval result can sometimes be detected from weak evidence or generator abstention; a bad early route can prevent those checks from seeing the useful branch at all. Neither path is guaranteed to leave an obvious residual. The source's launch incident describes a two-percentage-point total accuracy drop after of traffic shifts to a new vertical, with the confidence histogram and mass above apparently unchanged. If only that slice changed and the other stayed identical, this would require a fractional, or fifty-percentage-point, degradation within the shifted slice. It is possible but large; without those conditions the aggregate numbers do not identify the cause. An unchanged confidence histogram does not establish unchanged correctness or calibration.
Cost-sensitive decision
Let be a calibrated probability that the expensive route is needed, the loss per wrong answer, and the incremental route cost in the same value units. In a simplified model where the cheap route fails exactly in the needed cases and the expensive route fixes all of them without causing new errors, escalate when , giving . If this threshold exceeds one, the extra route is never worthwhile under that simplified loss; thresholds also depend on the allowed actions. For a less ideal model, let be the expensive route's expected accuracy benefit conditional on “needed,” and its expected accuracy harm conditional on “not needed.” Choose it when . For , the decision boundary is , provided these conditional gains, costs and losses are applicable. More generally compare conditional expected utilities directly. Higher cost is not a safety guarantee. The monetary example separately assumes the expensive path costs ten times the cheap path, giving . A tenfold latency report alone does not establish tenfold dollar cost. Fifteen minutes of support at per hour gives , hence under the perfect-rescue/no-harm model. The symmetric threshold is times this threshold, not proof of that many times fewer escalations; actual escalation counts depend on the probability distribution and calibration.
Failure without an input-side gate
A softmax value is a normalized function of logits, not in general Euclidean distance to a decision boundary. For a binary linear logit , confidence is and signed boundary distance is for ; the relation depends on the weight norm. Nonlinear/multiclass models and arbitrary logit scaling further break a universal distance interpretation. A point can move arbitrarily far along a direction tangent to a linear boundary while keeping the same logit. Confidence therefore need not measure familiarity or remain calibrated under shift. An input-side distance can add another diagnostic, not a statistically independent or certified OOD detector. For normalized query and prototype vectors, cosine distance is after normalizing each; fix the embedding model, normalization and prototype construction. Nearest-centroid distance can miss gaps between clusters, and nearest-neighbor methods have their own high-dimensional and coverage limits. Set a percentile on a held-out in-distribution calibration set rather than optimistic training-to-self distances. A ninety-ninth-percentile threshold nominally flags about of a matching continuous ID distribution, subject to finite-sample uncertainty; it says nothing universal about OOD detection or safe answers. Combine appropriately validated distance, uncertainty, permissions, evidence checks and a tested fallback. Audit skipped branches and collect labels beyond the router's own observed failures to limit selection bias. The chapter's observation about router shift benchmarks is a reported coverage concern, not proof that no relevant benchmark or robust method exists.
Worked example
The reported four-corpus example gives broadcast/routed accuracies , call reduction and data-transfer reduction . If broadcast truly makes four calls on every query and all reductions share that query denominator, routed mean fan-out is and saving is calls/query. A system that always calls at least one source cannot have mean fan-out below one. This interpretation therefore requires some zero-source queries—at least —or a different aggregation/denominator. It does not establish that the study actually used a particular skip branch. Check its definitions before importing these means into a deployment model. For a separate shift sensitivity, write the in-distribution accuracy advantage as (the reported percentage-point point estimate). Suppose a replaced fraction of traffic has router accuracy disadvantage , while the remaining fraction keeps advantage . The shifted overall gap is , so accuracy neutrality requires . For , the maximum fractions are approximately , , and . The simpler omits the lost ID advantage on replaced traffic and is only a small- approximation. These thresholds assume the point estimates are exact and do not provide statistical guarantees. At a stipulated per source call and saved calls on every query, savings are per query or at ten million monthly queries. If one ignores any ID accuracy benefit and charges only the additional OOD error loss with , the saving-versus-harm break-even is . If the same ledger also credits the remaining ID accuracy gain, neutrality is , giving . Keep those ledgers distinct; their proximity to any accuracy-only threshold is not independent validation, and constant call savings under shift is another assumption. Reported call and byte fractions, if comparably aggregated, imply mean payload per retained call relative to baseline of , or larger. That is a payload-per-call ratio, not proof that retained corpora are larger, that sources are interchangeable, or that one-source affinity explains the result.
Practice decisions and limits
Choose a risk-appropriate permitted fallback for ambiguous or unfamiliar inputs: it may be broader retrieval, clarification, abstention or human review. An expensive route can still fail or introduce harmful evidence. If latency or capacity caps bind, log and alert on the affected traffic and use an explicit degraded-mode policy; a cap can signal overload as well as distribution shift. Set thresholds from written benefit, harm and cost assumptions, then validate calibration and outcomes by segment. Monitor branch share, scores, distance, permissions, evidence outcomes and sampled unchosen alternatives. Feedback or escalations are imperfect outcome proxies and need periodic validation. Sample flagged queries and coherent new verticals for new labels. Diffuse noise or adversarial traffic is not a reason to raise a distance threshold automatically and send it through an unvalidated cheap branch. Change thresholds only with held-out risk/capacity evidence and a documented fallback.
Diagrams
Figure 25.1
Panel A: paired-outcome accuracy headroom
| Closed-book outcome | RAG correct | RAG wrong |
|---|---|---|
| Correct | ; outcome-oracle headroom | |
| Wrong |
Panel B: when each family’s signal becomes available
Diagram description and source
flowchart TD
Q["prompt available"] --> C["Query-only classifier: before generator prefill"]
Q --> P["Generator prefill: hidden-state or first-logit signal"]
P --> D["Optional confidence draft: extra generation before this gate"]
P --> S["Possible retrieval control token before a full answer"]
S --> M["Possible later mid-answer triggers, with accumulated work"]
C --> A["Execute chosen permitted action"]
D --> A
M --> A
These are alternative signal paths, not three mandatory sequential gates. The stipulated classifier allowance is , and the no-reuse thirty-token draft has a streaming component in the worked 7B example. Hidden-state acquisition and subsequent triggers require their own cost accounting. Figure : In this fixed paired table, is the outcome-oracle's ten-percentage-point accuracy headroom over always retrieving. Real skips gain in , lose in , and save work without score changes in or . A conditional-mean oracle and a realizable query-only gate can have less headroom. Signal timing depends on the implementation, not a universal ordering of “classifier,” “confidence,” and “self-reflection.”
Figure 25.2
Diagram description and source
flowchart TD
Q["prompt x"] --> I["1. intent-aware"]
I -->|no external intent| S1["SKIP"]
I -->|seeks knowledge| K["2. knowledge-aware"]
K -->|no world knowledge| S2["SKIP"]
K -->|needs facts| T["3. time-aware"]
T -->|time-sensitive| R1["RETRIEVE"]
T -->|stable fact| A["4. self-aware"]
A -->|already known| S3["SKIP"]
A -->|not known| R2["RETRIEVE"]
classDef skip stroke-width:1px,stroke-dasharray:5 5
classDef retrieve stroke-width:3px
class S1,S2,S3 skip
class R1,R2 retrieve
The four probes may share a state from one generator prefill and be trained separately. They are not thereby statistically independent. Charge state acquisition when incremental, and distinguish serial early-exit work from parallel probe latency. Figure : The tree implements . Under the stipulated traffic rates it retrieves on of queries. Serial execution evaluates probes on average instead of four; precomputing all four changes scheduling, not the Boolean rule. Predicted bits and versioned self-knowledge remain fallible.
Figure 25.3
Diagram description and source
flowchart TB
Q["query q"] --> B["broadcast to six permitted stores"]
Q --> R["route by predicted query-source usefulness"]
B --> BS["query S1, S2, S3, S4, S5, S6"]
BS --> BM["illustrated bad merge: raw scores, no deduplication"]
BM --> BO["A, A copy, A copy, A copy, B, C"]
R --> RS["select S1 HR wiki and S2 Singapore portal"]
R -.-> RX["skipped S3, S4, S5, S6: audit recall risk"]
RS --> RM["rank fusion with provenance-aware deduplication"]
RM --> RO["illustrative output: A, B, C, D, E, F"]
This schematic uses six output slots: its bad merge has three distinct documents, whereas its illustrated deduplicated merge has six. The selected catalogs total units. The ten-slot policy-version example in the text is a separate construction with seven policy families and eight versioned objects. Figure : Routing, score fusion and deduplication are distinct design decisions. Broadcasting can also use rank fusion and deduplication; routing does not guarantee unique or relevant results. The source target needs a defined label and calibration. The covered-catalog ratio is not measured search speedup. Source omissions require explicit auditing.
Figure 25.4
Diagram description and source
flowchart TB
Q1["query q"] --> C["four criteria: intent, knowledge, time, self"]
C --> L["up to sixteen bit patterns"]
L -.-> P["explicit, tested label-to-action policy"]
P -.-> U["chosen operation"]
Q2["query q"] --> RP["alternative: prescriptive action router"]
RP --> A1["answer directly"]
RP --> A2["reason without retrieval"]
RP --> A3["retrieve as issued"]
RP --> A4["rewrite, then retrieve"]
RP --> A5["decompose, then retrieve"]
The first two actions do not invoke retrieval; the last three do. Selecting a non-retrieval action subsumes the retrieve/skip decision, but routing itself still costs work. Figure : Descriptive properties and prescriptive actions are different outputs. A hand-written mapping can work when its required distinctions are available and validated; omitted distinctions create ambiguity. Direct action supervision is another option. Evaluate the final answer, asymmetric errors and permitted resource use, rather than assuming either output format is intrinsically correct.
Figure 25.5
| Level | What the corpus must supply | Machinery | Ceiling effect |
|---|---|---|---|
| L1, explicit facts | An explicit answer fact in usable evidence | Fact retrieval, chunking, embeddings, reranking and depth | Coverage and generation both limit quality |
| L2, combined facts | Evidence whose combination supports the answer | Focused queries, decomposition, iteration, graph or structured-query tools where appropriate | Joint evidence coverage depends on retrieval-event dependence |
| L3, written procedures | Relevant steps, exceptions and authority from a written procedure | Procedure/parent retrieval and validated procedure following | Retrieve usable rationale; the entire manual is not always necessary |
| L4, policy inferred from cases | Representative, appropriately permitted cases and outcomes | Case selection, justified rule mining, evaluated learning or abstention | Examples need not identify a unique unwritten rule; rationale need not be written |
Figure : The levels describe the evidence needed for a query in a particular corpus. Retrieval can help each level, but cannot create missing evidence or guarantee that an unwritten policy is identifiable or appropriate. Procedures require relevant steps and exceptions, not necessarily every page of a manual. Case-based inference needs held-out validation, uncertainty and governance.
Figure 25.6
Diagram description and source
flowchart TD
Q["training query q and gold answer from a labeled QA corpus"]
Q --> A["A: no retrieval, 2.4125 s, observed EM = 0"]
Q --> B["B: single-step, 2.6275 s, observed EM = 1"]
Q --> C["C: five-step retained-prefix proxy, 14.5375 s, observed EM = 1"]
A --> S["record scorer, output, cost, version and randomness"]
B --> S
C --> S
S --> D{"any observed success?"}
D -->|yes| E["minimum-cost observed success; explicit tie rule"]
D -->|no| F["unsolved, or separately marked heuristic fallback"]
E --> L["silver supervision"]
F -.-> L
L --> T["train and independently evaluate query-to-policy router"]
T --> V["serve with permissions, uncertainty checks and fallback"]
Figure : Silver supervision comes from executions, not a human guess at a particular model's required hop count. The displayed times use the explicit retained-reasoning, no-KV-reuse model. Exact match and a single execution only establish observed success under that scorer. An all-failed fallback is heuristic, not a cheapest successful policy; track it separately and revalidate after system changes.
Figure 25.7
Figure : This explicit two-dimensional binary-linear example replaces unreproducible millimeter measurements of an ASCII drawing. Both points have logit two, the same confidence and the same distance two from the boundary , yet differ in Euclidean distance to prototype . The positive scale and factor are stipulated, not measured training statistics. The example proves that a logit alone need not identify input familiarity; it does not prove a centroid threshold detects all unfamiliar inputs, that all softmax confidence is geometric distance, or that escalation is safe.
Whiteboard pack
What to draw
- Draw query inputs and permission constraints.
- Illustrate either the UAR retrieve/skip tree or an action router with non-retrieval actions; both are not mandatory sequential stages.
- Show the UAR rule's intent, knowledge, time and self-knowledge criteria, including shared-prefill cost if used.
- Give the prescriptive alternative five actions: direct, reason without retrieval, retrieve, rewrite, decompose.
- Route retrieval actions to permitted stores; draw fusion and version-aware deduplication as separate controls.
- Add four evidence needs: one fact, combined facts, written procedure, representative cases.
- Annotate budgets and state the independence assumption if using for joint coverage.
- Add a validated input-distance/uncertainty check with clarification, allowed retrieval, abstention or human review as appropriate—not an automatically safe expensive path.
- End at generation and verification; log actions, score calibration, terminating gates, branch shares, versions and sampled missed alternatives.
Spoken script
Start by comparing cases retrieval saves with cases it spoils. The paired outcome table defines potential headroom, not a guarantee the gate can realize it. Choose signals whose availability and full incremental cost match the design. Separate source permission and selection from fusion, deduplication and conflict handling. Use actions and evidence units that fit the question: facts, combinations, procedures or cases. Silver labels come from actual candidate executions, with unsolved cases and stochasticity recorded. Finally, neither router confidence nor distance to past inputs proves safety. Validate both where useful, audit unchosen branches and keep a tested permitted fallback.
Interview traps
1. Retrieval raises overall accuracy but hurts common questions. What should trigger it?
Build a paired closed-book/RAG outcome table with a specified scorer and system versions. Its cell is the outcome-clairvoyant headroom over always retrieving, not necessarily the attainable gain of a query-only or conditional-mean gate. Track rescued and lost mass plus cost and required grounding. A draft-based gate pays for a draft only in that implementation; pre-answer logits, hidden states or query features have different costs.
2. Why not query every source and let the reranker choose?
Broadcast can add independent tail exposure, billed calls, restricted-source risk and duplicate evidence, while routing can silently omit the right store. The exact tail expression needs independence and wait-for-all semantics. Reranking does not inherently remove redundancy or make heterogeneous raw scores comparable. Use permitted sources, justified fusion, provenance/version-aware deduplication and skipped-source audits; neither routing nor RRF guarantees recall.
3. Is a when-to-retrieve classifier the same as a router, and how does query level change the answer?
A descriptive classifier predicts properties; a prescriptive router selects an operation. Non-retrieval actions can subsume a separate retrieve/skip gate. Evidence need is a query-and-corpus property: one fact, combined facts, a written procedure or policy-bearing cases. All can benefit from retrieval, but a different unit, tool or validation method may be required. Multiple facts do not alone prove decomposition is best, and examples need not uniquely identify a policy.
4. Nobody labels hop counts. How does Adaptive-RAG get supervision?
Run the candidate policies on labeled questions, retain outputs and costs, and pick a minimum-cost observed success with an explicit tie rule. Record all-failed queries separately; a dataset-biased fallback is not a verified successful label. Repeat stochastic trials when reliability matters. Revalidate labels and the router after changes in generator, corpus, prompts, tools or scoring.
5. Why is router confidence not enough for OOD safety?
Confidence is a function of model scores, not a general distance-to-training-data measure or a guarantee of answer correctness. Even a linear model can assign the same logit to inputs arbitrarily far apart along a tangent direction. Input distances add a separately validated signal, not an independent safety certificate. Calibrate thresholds on held-out matching traffic, test relevant shifts, evaluate both branches' benefit and harm, and select a permitted fallback using common-unit loss and resource costs.
Key numbers
| Topic | Number or threshold | Exact meaning or limit |
|---|---|---|
| PopQA retrieval harm | Reported roughly harm figure | Verify the cited denominator; do not transfer a closed-book-success-conditional rate into an all-query cell |
| Figure | Both paired outputs correct; scenario assumption | |
| Figure | Only closed-book correct; outcome-oracle headroom is ten percentage points | |
| Figure | Only retrieval correct; scenario assumption | |
| Figure | Both paired outputs wrong; scenario assumption | |
| Figure always-retrieve | for the fixed paired evaluation | |
| Figure closed-book | for the same evaluation | |
| Figure oracle | ; clairvoyant selection, not necessarily attainable from query features | |
| Gate signal timing | Separately stipulated classifier wall-time allowance, not derived from its arithmetic component | |
| Gate signal timing | Thirty-token 7B weight-stream component before the particular draft gate, excluding draft prefill | |
| Gate workload | queries/day | Worked gating workload |
| Gate generator | parameters | Worked generator; forward and byte-stream proxies have different bottlenecks |
| Prompt sizes | vs prompt tokens | Five four-hundred-token chunks add two thousand prompt tokens |
| Retrieval stages | Stipulated serial embedding, search and reranking times | |
| Extra prefill | extra prompt tokens | Increment due to retrieval in this scenario |
| Prefill compute | FLOPs | forward proxy for the extra 7B prompt tokens |
| Effective throughput | FLOPs/s | Assumed arithmetic throughput; not a peak-to-wall-time equivalence |
| Prefill latency | Extra-prompt arithmetic component; round only after calculation | |
| Total retrieval overhead | Serial retrieval proxy: stipulated eighty-three ms plus extra-prefill arithmetic | |
| Always-retrieve prefill | prompt tokens/day | Always-retrieve workload |
| Popularity-gate skip | skipped | Hypothetical gate; rescue/loss masses are specified independently |
| Infrastructure skip request | Source scenario: desired skip rate | Not intrinsically incompatible with no score loss: the stipulated both-correct cell alone has fifty-two percent of queries |
| Gate rescue and loss | rescued points, lost points; final score | Net three-point gain recovers , not one third, of outcome-oracle headroom |
| Gated prefill | prompt tokens/day | fewer prompt tokens; not a total serving-cost guarantee |
| Expected latency avoided | avoided per query | Thirty percent of the unrounded retrieval-overhead proxy |
| Classifier encoder | parameters; tokens; FLOPs | arithmetic differs from the stipulated two-ms wall allowance |
| Classifier net saving | mean modeled saving | Avoided retrieval minus the separately stipulated classifier allowance |
| Confidence weight read | weights; | Stream component per 7B decoded token, before other work |
| Confidence net effect | net saving | No-reuse thirty-token draft makes this comparison slower; reuse changes the budget |
| Source discrepancy | Reconciled: saved, added | The prior summaries were unsupported by these inputs; not alternative calculated results |
| UAR hidden state | hidden coordinates | State acquisition/prefill must be costed when incremental |
| UAR probe hidden width | hidden units | MLP hidden width |
| UAR output | logits per probe | Two-way output, not a calibration guarantee |
| UAR probe parameters | matrix weights | Including biases: parameters per probe |
| UAR probe compute | linear FLOPs per probe | Two FLOPs per multiply-accumulate; other work omitted |
| UAR total compute | linear FLOPs | Four probe evaluations; no shared-prefill cost included |
| One 7B decode step | FLOPs | One 7B forward-token proxy |
| UAR overhead | ; | Four-probe linear arithmetic relative to one generator token, not wall time |
| UAR traffic | prompts/day | Worked UAR traffic |
| UAR retrieved context | retrieved tokens | Context increment per UAR retrieval |
| UAR retrieval latency | stipulated overhead | ms across embedding/search/rerank/prefill |
| UAR input price | per million input tokens; per retrieval | Retrieved-token billing only, not all infrastructure cost |
| Always-retrieve cost | /day | Always retrieving on the ten-thousand-prompt workload |
| UAR termination rates | , , | Conditional termination rates for this actual cascade order |
| UAR final split | skip, retrieve at the last gate | Conditional on reaching the remaining forty-two percent of original traffic |
| UAR retrieval rate | retrievals/day; | Fourteen hundred at time gate plus eighteen hundred ninety at last gate |
| UAR daily cost | /day | UAR retrieved-token cost; gating costs excluded |
| UAR savings | /day; /year | Year assumes three hundred sixty-five identical days |
| UAR mean added latency | Mean retrieval-only overhead, before incremental probes and state acquisition | |
| UAR daily control compute | GFLOPs/day for all four | Serial early-exit: GFLOPs/day, expected probes per query |
| A100 reference | at peak; at one percent | Arithmetic divisions at the cited 312-TFLOP/s BF16 rate, not accelerator wall times |
| Draft self-aware gate | draft tokens; GFLOPs | Per reached query under the fourteen-GFLOP/token proxy |
| Draft gate ordering | reach the draft; GFLOPs/query expected | Daily draft-plus-first-probe work about FLOPs; distinguish the units |
| Ordering reduction | draft-component reduction | Skipping the draft on earlier exits; cheap first probes, prefill and runtime overhead remain |
| Hit-rate-cost ratio gap | About times | Gate-one versus sixty-four-token-draft stopping-per-linear-FLOP ratio; not a legal arbitrary gate reorder |
| Source-tail probability | for six; for two | Independent one-percent source budget exceedances and wait-for-all semantics |
| Duplicate collapse | , maximum duplicate group | At least four distinct objects; not necessarily exactly four |
| Heterogeneous lengths | -token wiki vs -token PDF | Example corpus-length heterogeneity; not measured score calibration |
| BM25 comparison | Raw BM25 score in each source | Equal raw values need not imply equal relevance |
| Cosine comparison | Illustrative relevant cosines and | Different models/distributions; cosine is not itself calibrated source usefulness |
| RAGRoute reduction | fewer calls, less transfer | Chapter-reported RAGRoute aggregates; check matching denominators |
| RAGRoute accuracy | to accuracy | A point-estimate change of percentage points; no significance established here |
| Broadcast query ratio | call-count ratio | Broadcast calls divided by remaining routed fraction, under common aggregation |
| Constructed store sizes | , , , , , | Six toy catalog counts, totaling indexed chunks |
| Source return size | candidates/source, average tokens | Transferred source chunks; reranking window must be specified separately |
| Broadcast transfer | candidates, transferred tokens | Six-store broadcast; calls can be concurrent |
| Duplicate vote | Four policy-family hits: three old copies and one amendment | With six other documents: seven policy families but eight versioned objects; raw vote three to one |
| Routed transfer | candidates, transferred tokens | Two selected stores; reduction |
| Selected vectors | vs indexed vectors; ratio | Catalog-size ratio only; not search-speedup estimate or universal upper bound |
| Reranker throughput | pairs/s at a stated -token window | vs reranking work; transferred six-hundred-token chunks require explicit windowing/truncation |
| Router default | Source heuristic | Validate permitted broadcast against costs, tails and missed-evidence risk |
| RRF constant | Rank-fusion constant; distinct from context depth | |
| Partner source | partner documents | Source scenario with billed calls, metadata limits and residency constraints |
| Descriptive labels | Up to bit patterns | Not all necessarily feasible, observed or distinguishable action classes |
| Prescriptive actions | actions | Direct, reason without retrieval, retrieve, rewrite/retrieve, decompose/retrieve |
| BERT-base router | FLOPs; | Thirty-two-token encoder arithmetic component, not measured wall time |
| Generative router | weights; | 8B bf16 weight-stream component at the stated bandwidth |
| Routing generation | routing-label tokens; | Decode component only; no thousand-fold end-to-end latency claim established |
| Direct-answer example | ms prefill plus ms decode | Partial direct-path proxy ; other serving work omitted |
| Arithmetic distraction | added tokens; | 8B extra-prompt arithmetic component |
| Rewrite example | rewrite outputs; | Weight streaming before rewrite prefill and retrieval work |
| Router break-even | arithmetic-only; with two-ms allowance | Different encoder cost assumptions; neither includes new route errors or all serving cost |
| Cross-encoder comparison | pair positions; arithmetic | Eight hundred times thirty-two positions; total work need not scale exactly because attention length changes |
| Held-out router accuracy | Source scenario: route-label accuracy | Cannot infer final answer quality without route-confusion costs and outcomes |
| Joint action-source labels | with one source per retrieval action | With arbitrary nonempty subsets: ; do not source the two non-retrieval actions |
| Source-retrieval recall example | Source scenario: | A declared retrieval metric and cutoff; not automatically multi-fact joint coverage |
| Level count | evidence-need levels | Useful query-and-corpus categories, not a proven exhaustive taxonomy |
| Joint coverage | , ; joint | Requires independent capture events, not just independently useful facts |
| Required per-fact recall | Common per-fact coverage for at least ninety-percent joint coverage under independence | |
| Pooled budget | slots and required facts | Does not imply equal allocation; chunks can duplicate or cover multiple facts |
| Recall upgrade | Gain , or percentage points, over the stipulated case | |
| Stratification corpus | chunks at tokens | corpus tokens in the toy accounting |
| Level 1 prefill | retrieved tokens | Level-one top-ten prompt increment, excluding instructions/question |
| Level 2 pooled | Stipulated independent pooled per-fact coverage, not a measured universal penalty | |
| Level 2 decomposed | ; ratio | Decomposition coverage is a separate assumption; three top-ten searches return six thousand raw tokens |
| Level 3 procedure | procedure tokens plus other tokens | Three-thousand-token parent-based budget, not ten unchanged two-hundred-token slots |
| Level 4 exemplars | cases at tokens; total | Examples may not uniquely identify a rule; validate selection and permissions |
| Hidden-policy history | Source example: prior cases | More cases alone do not prove policy identifiability, transfer, fairness or privacy compliance |
| Traffic mix | , , , traffic | Stipulated level proportions, not error rates |
| Mean level-aware prefill | mean tokens; factor | Forty-percent non-Level-one traffic does not establish forty-percent baseline failure or successful repair |
| IRCoT anchor | Reported up to retrieval points; separate sensitivity | The sensitivity gives joint and ratio ; not derived from the reported IRCoT result |
| Stratification sample | Source heuristic: labeled queries | Initial diagnostic sample; uncertainty depends on sampling and the decision |
| Fact-chunk overlap | -token chunks, overlap | Physical overlap affects assembled unique tokens; the nine-step budget explicitly specifies its prompt tokens |
| Failing-set decision | failing slice, one-week decision, sampled failures | Diagnostic workflow example, not a statistically universal sample-size rule |
| Decomposition threshold | facts as a decomposition prompt | Heuristic only: colocated evidence may need one lookup; task dependencies and quality determine the route |
| Procedure chunk exception | Procedure must fit the chosen usable evidence capacity | Under four hundred tokens does not imply fitting a two-hundred-token chunk; use a larger parent if needed |
| Small level exclusion | Below of traffic | Rarity alone does not establish negligible safety impact or justify excluding a level |
| Adaptive-RAG policies | candidate policies | No retrieval, one retrieval, capped iterative retrieval |
| Decode rate | decoded tokens/s | Assumed serial service rate, not guaranteed deployment throughput |
| Answer length | outputs; decode | In iterative example each of five outputs has this length; fifth is the final answer |
| Prefill rate | prompt tokens/s | Stipulated prefill service rate |
| Retrieval call | per retrieval | Stipulated retrieval time per serial iteration |
| Retrieved context | new retrieved tokens per iteration | Five two-hundred-token chunks; prior reasoning retention specified separately |
| Policy A | Policy A: one-hundred-token prompt and one-hundred-twenty-token answer | |
| Policy B | Policy B: one retrieval plus eleven-hundred-token prompt and answer | |
| Policy C | ; primary proxy | Retains prior reasoning with full prompt recomputation; dropping old reasoning gives instead |
| Policy C components | s prefill, s retrieval, s decode | Sixteen-thousand-seven-hundred summed prompt tokens; no separate hidden final-answer call |
| Silver-label set | queries; route mix | Assumed perfect-label allocation, not a router accuracy measurement |
| Routed expected latency | mean; speedup factor | Uses unrounded retained-prefix costs; preservation of always-C quality is a separate condition |
| Label executions | generation calls/query; total | Testing A, B and a five-call C on every training query |
| Labeling time | serial decode-hours; ideal hours at thirty-two-way capacity | All modeled service: hours, ideally at the same independent capacity |
| Human comparison | annotator-hours at thirty seconds per query | Different work from execution; humans can test models but cannot directly read memorized facts from the question |
| Published timing anchor | for ten times B in the primary model | Eight/nine iterations give 24.94/28.6875 seconds; not proof of the source experiment’s actual loop count |
| Class split trigger | Source heuristic: dominant label above | Imbalance alone does not imply a class must be split; validate added label value |
| Unsolved trigger | Source heuristic: unsolved fraction near | Diagnose the candidate pipelines; a fallback is not an observed success |
| Minor-version check | Source heuristic: relabel checks after a minor change | Version all relevant components and choose test size for the claimed decision/uncertainty |
| Route gaps | A-to-B; B-to-C | Unrounded retained-reasoning service gaps |
| Over-route cost | A-to-C | Added modeled work does not guarantee preserved correctness or safety |
| Three-way router accuracy | Source illustration: three-way routing accuracy | Route-confusion costs and final correctness determine utility |
| Joint routing grid | configurations; average labels | Twelve times the three-policy execution count if all tested; not automatically twelve times actual compute |
| OOD incident | shifted traffic with two-point total accuracy loss | Requires fifty-percentage-point shifted-slice degradation if all other traffic is unchanged |
| High-confidence share | Apparently unchanged confidence mass above | A histogram is not correctness calibration or a guarantee against shift |
| CRAG evaluator | Reported CRAG scale: parameters, three classes | Document-evaluation controller; not equivalent in inputs/timing to every query router |
| Cost example | cheap path; separately assumed tenfold monetary cost | Extra cost is eighteen thousandths of a dollar; a latency ratio alone does not establish billing ratio |
| Wrong-answer loss | Fifteen minutes at /hour gives | Illustrative wrong-answer loss; evaluate actual downstream consequences |
| Cost threshold | Perfect-rescue/no-new-harm model with calibrated event probability and common monetary units | |
| Argmax mismatch | Threshold ratio, not the ratio of actual escalation counts | |
| Figure boundary distance | No reproducible -mm measurement | ASCII typography is not an embedding geometry; replaced by an explicit two-dimensional example |
| Figure margin comparison | Equal logits need not imply equal familiarity | The previous three-percent centroid-margin claim was not defined or derivable from the drawing |
| Figure data distance | Stipulated prototype distance | Native two-dimensional counterexample has the same logit at near/far points; no measured OOD detection claim |
| Distance bypass | Heuristic ninety-ninth percentile of held-out ID distances | About one-percent nominal ID flag rate under a matching continuous distribution; not OOD recall or safety |
| Medical corpora | corpora in the reported setting | Conditional fan-out interpretation needs matching call/data/query denominators |
| Routed fan-out | Mean fan-out under that interpretation | Requires some zero-source queries, at least ten percent, or a different aggregation; not possible with mandatory one-source calls |
| Calls saved | calls saved/query conditionally | Four-call broadcast minus mean routed ; not a measured universal deployment saving |
| OOD accuracy allowance | with | Exact replaced-traffic accuracy condition; is only a small-shift approximation |
| OOD slice at 10-point lift | when | Exact mixture under stipulated point estimates; no confidence guarantee |
| OOD slice at 5-point lift | when | Same replaced-traffic model |
| OOD slice at 20-point lift | when | Same replaced-traffic model |
| Source-query price | per source call | Independent monetary assumption |
| Routing dollar saving | /query; per ten-million-query month | Assumes saved calls remains constant under shift and ignores other costs |
| Dollar break-even OOD | ignoring ID benefit; crediting it | Different dollar ledgers at ten-point OOD harm and six-dollar loss; do not conflate with accuracy neutrality |
| Retained data ratio | approximately | Mean bytes per retained call are percent larger under matched aggregation; not a corpus-size or affinity proof |
00-START-HERE · 01-READING-ROUTES · 24_query_reformulation · 26_iterative_recursive_and_agentic_retrieval