00-START-HERE · 01-READING-ROUTES · 21_learned_sparse_and_multi_vector_retrieval · 23_generative_retrieval This chapter explains why Retrieval-Augmented Generation (RAG) needs a second ranking stage, how to price and size it, and how cross-encoders, large language model (LLM) ranking modes, ranking losses, sliding-window prompting, instruction-aware scoring, and document-bound versus model-bound diagnosis support that choice.
TL;DR
- A fixed-candidate reranker cannot retrieve omitted evidence. The exact recall product needs a second-stage probability conditioned on first-stage inclusion.
- Compute, serial dependencies and hardware capacity are different budgets. The fuller BERT proxy is per pair at the assumed rate, not a measured response time.
- Choose depth from measured first-stage coverage, conditional reranking quality and cost. A fixed IID distractor model illustrates a possible trade-off, not inevitable collapse.
- Pointwise, pairwise and listwise LLM modes trade tokens, comparisons, dependencies, calibration and order sensitivity. Unlimited parallelism cannot be assumed for free.
- Listwise loss couples same-query candidates; pointwise classification is not inherently incapable of ranking. Negative sampling and explicit probability/logit conventions matter.
- Tail-to-head overlapping windows give deep candidates a promotion path in this one-pass schedule. Call counts are integers, and rescue probabilities require conditional hand-off assumptions.
- Instruction-aware scoring needs informative supervision and explicit intent access, not necessarily one particular architecture. Symmetry-based blind-model floors require a fixed balanced candidate scenario.
- Compare one more document with a specific stronger ranker at the current context size, including costs. The toy crossover near five is not a universal pipeline boundary.
The story
Think of retrieval as auditions for a small theater. The casting assistant invites candidates; the director can only choose among those invited. Keeping fewer, better-ordered passages can save generator work, but the saving and quality gain must be measured. Pointwise auditions score one actor, pairwise auditions compare two, and listwise auditions order a group. Some decisions run independently, yet a single theater has finite staff: many independent auditions are not one audition's wall-clock time at no extra cost. A tail-to-head relay lets a deep candidate move through overlapping groups; a disconnected single-pass schedule cannot move it across block boundaries. Instructions are role notes. On-topic candidates that differ in whether they satisfy those notes help reveal whether the director actually uses them. Finally, compare the next extra context passage with a named better director at today's cast size and budget. The useful next investment can change with the operating point; neither a toy threshold nor one ablation determines it forever.
Decoder table
| Term | Meaning | Why it matters |
|---|---|---|
| RAG | Retrieval-Augmented Generation | Retrieval selects evidence before generation. |
| Corpus size in chunks | The cheap first stage may scan or index all . | |
| Candidate depth passed to reranking | At fixed pair lengths, cross-encoder resource work is linear in depth; latency also depends on capacity and overhead | |
| Documents sent to the generator | Generator prefill and evidence coverage change with . | |
| Probability that a specified gold item is in the first-stage candidate set | The fixed-set second stage cannot recover omitted evidence | |
| Probability of final-context inclusion conditional on first-stage inclusion | Use the same evidence population and averaging rule in both factors | |
| Probability that the final context contains that gold item | when the conditional factor is defined; this is not answer accuracy | |
| Dense embedding width | A dot product costs floating-point operations (FLOPs). | |
| Encoder parameter count | is the declared linear forward-work proxy; attention and real implementation costs are separate | |
| Query token count | It contributes to every query-document pair. | |
| or | Passage or document token count | It dominates pair length and listwise prompt size. |
| Instruction token count | It is the extra input cost for instruction-aware reranking. | |
| Processed joint pair length | when instructions are used; worked lengths omit uncounted special positions | |
| Transformer hidden width | It appears in the attention-cost term. | |
| Transformer layer count | It multiplies the attention-cost term. | |
| First-stage retriever | Cheap sparse or dense scorer over the corpus | It buys recall at large depth. |
| Dense Passage Retrieval (DPR) | Dense first stage in the reported Natural Questions comparison | The two-endpoint fit gains percentage points per depth doubling, not a general law |
| BM25 | Sparse first stage in that comparison | The same fit gains points per doubling; extrapolated depths are not new measurements |
| Approximate nearest neighbor (ANN) index | Index that can avoid scoring every stored vector | The flat-read roofline scenario is not an upper bound on ANN or actual first-stage time |
| Cross-encoder | Joint query-document transformer | It can condition every document token on every query token. |
| Bi-encoder | Separate query and document encoders | It permits document-side precomputation but lacks joint token interaction. |
[CLS] and [SEP] |
Classification position used for the score and separator token placed between fields | They mark the joint sequence and expose the final relevance representation. |
| and | IID distractor outranking probability and the Poisson approximation mean | An explicitly single-gold, fixed-error toy; score dependence or heterogeneous distractors change the tail |
| Pointwise mode | Score one candidate per decision | Independent calls still consume total work and finite worker capacity; scores need task-specific validation |
| Pairwise mode | Compare two candidates per decision | It creates ordinal judgments but may produce cycles. |
| Listwise mode | Order or train on a same-query candidate group | A joint loss need not require a joint forward pass; prompted windows introduce schedule and order effects |
| Serial depth | Longest dependency chain of model calls | A latency constraint in addition to total work, throughput, concurrency limits and request overhead |
| Comparator cycle | A result such as , , and | A sort can hide the inconsistency and return arrival-order-dependent output. |
| Listwise window size | It controls candidates seen per listwise decision. | |
| (window use) | Sliding-window stride | It controls overlap and how many ranks each call freezes. |
| Call counts under a declared algorithm and window policy | Separate call count, dependency rounds, total tokens and actual resource capacity | |
| and (window use) | Initial rank and participating calls along an aligned promotion path | Intermediate overlap survival and a final rank-one result are different required events |
| A stipulated common conditional probability for every required path event | The power needs that assumption; the schedule alone supplies no event probabilities | |
| (training list size) | Number of separately scored candidates per same-query training list | The scenario compares two versus sixteen candidates per query-group epoch; other uses of the letter g are unrelated |
| monoT5, and | Pointwise T5, a true-minus-false output logit and its two-token probability | BCE is separable across supplied examples, but shared parameters can still couple representations |
| RankT5, | Unbounded relevance logits normalized over a list, gold probability and target label | Listwise softmax loss makes supplied candidates compete; the forward architecture must be specified separately |
| Binary cross-entropy | Summed pointwise classification loss | Per-logit derivative ; weighting and normalization affect aggregate gradient mass |
| Listwise softmax cross-entropy | Loss that normalizes scores over one query’s list | Its denominator makes candidates compete. |
| LambdaRank | Pairwise method that rescales gradients by absolute normalized discounted cumulative gain change | It prices head-of-list inversions more heavily. |
| poly-1, and | An extra gold-probability penalty, its coefficient and the gold softmax probability | The added logit gradient is times the list cross-entropy gradient under the stated one-hot loss |
| Mean reciprocal rank at ten () | Mean reciprocal relevant rank, zero for misses or ranks below the cutoff | Distinguish conditional and unconditional scores; this metric alone does not identify a rank distribution |
| Normalized discounted cumulative gain (NDCG) | Gain discounted by rank and normalized by ideal gain | For the same gain difference and normalizer, adjacent head swaps have larger discount gaps; cutoff and ties matter |
| Mean average precision (MAP) | Mean of per-query average precision | A strictly increasing within-query score transform preserves ranking metrics under unchanged tie handling; a non-strict transform can create ties |
| , , , and | Intent instruction, query, document, and the two-document score gap | They make the instruction-aware function and its impossibility proof explicit. |
| Task-aware Retrieval with Instructions full model (TART-full) | Instruction-aware model recipe described by the source | The reported negative pool is not a theorem about gradient allocation or sufficient coverage |
| and | Intent success at rank one and the number of symmetric intents | The blind-model bound requires fixed inputs/candidates, equally likely distinct golds and no intent side channel |
| Constant extraction success with gold in context in the simplified answer model | General success can depend on context size/order and can be nonzero without that gold; the toy fixes | |
| Conditional ranker coverage within the first context slots | The unbounded geometric approximation is ; a finite candidate pool needs normalization | |
| Baseline and specified-upgrade answer-success probabilities | Compare absolute gains and intervention costs on the same evaluated population | |
| Baseline and new geometric parameters | The scenario uses and ; their difference is not an observed MRR or answer-quality gain | |
| Complements of those parameters | and in the abbreviated marginal derivation | |
| Document-bound | The specified extra-document intervention has the larger raw marginal gain | An operating-point comparison, not a cost-adjusted investment theorem |
| Model-bound | The specified available ranker has the larger raw gain at fixed context size | Depends on the upgrade, extraction behavior, candidate pool and resource constraints |
| Real-valued equality of the two unbounded geometric marginals | in this toy; integer comparison changes between four and five, not a universal threshold |
Core mechanics
Mathematical conventions
Use decimal storage units: and ; fp32 stores per coordinate. One multiply-accumulate counts as two FLOPs. Keep full precision until reporting, and use for rounded results or a model approximation. A percentage-point change is absolute; relative change divides by a stated baseline. For the worked compute scenarios, encoder parameters, generator/LLM parameters, sustained throughput per assumed accelerator and memory bandwidth. is a linear forward-work proxy, not a measured latency. The fuller encoder proxy adds for attention matrix products. Numerical pair lengths and omit extra special/formatting positions unless already counted. Biases, normalization, activation functions, output selection, transfers, queues and many kernel costs remain outside these proxies. Work divided by throughput is an idealized resource-time estimate, not a latency or p99 guarantee. Independent calls do not all finish in one call-time on one fixed-throughput device. An unlimited-resource critical path and total work are separate quantities; batching does not create extra aggregate throughput. The flat-read estimate assumes the stated bytes actually stream through the bandwidth bottleneck and is not an upper bound on first-stage latency. Generator prefill examples count only document tokens and omit attention-length effects, fixed prompt work and decode. The recall product uses nested events for one specified gold evidence item, on the same query population. is conditional on that item being retrieved, not an independently averaged recall. Multi-document evidence, multiple golds and macro averaging need their own denominators. The distractor model assumes a single gold, no score ties and IID outranking indicators with fixed error probability; real score dependence and query heterogeneity can violate it. For losses, is an unbounded relevance logit, a binary probability, and a within-list softmax probability. Do not feed binary probabilities into a logit formula without defining that change. All cited empirical scores and configurations remain reported source inputs. The geometric, window-survival and instruction-symmetry examples are conditional models, not calibrated production laws.
22.1 Why a second stage exists at all
What
Let denote inclusion of one specified gold item in the candidate set and its inclusion in final context. Because fixed-set reranking selects only from those candidates, :
This is a set-membership ceiling for a fixed candidate pool, with . If , final gold inclusion is zero and the conditional factor need not be defined. For a micro-average over gold items, sample/weight the same evidence population in both factors. Multiplying separately macro-averaged per-query recalls generally does not give macro end-to-end recall. Candidate recall also does not determine answer quality or context-order effects.
Why
A dense first-stage dot product costs
Use the assumed encoder parameters, query positions and document positions. The simple proxy, before the attention correction, is:
One cross-encoder pair is
times the dot-product work in this proxy, not the measured latency. Exhaustive cross-encoding over passages would use:
The staged system with costs
The work-proxy reduction is . Stage two scores of the corpus and uses approximately of this retrieval arithmetic. The source reports that moving answer-bearing text within context can change generation quality. A set-recall number cannot measure that positional effect, and a relevance sort is not automatically the generator-optimal ordering.
Failure without it
If the specified evidence is missing from the candidate set, a fixed-set reranker cannot recover it. If it was retrieved but cut before the final , inspect ranking/truncation, though first-stage candidate composition can still affect difficulty. End-to-end accuracy alone does not separate those failures, and a generator can sometimes answer without that particular gold chunk. Passing every candidate avoids this truncation but increases context work and can change generation quality; it is not guaranteed to bury or harm the answer on every query.
Cost, complexity, and worked example
For this resource scenario use , document length , embedding width in fp32, the stated BERT and generator proxies, and the common throughput/bandwidth assumptions. Flat vector payload is:
Dividing by gives of idealized streaming time. Dot work alone gives approximately at the stated FLOP rate, so the larger roofline component is memory here. This is not a first-stage upper bound: query encoding, selection, nonideal bandwidth, index traversal and queues can add cost. ANN may read fewer vectors but can also have irregular accesses and other overhead. The following partial-time scenarios assume sequential stages and the idealized flat-read component; they are not measured request latencies.
| Configuration | First-stage and rerank work / rate | Document-prefill work / rate | Partial sequential proxy | Evidence/quality scope |
|---|---|---|---|---|
| One stage, raw top | Gold inclusion ; no learned reorder | |||
| Retrieve , rerank to | Gold inclusion , not guaranteed to reach the ceiling | |||
| Retrieve , send all | About times the preceding partial-time scenario; generation quality must be evaluated |
The -candidate reranker costs
Reducing the document prefill from one hundred passages to five removes approximately under the linear generator proxy, or units of resource time per unit of the linear rerank estimate. Adding reranking to raw top-five increases this partial-time baseline by . Two hundred passages contain document tokens, with proxy FLOPs and ; linear reranking of those candidates is . Actual long-context attention and serving costs can differ. The source reports DPR hit rates at depth twenty and at one hundred: the percentage-point ceiling increase is of the former -point retrieval miss rate, not a guaranteed answer-quality gain.
Decisions and limits
- Measure candidate coverage and final context inclusion on the same held-out population, with explicit gold and averaging rules.
- Compare reranking cost with generator work saved and the final answer-quality change, not only one latency component.
- Use both set and rank metrics, plus generation tests where context order matters.
- Treat depth one hundred as a starting heuristic; benchmark actual tails and capacity.
- Recompute dollar savings under actual token/call billing, caching and fixed serving costs.
- Cached prefill or position-insensitive generation can reduce some benefits, but neither proves that all ranking, diversity or noise-filtering value disappears.
22.2 Cross-encoders and choosing rerank depth
What
A cross-encoder forms a joint sequence such as [CLS] query [SEP] document [SEP]. Its final document token states depend on the current query. Those joint states cannot be reused as a query-independent document embedding in this baseline, although text, tokenization and other preprocessing can be cached. Joint interaction can improve ranking but does not mathematically guarantee a quality win over every bi-encoder.
Why
Let . The worked numbers set additional special positions to zero; an actual tokenizer may add them. With layer count and width , define the fuller proxy:
For BERT-base with , , , and , the linear term is
The attention term is
The total proxy is FLOPs per pair; attention matrix products are of the linear term. At , linear and quadratic terms are and FLOPs. The total increases by for a length factor . A two-point power-law interpolation gives exponent approximately ; this is a fitted description over those lengths, not a universal transformer exponent. Actual pair shape and implementation matter.
At fixed lengths, total resource work scales with depth, giving at this rate. Fit the reported two endpoint hit rates exactly: and recall fraction per doubling. The dense fit gains points from depths twenty to forty for additional work, or points per resource millisecond; from one hundred to two hundred the corresponding ratio is . The BM25 fit reaches around continuous depth , so integer depth is needed under that interpolation, about times dense depth twenty. This is an extrapolation beyond the fitted BM25 endpoint, not a measured guarantee.
Failure without it
To illustrate distractor accumulation, condition on one specified gold being in the pool. Assume each of the other candidates is irrelevant and independently outranks it with the same fixed probability , with no ties. Then the number above gold is:
with approximation
In this toy, . A shared random gold score can correlate outranking events, and hard negatives need not have a common error probability. Multiple relevant passages, listwise context effects and query-dependent difficulty change the model. With fixed IID error, increasing distractors lowers this conditional survival while a fitted first-stage curve rises; the product can have an interior maximum. Neither monotonic conditional degradation nor collapse is a universal empirical law. The population conditioned on retrieval can change with depth, as can scores and error distributions. Redeem a stronger first stage as lower depth only after validating the resulting quality and costs.
Cost, complexity, and worked example
Use , and dense hit-rate fit over the displayed range. Retain the unrounded endpoint slope. The table uses the exact Binomial conditional CDF, not rounded Poisson values. A proxy-work budget permits at most candidates. At depth one hundred the reported BM25 and dense candidate ceilings are and ; dense depth twenty has a ceiling. Candidate ceilings are not final answer accuracies.
| Depth | Fuller rerank work / rate | Fitted | Toy conditional | Gold inclusion product |
|---|---|---|---|---|
The exact displayed model has an unconstrained integer maximum at , inclusion probability approximately , at of proxy work. That is outside the stated budget. Within , it selects , approximately . The former “near one hundred fifty” observation was only approximate and did not enforce the budget. Values above depth one hundred extrapolate the first-stage fit; the model is not a production forecast. The source reports BERT-large reranking at depth one thousand with MS MARCO , versus for BM25. This does not identify a distractor rate. At , the exact toy has top-ten inclusion but truncated expected reciprocal rank only , even with first-stage recall one. Its untruncated expected reciprocal rank is bounded by , so it cannot simultaneously explain MRR . A first-stage miss factor only lowers that number. Matching under this particular toy with recall one would need approximately , not an empirically established rate. In general, . The harmonic-mean rank among successes is that success probability divided by MRR, not simply one divided by MRR unless every query succeeds. The source's Natural Questions and MS MARCO figures are not one matched calibration experiment.
Decisions and limits
- Start with a tractable depth such as one hundred, then measure candidate coverage, conditional rank metrics and actual latency tails after each first-stage change.
- Evaluate several depths on the same held-out queries; attach uncertainty and important cohorts.
- Measure full gold-rank/error distributions. A single mean outranking rate is not enough to validate IID Binomial tails.
- Compare a better first stage with recurring rerank work under a common quality and cost target.
- Recompute pair lengths when truncating. A shorter selected window can save work but can also remove needed evidence, and finding the best window is not free.
- Validate early exits, token policies and long-evidence cases; neither an empirical layer choice nor the two-point length exponent is a universal guarantee.
22.3 LLM rerankers: pointwise, pairwise, listwise
What
Pointwise prompts return a candidate score, pairwise prompts compare two candidates, and listwise prompts order a group. Classical learning-to-rank can put coupling in the training loss without placing multiple documents in one forward pass. RankNet is one such pattern; the source also discusses McRank and SetRank. Without order-dependent features, self-attention produces permutation-equivariant per-document scores, not an invariant score vector: permuting inputs permutes outputs. A resulting document order can be invariant after mapping scores back, subject to ties and implementation. A frozen LLM can sometimes supply useful pointwise rankings; joint comparison is an option to test, not a logical necessity or a guarantee of calibration.
Why
For a -billion-parameter reranker under the rule and the stated throughput, one input token costs
With query/instruction preamble tokens and document tokens, pointwise input is tokens and pairwise input , with work proxies and per call. Their verdict output tokens are omitted. For , listwise prefill is tokens and the assumed identifier output is , totaling and . This deliberately applies one FLOP rate to prefill and serial decode; actual decode throughput, identifier lengths and formatting differ. Call counts are:
and, at stride ,
For , that aligned schedule has nine dependent calls. Pairwise top- extraction need not compare all pairs. For a deterministic transitive comparator, Floyd heap construction plus repeated extraction has a conservative comparison bound:
At , the bound is comparisons versus all-pairs comparisons. It is not a fixed observed count. Extraction and heap construction both have dependencies; the extraction term alone is not the full serial depth. A balanced tournament uses comparisons for a winner and at most rounds, with adequate parallel workers and explicit byes. A cyclic, stochastic LLM comparator need not define a total order, so different schedules can yield different results.
Failure without it
Pointwise scores need validation for ranking and cross-query confidence; a prompted scalar is not automatically calibrated. Pairwise cycles or inconsistent repeated judgments can make a comparator-based algorithm return an unstable order or fail its assumed ordering contract. Listwise outputs can depend on input permutation, context length and formatting. Declaring candidates together does not remove positional bias. The source treats the origin of zero-shot comparative ability as a hypothesis, not a proved result.
Cost, complexity, and worked example
| Mode | Calls | Counted model positions/tokens | Total work / single-resource rate | Dependency and capacity scope |
|---|---|---|---|---|
| BERT-base cross-encoder baseline | input positions | single-device work proxy | One dependency layer; only with one full-rate worker per pair, before overhead | |
| Pointwise LLM | input tokens | single-device work proxy | One dependency layer; only with enough independent full-rate workers | |
| Pairwise all-pairs | input tokens | single-device work proxy | One layer, not one call-time on one fixed-throughput device | |
| Pairwise heap top | At most | At most input tokens | At most proxy work | Implementation-dependent heap-build/extraction critical path; not a fixed depth of one hundred forty |
| Pairwise tournament top | input tokens | single-device work proxy | At most seven rounds; ideal unlimited-resource path | |
| Listwise with | input/output tokens | work proxy | Nine dependent calls; same resource-time sum before request overhead |
For these specific input/output counting rules and windows, pointwise uses the least modeled LLM work, not universally the cheapest LLM ranking design. Its work is approximately times the fuller BERT proxy. The parameter-and-input-length-only ratio is:
Dividing that ratio by the full attention correction gives approximately . Do not explain a difference between rounded inputs as measured overhead. These resource-time totals are neither invoices nor measured response times. Independent calls permit concurrency only when hardware and service limits support it. For total work on identical resources, is a work-capacity constraint under the assumed rate; the model-call dependency path is another constraint. Giving a hundred pointwise calls one-call wall time implicitly supplies a hundred full-rate workers in this idealization. Batching can improve utilization but cannot increase fixed aggregate capacity without bound. A cascade reranks one hundred candidates to twenty with the fuller cross-encoder proxy, then uses one listwise call. Its modeled sum is before request overhead, about times below the full nine-window work sum, with nine times fewer LLM tokens. Add a stipulated round trip for the LLM call and it becomes . The cascade may discard candidates the LLM would have rescued. Under the simplified total context budget:
At , this simplified prompt/output count uses of tokens, leaving of capacity. Eleven additional passage slots are of twenty used slots, not fifty-five percent of the context budget. Actual identifiers, separators, instructions and model output reserves can lower capacity. Quality and ordering reliability can bind before nominal fit; raw fit alone does not prove the limiting factor.
Decisions and limits
- Benchmark frozen pointwise, pairwise and listwise prompts against a trained cross-encoder; treat any default as a starting heuristic.
- Count actual tokens, model calls, dependency rounds and available worker capacity. Report both work and request latency.
- A cross-encoder cascade can reduce LLM work but creates a candidate ceiling; evaluate disagreements and gold survival.
- Validate pointwise calibration where needed, pairwise cycles/repeatability and listwise permutation sensitivity and repair rates.
- Larger all-pairs or repeated-permutation designs can be useful offline, but hardware cost remains even when user latency is irrelevant.
22.4 monoT5 to RankT5: from classification to ranking losses
What
monoT5 prompts a query/document pair with Relevant: and uses the output-token logits for true and false. The renormalized probability over those two tokens, rather than their raw vocabulary probability, is:
The source reports monoT5 transfer from MS MARCO training to TREC Robust04, and describes RankT5 using a relevance logit associated with the sentinel extra_id_10. Reported improvements depend on the model variant, loss and training recipe; separable classification is not a theorem that ranking must fail. For the workload arithmetic below, separately assume query groups. That is not interchangeable with five hundred thousand individual query-document pairs.
Why
The monoT5 pointwise objective is
Its per-logit derivative is , while shared parameters can still couple the learned representations. Compare two-candidate lists: a negative binary probability changes , while the positive is either or . BCE on the negative has the same increase in both cases:
For the one-positive illustrative listwise loss, convert those binary probabilities to logits , then apply a candidate softmax. RankT5 can learn unbounded logits directly; the conversion here only makes the numerical comparison fully specified:
With exactly one positive and the changing negative, listwise loss increases by nats for gold probability , and nats for gold probability , a ratio . The earlier and figures did not follow from these stated probabilities. Adding other candidates changes the denominator and these values; they are not universal penalties. For a one-hot target:
The positive logit has pull magnitude and all negative logits together have equal opposing mass. Individual negatives receive weights . With summed unweighted BCE, the negative-to-positive logit-gradient mass is instead:
At positive probability and all negatives , that mass ratio is at and at . Class weighting or separately normalized positive/negative terms changes it. Neither gradient balance nor coupling alone proves better held-out ranking.
Failure without it
High classification accuracy can coexist with poor ranking, but calibrated relevance probabilities can also produce useful rankings. A strictly increasing within-query map preserves all score order and ties, so it cannot change MRR, NDCG or MAP if tie handling is unchanged. Converting a sigmoid to its logit has this property away from numerical saturation. Positive-slope Platt scaling does too; isotonic regression is only nondecreasing and can merge distinct scores into ties, allowing metric changes under a tie policy. A negative-slope map can reverse order. Calibration is not a replacement for discriminative ranking supervision. For the same gain difference and ideal-gain normalizer, full-depth DCG/NDCG discount gaps are between ranks one/two and between ranks ninety-nine/one hundred. Their ratio is about . Actual NDCG swap changes also multiply the gain difference and divide by IDCG. At cutoff ten, both tail ranks are outside the metric and their swap has zero effect; the quoted finite ratio does not apply there. LambdaRank can weight score-pair updates by the relevant metric change, under its own conventions.
Cost, complexity, and worked example
The -entry language-model head costs
A full vocabulary projection is approximately of the encoder-only proxy below, so changing only a selected output row offers a small arithmetic saving. It does not follow that the complete encoder-decoder scoring step is that encoder cost alone. For the explicit width-, feed-forward width-, twelve-layer encoder scenario:
At , encoder linear work is FLOPs and attention matrix products add , giving . Embedding lookups, norms, biases and nonlinearities are not counted. A full encoder-decoder variant also needs document-dependent cross-attention keys/values for its single decoder step. They cannot be assumed already cached for a newly scored candidate. With twelve decoder layers of the same width and feed-forward size, their projections alone cost FLOPs. Other one-position decoder linear maps cost FLOPs; self/cross attention dot/value products add , and the full vocabulary head adds . This explicit decoder total is , approximately of encoder work, not the earlier under-one-percent claim. Use FLOPs, or at the assumed rate, for the following matched full encoder-decoder workload. This is a stated architecture/caching scenario, not an externally verified implementation profile. An encoder-only variant, projected/cached memory or a selected-head-row implementation has another budget. Changing the loss while preserving the scoring architecture need not change per-candidate serving work; it does not imply all model variants have identical cost.
| Workload design | Scored sequences per group epoch | Training-proxy FLOPs | Work / assumed rate | Serving scope |
|---|---|---|---|---|
| monoT5, one positive and one negative | proxy | proxy for one hundred candidates | ||
| RankT5, list size | proxy | Same only when the scoring architecture and lengths are held fixed |
The eightfold training-work ratio comes from equal query-group epochs with two versus sixteen scored candidates and the same assumed training work per candidate. It is not an unavoidable eightfold measured training-time penalty or a conclusion from a pair count. List construction, optimizer state, backward work, batching and hardware are additional factors. For a matched sixteen-candidate loss example, let the positive binary probability be . Fifteen random negatives with probability give and list loss nats after the defined logit transform. Replace one by a hard negative and retain fourteen at : the loss becomes , about times larger. Uniform sampling from a large corpus does not by itself establish any of those predicted probabilities. In the separate twenty-document gradient figure, probabilities are for gold, for one distractor and for eighteen tails. Summed BCE allocates of negative logit-gradient mass to the top distractor; softmax list loss allocates . Neither number is a fraction of encoder-parameter gradient norm. Subtracting the source's rounded BERT embedding count gives nonembedding parameters, approximately above the simple T5 encoder-block count. Embeddings are about of the stated BERT total; a percentage markup over a smaller nonembedding denominator is a different quantity. These bookkeeping differences do not isolate a measured architecture-latency cause.
For a one-hot target and the same softmax logits, the added-term gradient equals times the cross-entropy gradient. If , the combined gradient is times it. The ratio can be large near high confidence, but both terms vanish as the example becomes perfectly classified. This identity is not a guarantee of improved generalization or a reason to ignore negative quality.
Decisions and limits
- Compare pointwise, pairwise and listwise losses under controlled candidate lists and evaluation, rather than call one universally correct.
- Train on useful competing candidates from refreshed retrieval pools; account for false negatives and label uncertainty.
- Define query-group count, list size, epoch and loss normalization before quoting a training multiplier.
- Keep the scoring architecture fixed before claiming unchanged serving work; include decoder memory projections if applicable.
- Calibrate cross-query abstention separately. A pointwise loss is neither necessary nor sufficient for calibrated confidence, and a ranking loss can be combined with calibration.
- Test any poly-1 coefficient after the base objective and negative sampling are sound.
22.5 Zero-shot listwise prompting and the sliding window
What
A prompted listwise ranker returns a permutation of local passage identifiers; it does not return calibrated relevance scores. For this one-pass progressive schedule, start with the tail window, rank it in place, and shift toward the head by . For an implementation that clamps the last full window to start at rank one:
For , the count is nine. When , use one window over the available candidates. If is not an integer, the last shift is shorter under this policy; an implementation using partial windows can have different token counts.
Why
For aligned full windows, the top positions of a ranked window overlap the next one; its bottom never get revisited in this pass. A candidate initially at rank first enters a particular window and, if retained in every overlap, can reach the final head window after:
The default counts are nine participating calls from rank one hundred, five from fifty, two from twenty and one from ten. To finish at rank one, the required events are intermediate overlap survival and then winning the final window; merely surviving that final window is not enough. Let be each required event's probability conditional on all earlier successes. The chain rule is:
At an assumed constant conditional value , tail and head examples give and , ratio . The schedule determines the number of required hand-offs, not their probabilities. Different window content, position bias and correlated model errors can change those conditional values. This is one progressive block-ranking pass, not a guarantee of a globally sorted list.
Failure without it
Five disjoint windows of size twenty can promote a rank-one-hundred candidate only to rank eighty-one in that pass. A single head-to-tail overlapping sweep has the same limit for that candidate because it appears only in the last window. These facts do not rule out other algorithms, repeated passes, tournaments or global comparisons. Parse permutation output explicitly: retain valid identifiers in first-appearance order, remove duplicates/out-of-range values and append missing identifiers in their original relative order. On total parse failure, fall back to the input order and log the failure; repair can conceal an ineffective ranker if not monitored.
Cost, complexity, and worked example
The worked budget assumes input tokens and output identifier tokens per full window, ignoring additional input labeling/formatting. It applies the same forward-FLOP rate to both phases. Thus total modeled tokens per call are:
Add a separately stipulated request/queue overhead per call. The windows depend on earlier outputs, so those overheads cannot be hidden by parallelizing windows within the same pass. The compute column remains a work proxy, not measured decode latency.
| Schedule | Calls | Modeled tokens | Compute work / rate | With stipulated round trips | Best possible tail rank in this pass |
|---|---|---|---|---|---|
| , | |||||
| , | |||||
| , | |||||
| , |
At stride , document slots total
The default uses document slots, document tokens and preamble/output tokens, totaling . Changing to gives four calls and modeled tokens: an token saving. With the stipulated round trips, time-proxy saving is . Wider windows alter both content and the number of hand-offs. Under separate constant-conditional-success assumptions, the tail comparison is:
or
At , break-even is , an absolute drop about percentage points. This is conditional arithmetic, not proof that wider windows meet that reliability. No-overlap windows save of these modeled tokens but disconnect the tail-to-head path. Cutting depth to fifty with the default window/stride gives four calls and including overhead, a decrease from ; recall below the cut is lost. In these scenarios listwise reads times the document tokens but times the modeled total tokens of pointwise, which omits its own verdict output. Depth, window size, overlap, output lengths and real decode rates jointly determine actual costs.
Decisions and limits
- Treat window twenty/half overlap and tail-to-head motion as one practical starting schedule, not the only possible ranking algorithm.
- Validate integer window boundaries, output reserve, candidate labels and special-token accounting.
- Measure candidate loss when reducing depth or inserting a cascade; measure window reliability and permutation bias when changing width.
- Log repair/fallback rates, gold survival by hand-off and final ranking metrics, not only output/input rank correlation.
- Twenty serial repeated default passes have modeled compute and including the stipulated round trips, before other overhead. Independent repetitions still need resource capacity if run concurrently.
- A cross-encoder-to-twenty cascade saves modeled LLM work but inherits its upstream omissions; compare it on the same judged queries.
22.6 Instruction-aware reranking
What
Instruction-blind scoring uses . An instruction-aware cross-encoder can instead use , implemented by a declared concatenation template rather than numeric addition. It permits document states to depend on instruction tokens. Other architectures can also condition on intent; a metadata filter, query encoder, routing policy or other explicit side information can carry it. A document index need not be rebuilt merely because the scorer reads an instruction.
Why
For a deliberately symmetric impossibility example, fix the same query and two candidate documents under two equally likely instructions, with a different gold document for each. Assume the scorer and tie-breaking see neither the instruction nor any correlated side channel. It assigns fixed logits , gap . The sum of the two one-positive list losses is:
The mean floor is nats. For the same candidates under equally likely instructions with distinct golds, fixed softmax probabilities obey ; mean loss is at least . An instruction-independent winner has average intent-correct-at-one at most . These are symmetry/missing-information bounds, not universal ceilings for all instruction-blind deployments. With unequal intent frequencies the analogous optimal mean log loss is their entropy and best fixed-winner accuracy is the largest frequency. Candidate filtering, query changes or other intent-correlated inputs can invalidate the fixed-input assumptions. The source describes TART-full training on task instructions and a negative pool mixing random and mined instruction violations, nominally . This is reported recipe context, not a proof that all random negatives carry zero instruction gradient or that ten percent is universally sufficient. On-topic instruction-conflicting examples make intent dependence identifiable in the relevant comparisons; labels, coverage and optimization still determine whether the model learns it.
Failure without it
An instruction-conditioned query embedding can select among document directions already represented by a fixed index, including directions learned during instruction-aware training. It is not generally impossible to support new intent without re-embedding documents. A standard nonnegative bag-of-terms score does not enforce a hard logical exclusion by itself, but retrieval systems can combine filters, negative weights or query operators. Explicit instruction input is not sufficient for learning or ranking quality. A single-intent benchmark cannot isolate sensitivity to conflicting instructions; use matched queries/candidates with differing golds. Random-only negative training does not mathematically force no quality improvement.
Cost, complexity, and worked example
The work example uses a separate -chunk corpus, the same BERT proxy, query and document positions, depth , and an extra instruction positions. The corpus size does not multiply this rerank cost once the candidate set is fixed. Intent-success predictions below are conditional statements, not benchmark measurements.
| Scorer design | Processed pair positions | Forward-proxy FLOPs | Pair work / rate | Depth-hundred work / rate | Intent-success scope |
|---|---|---|---|---|---|
| Instruction-blind | At most only in the fixed balanced two-intent example | ||||
| Add -token instruction, random negatives | No guaranteed improvement; random negatives do not logically force failure either | ||||
| Same input, negatives | Conflicting on-topic supervision supplies an intent signal, not a guaranteed score gain |
At , the linear term is and attention adds FLOPs. The added depth-hundred work is at the assumed rate, or . If exactly ten percent of equally weighted training examples, not merely negatives, are the balanced contradictory pairs above, an instruction-blind model has at least this contribution:
A loss plateau near that value is not a diagnostic proof: other losses, label noise, normalization and regularization can contribute. Verify instruction-dependent ranking on controlled conflicting examples. The extra instruction work is equivalent to this many additional baseline-length candidates in the same proxy:
Only eleven full additional candidates fit that budget; rounding to twelve exceeds it slightly. At the unrounded dense endpoint slope, increasing depth one hundred to one hundred eleven would change the fitted candidate ceiling by:
This is a hypothetical compute exchange, not an observed equivalence between intent quality and recall. Twelve extra candidates would give about fitted points but cost more than the exact budget. The two-point length exponent predicts:
The fitted increase is approximately , versus from the explicit linear-plus-quadratic proxy. A two-point power-law fit is not identical to that sum, whose local elasticity varies with length. Neither is a measured hardware scaling law.
Decisions and limits
- Prefer reliable metadata constraints for hard requirements when available, without mistaking approximate ranking preference for enforcement.
- Give the scorer a documented intent input and train/test on topical conflicts where the intended winner changes.
- Treat the source's ten-percent mined pool as a recipe to validate, not a universal information threshold.
- Swap instructions on matched queries/candidates and inspect pairwise margins, gold order and success. Absolute score changes alone can reflect a common offset rather than useful rank changes.
- Test instruction robustness across tasks and free-text phrasing; a fixed one-instruction-per-task dataset can have confounds.
- Keep the document encoder/index contract explicit. A changed query-side intent does not automatically require all four million documents to be re-embedded; changing the stored document representation may.
22.7 Document-bound versus model-bound
What
For a fixed first-stage pool, let be the probability that specified gold evidence is in context. In general, answer success is , where and are success probabilities with and without that evidence. The following toy sets and the same for both context sizes and rankers:
Compare with for a specific available ranker. Calling the larger document gain “document-bound” and the larger ranker gain “model-bound” is an operational label, not an intrinsic pipeline property. If the interventions have different costs, also compare gains per added latency, price or other constrained resource; raw gains alone do not identify the better investment.
Why
Use an unbounded geometric placement surrogate with . A real candidate set has finite size ; the next equation is the surrogate, not an exactly normalized finite-pool rank law:
With , the exact version conditioned on rank at most and its large-pool approximation are:
The source reports in a different MS MARCO reranking comparison. The chosen geometric parameter gives , not the untruncated mean . Numerical closeness does not identify the true rank distribution, and conditional-on-retrieval MRR cannot be fitted directly to an unconditional score without accounting for misses. Combining this illustrative parameter with DPR Natural Questions recall is a scenario, not one benchmark fit. In the unbounded surrogate, one more document gains:
Upgrading from to the specified smaller changes the large-pool conditional coverage by:
Equating the two gives
The common positive factors cancel only because this scenario holds them fixed for both interventions. If extraction changes with context order/length, or the first-stage pool changes, they need not cancel. For and :
At integer , document/ranker coverage gains are and percentage points; at , they are and . Thus the surrogate favors another document through and the specific ranker from . At five, the end-to-end gain difference is only about percentage points after the common scale, far below many practical measurement resolutions. The increase is in the geometric parameter, not an observed -point MRR or answer-quality gain. Finite-pool normalizers depend on each ranker and alter the exact crossing; at their corrections are tiny here, but the closed-form formula is still the unbounded approximation.
Failure without it
A removal ablation tests the total contribution of the current reranker, not the marginal return from an available upgrade. Increasing context coverage is monotone in the placement toy; real answer success need not be, because extra distractors, positional changes and extraction behavior can hurt. There is no general theorem that real answer quality follows a particular U-shaped curve or that a single context-count threshold captures every harm. Measure the relevant interventions and budget at the current operating point.
Cost, complexity, and worked example
For the illustrative combined scenario take . The following table uses the large-pool geometric approximation, with common factor:
| Context size | Baseline toy success | With one more document | With specified new ranker | Raw marginal comparison |
|---|---|---|---|---|
| ; gain percentage points | ; gain points | Document gain larger by points, before comparing intervention costs | ||
| ; gain percentage points | ; gain points | Specific ranker gain larger, before comparing intervention costs |
One extra -token document costs
or
Dividing modeled absolute quality gains by this added-document proxy gives percentage points per resource millisecond at and at . A comparable cost for the ranker upgrade is still required for an investment decision. At , the scenario gives:
The source cites an end-to-end Natural Questions score . Merely forcing the toy to that endpoint would require:
That endpoint adjustment is percentage points above the assumed extraction, but does not establish the actual system's extraction probability or validate the combined model. The reported experiments differ. At the modeled extra-document gain is only about in answer-success fraction; that is a toy extrapolation, not evidence that all additional text is useless. Going from five to one hundred documents adds under the document-only linear prefill proxy, before real long-context costs and quality effects.
Decisions and limits
- Measure both interventions on one held-out query set at the actual context size and report uncertainty and cohort effects.
- Compare absolute gains and gain per constrained resource; name the purchasable upgrade and its cost.
- An oracle evidence ordering gives a candidate-coverage ceiling for a specified retrieval metric, not automatically an upper bound on every generator behavior.
- Refit after changing context length, first-stage pool, chunking, ranker or generator; extraction need not remain constant.
- Treat the worked crossing near five as an illustration, not a below-five/above-five rule.
- Do not manufacture a flip from changes within measurement noise, and do not use a removal ablation as the return from a different ranker upgrade.
Diagrams
Figure 22.1
Diagram description and source
flowchart TD
A["Corpus"] --> B["First stage: generate a candidate set"]
B --> C["Candidates: omitted evidence is not recoverable by fixed-set reranking"]
C --> D["Second stage: score, order and truncate the candidates"]
D --> E["Final context"]
E --> F["Generator: evaluate final answer quality and operating cost"]
Figure : For the same gold-item events, . With , the linear-work scenario scores of the corpus in stage two and spends of the retrieval arithmetic there. Its rerank work proxy is smaller than the document-prefill proxy removed by reducing context one hundred to five. These are scoped resource-time estimates, not measured savings, a flat-search upper bound or a proof of better answers.
Figure 22.2
The fits are and , using unrounded slopes for calculations. Only depths twenty and one hundred are the supplied endpoints; fifty is interpolation. BM25 reaches the dense depth-twenty ceiling at fitted depth , rounded upward to , about times the rerank depth. Figure : The fitted slopes are and percentage points per doubling. Equal predicted candidate recall is not equal answer quality. The depth-one-hundred-sixty-eight comparison extrapolates the BM25 fit, and the costs are resource proxies, not benchmarked latency. The independent-distractor survival model is a separate toy and should not be inferred from these first-stage endpoints.
Figure 22.3
Diagram description and source
flowchart TB
P["Pointwise: one candidate, one score"] --> PW["Independent calls still require total work and worker capacity"]
Q["Pairwise: compare two candidates"] --> QW["All pairs, heap extraction and tournament have different work and dependencies"]
L["Listwise: order a candidate group"] --> LW["Overlapping progressive windows depend on previous outputs"]
PW --> V["Validate ranking quality, consistency, resource use and request latency"]
QW --> V
LW --> V
Figure : At depth one hundred, the stated prompts give pointwise calls and modeled work; all-pairs calls and ; tournament winner calls, at most seven comparison rounds and total work; default listwise nine dependent calls and work. The heap bound is at most comparisons, not a full serial depth of . Dependency rounds, total work and available throughput all constrain latency. This comparison mixes input-only verdict proxies with explicitly counted list output, as stated in the workload.
Figure 22.4
| Loss design | Candidate encoding | Output/loss convention | Gold logit-gradient magnitude | Top-negative magnitude | Eighteen-tail sum | Negative logit allocation |
|---|---|---|---|---|---|---|
| monoT5 classification | One separately encoded query-document pair per score | Binary probability with summed BCE | Top distractor receives of negative logit-gradient mass | |||
| RankT5 ranking | Separately encoded pairs coupled by a same-query loss | Unbounded logits with candidate softmax | Top distractor receives of negative logit-gradient mass |
Figure : Numerical magnitudes of derivatives with respect to each relevance logit, not encoder-parameter gradient norms. Gold binary probability is , the top distractor , and eighteen tails each. BCE derivatives are ; the list example first maps and uses . The gold derivative is negative; tabulated entries are magnitudes. Total negative logit mass equals the gold magnitude for the list loss. The table is not a to-scale bar plot and does not establish that every monoT5 and RankT5 implementation has identical forward cost.
Figure 22.5
Diagram description and source
flowchart BT
W1["Window 1: ranks 81 to 100. Freeze 91 to 100"] --> W2["Window 2: ranks 71 to 90. Freeze 81 to 90"]
W2 --> W3["Window 3: ranks 61 to 80"]
W3 --> W4["Window 4: ranks 51 to 70"]
W4 --> W5["Window 5: ranks 41 to 60"]
W5 --> W6["Window 6: ranks 31 to 50"]
W6 --> W7["Window 7: ranks 21 to 40"]
W7 --> W8["Window 8: ranks 11 to 30"]
W8 --> W9["Window 9: ranks 1 to 20. Only this call can place the document at rank 1"]
Figure : The displayed tail-to-head sweep has . Each nonfinal window fixes its bottom ten positions because later windows no longer touch them; the last window fixes the full remaining head. A rank-one-hundred candidate needs eight successful top-ten hand-offs and then a rank-one result in the final window. This supplies a possible promotion path, not guaranteed global sorting. Only under equal required conditional success probabilities is its final rank-one probability . Other algorithms or repeated passes can create different paths.
Figure 22.6
| Off topic | On topic | |
|---|---|---|
| Follows instruction | Can be rejected by topical relevance | A relevant positive when labeled for this intent |
| Violates instruction | Off-topic negatives; the reported recipe draws many at random | On-topic conflicting negatives can distinguish instruction-dependent preferences |
With the fixed, balanced two-intent assumptions, an instruction-blind scorer has mean list-loss floor nats and intent-correct-at-one at most . Figure : Topical, instruction-violating examples directly test the distinction that query-topic matching cannot resolve. The reported negative pool is a recipe, not a proof that random negatives have zero instruction gradient or that the negative fraction equals a fraction of equally weighted training-example losses. Use controlled instruction swaps and ranking margins to test learned intent dependence.
Figure
Figure : The unbounded geometric scenario compares with , not a measured -point MRR upgrade. The new ranker wins the raw marginal comparison from integer context size five. Common fixed positive factors preserve this crossing only under the zero-without-gold, constant-extraction assumptions; differing extraction or first-stage behavior can change it. Finite candidate sets need their normalizers. The source MRR is only a rough motivation for a hypothetical parameter, not an identified rank-distribution fit. Costs and uncertainty are needed before recommending an investment.
Whiteboard pack
What to draw
- Draw corpus , candidate set and final context as a funnel.
- Label the gold-item ceiling and define the conditional factor.
- Add FLOPs per dot and fuller pair work divided by the assumed rate. Say these are proxies, not measured latency.
- Contrast endpoint-fitted candidate coverage with an explicitly IID distractor-survival toy. Enforce the depth budget.
- Compare pointwise, pairwise and listwise calls, tokens, dependency paths and finite resource capacity.
- Draw nine overlapping tail-to-head windows. Distinguish eight hand-offs from the final rank-one decision.
- Add explicit instruction access and on-topic conflicting supervision. State the balanced fixed-input assumptions behind a blind-score bound.
- Compare two measured interventions at current , their costs and uncertainty. Label the toy crossing , not a universal design threshold.
Spoken script
Start with a candidate funnel. A fixed-set ranker cannot recover omitted gold evidence; its conditional inclusion factor multiplies first-stage coverage. Price resource work, then benchmark actual latency under the available hardware. Select depth from measured coverage, rank quality and cost rather than a fixed tradition or an uncalibrated distractor toy. Compare LLM ranking modes by tokens, comparisons, dependency paths and worker capacity. A tail-to-head overlap schedule supplies one promotion path, but final rank one needs more than merely surviving a window. Give instruction-aware scoring useful intent information and conflicting examples, then test matched instruction swaps. Finish by comparing one more document with a named stronger ranker at the current context size, including intervention costs and uncertainty.
Interview traps
1. “What rerank depth do you use, and why?”
Answer: measure first-stage gold inclusion, conditional final-context inclusion, ranking metrics and actual latency on the same query cohorts at several depths. The worked fuller pair proxy is ; the endpoint fits gain dense and BM25 percentage points per doubling. They are not universal slopes. A fixed IID-error toy favors depth without a budget, but the stated resource budget allows at most and favors that endpoint within the feasible range. Real heterogeneous or correlated errors need measured distributions; deeper is not inevitably worse.
2. “Pointwise, pairwise, or listwise for a frozen LLM over 100 candidates?”
Answer: benchmark frozen pointwise, pairwise and listwise prompts on judged data; prompted scalar scores are not automatically calibrated, but a frozen prompt is not logically incapable of useful pointwise ranking. The example work sums are pointwise, all-pairs and nine-window listwise. Independent calls do not become one-call wall time on one fixed-throughput device. The cross-encoder-to-twenty cascade plus one listwise call is of proxy work, or with its stipulated round trip, and inherits upstream omissions.
3. “Why slide listwise windows from the back, and why overlap them?”
Answer: in this one-pass schedule, overlap creates a tail-to-head promotion path. A rank-one-hundred candidate needs eight top-ten hand-offs plus a final rank-one win when . A head-to-tail single sweep or disjoint blocks can move that candidate no higher than rank eighty-one, but that is not an impossibility claim for other ranking algorithms or repeated passes. Use integer/clamped window counts and log malformed-output repair, fallback, permutation sensitivity and gold loss by hand-off.
4. “We added an instruction and quality did not change. What failed?”
Answer: test fixed queries and candidate lists whose gold ordering changes with the instruction. Mine relevant topical conflicts and inspect instruction-dependent margins and ranking changes, not only a common absolute score shift. The source's ten-percent mined negative pool is a recipe to tune; random negatives do not mathematically imply zero intent gradient. A balanced fixed-input two-intent setup gives a blind-model mean loss floor and intent success at most , but intent-correlated filtering or query changes invalidate that particular bound. Query-side intent can work with a fixed document index.
5. “Should we send more documents or buy a better reranker?”
Answer: evaluate quality at and with a specific stronger ranker at the original , then compare gains per relevant resource and uncertainty. The combined toy gives document/ranker gains percentage points at , and at . It changes the larger raw gain between integer sizes four and five, but at five the difference is only end-to-end points. Context-dependent extraction, different pools and actual intervention costs can change the decision. Removing the present reranker measures total contribution, not a purchasable upgrade's marginal return.
Key numbers
Two-stage arithmetic
| Quantity | Value |
|---|---|
| Dense dot product at | FLOPs in the declared multiply-add proxy |
| BERT-base pair under simple rule | FLOPs at exactly processed positions |
| Full BERT-base pair with attention term | FLOPs including the stated attention matrix products |
| Pair versus dot-product ratio | for the linear pair proxy divided by one dot |
| One-stage cross-encoding over million chunks | FLOPs; linear proxy only |
| Staged retrieval with | FLOPs including flat dots and linear rerank work |
| Staging reduction | work ratio under those matched proxies |
| Stage- corpus share | of corpus candidates |
| Stage- retrieval arithmetic share | of the staged retrieval arithmetic |
| Flat-search bytes | flat fp32 vector payload |
| Idealized flat-read resource time | at the stipulated streaming bandwidth, not an upper latency bound |
| Rerank candidates | linear proxy; with attention |
| Prefill five -token chunks with generator | document-only generator proxy |
| Prefill chunks | document-only generator proxy |
| Prefill removed by reranking to five | modeled difference, not measured end-to-end savings |
| Prefill-work saving divided by linear rerank work | ratio; excludes attention and other serving work |
Depth and recall
| Quantity | Value |
|---|---|
| DPR Natural Questions top | reported candidate hit rate |
| DPR Natural Questions top | reported candidate hit rate |
| DPR slope | percentage points per doubling in the two-endpoint fit |
| BM25 Natural Questions top | reported candidate hit rate |
| BM25 Natural Questions top | reported candidate hit rate |
| BM25 slope | points per doubling in that fit |
| BM25 depth for fitted recall | continuous; integer , extrapolated beyond the endpoint |
| Cost multiplier against DPR at | About times the candidate work at fixed pair lengths, not a measured request-latency ratio |
| Cross-encoder cost per candidate | fuller pair work divided by the assumed rate |
| IID-toy optimum and resource budget | unconstrained; . A budget instead selects feasible |
| Nogueira and Cho at | reported score; it does not identify a distractor probability |
| Distractor-model cross-check | yields toy at recall one, not ; matching the latter needs about under that toy |
LLM ranking modes
| Quantity | Value |
|---|---|
| reranker token time | forward-work proxy |
| Pointwise prompt | input tokens; proxy per call, verdict output omitted |
| Pairwise prompt | input tokens; proxy per call, verdict output omitted |
| Listwise call | input plus output tokens; proxy |
| All-pairs at | calls in one dependency layer; finite throughput still limits completion time |
| Heap top | At most comparisons; extraction term excludes heap-build dependencies |
| Tournament top | comparisons, at most seven rounds with suitable workers and byes |
| Sliding listwise | Nine dependent calls for the aligned default schedule |
| Pointwise accelerator bill | total single-device work proxy, not a quoted invoice |
| All-pairs accelerator bill | total work proxy |
| Listwise accelerator bill | total work proxy |
| Least LLM work in the specified comparison versus fuller BERT | ratio for pointwise under the stated token-count conventions |
| Cross-encoder to plus one listwise window | work proxy; with one stipulated round trip |
Losses and training
| Quantity | Value |
|---|---|
| Language-model head cost | FLOPs for one full vocabulary projection |
| Head share of T5 encoder pass | of encoder-only proxy; this does not include decoder work |
| Pointwise penalty in both perturbation cases | nats for the same changing negative in either two-candidate example |
| Listwise easy-query penalty | nats under the explicit probability-to-logit transform |
| Listwise hard-query penalty | nats under that transform and the stated two candidates |
| Penalty ratio | hard/easy loss-increase ratio |
| Pointwise negative-to-positive ratio at | summed unweighted negative/positive logit-gradient magnitude ratio |
| Pointwise negative-to-positive ratio at | under the same probabilities and loss normalization |
| nDCG swap ratio, head versus ranks and | only for equal gain differences, common IDCG and a cutoff including both tail ranks |
| Explicit full encoder-decoder pair scenario | FLOPs; proxy, including decoder/head FLOPs |
| monoT5 equal-query workload scenario | groups, two candidates each; training-proxy FLOPs, |
| RankT5 workload at | scored pairs; proxy FLOPs, |
| Training multiplier | Eightfold work for the declared equal-group epochs, not a universal measured training-time penalty |
| Serving cost for either at | only if the same full architecture and lengths are used |
| Random-negative listwise loss | nats for one positive and fifteen stipulated easy negatives |
| Hard first-stage list loss | nats after replacing one of those fifteen by the stipulated hard negative |
| Loss ratio | matched sixteen-candidate loss ratio |
Sliding windows and instructions
| Quantity | Value |
|---|---|
| Default sliding schedule | under the clamped-full-window policy |
| Default calls | Nine calls; general count |
| Default tokens | modeled input/output tokens; labeling overhead omitted |
| Default compute | total work proxy |
| Default with ms round trip per call | under the stipulated sequential overhead model |
| Rank- rescue at | only for the common required conditional-event probability |
| Rank- rescue at | for the corresponding single final rank-one event, not a measured rescue rate |
| Wider-window token saving | with |
| Wider-window round-trip-aware saving | under that sequential compute-plus-round-trip model |
| No-overlap token saving | modeled token saving; one-pass tail best rank |
| Halving depth in the stipulated sequential model | time-proxy saving, with possible candidate-recall loss |
| TART negative mix | random/ mined negatives as reported, not a universal gradient or loss fraction |
| Two-intent blind loss floor | nats, under fixed balanced contradictory inputs |
| Two-intent top- cap | only under those same symmetry and no-side-channel assumptions |
| Instruction-aware pair-time increase | fuller work increase from length to |
| Instruction time at depth | added work proxy at depth one hundred |
| Equivalent added candidates | baseline pairs by work; only eleven whole extra candidates fit |
| Equivalent fitted recall | percentage points from the fit at feasible depth ; twelve candidates exceed the budget |
Bound diagnostic
| Quantity | Value |
|---|---|
| Baseline geometric | , chosen as an illustrative placement parameter |
| Upgraded | , not an observed MRR increase of points |
| Geometric MRR check | versus reported ; untruncated mean is , and neither identifies the real rank law |
| Worked crossing | in the unbounded fixed-extraction toy; integer flip between four and five |
| At , document gain | answer-success percentage points under the combined toy |
| At , ranker gain | points for the specified ranker before comparing its cost |
| At , document gain | points under the same assumptions |
| At , ranker gain | points before comparing ranker cost |
| One extra -token chunk | FLOPs; document-only prefill proxy |
| Predicted exact match at | under the chosen common extraction/coverage scale |
| Cited exact match | separately reported; not a matched validation of this combined toy |
| Extraction rate needed to match cited value | is a forced endpoint fit, not measured extraction |
00-START-HERE · 01-READING-ROUTES · 21_learned_sparse_and_multi_vector_retrieval · 23_generative_retrieval