Observe

W04 · 5 h 20 min

Ranking and context selection

Essential question

Why does an eligible source enter the context?

What you should be able to do

  1. Distinguish candidate generation, reranking, and context packing.
  2. Compute rank-sensitive metrics.
  3. Diagnose exposure, redundancy, and context-budget effects.
PrerequisitesW03 run files and error taxonomy.Bridge note on reciprocal rank and NDCG.
Builds on

W03 run files and error taxonomy. · Bridge note on reciprocal rank and NDCG.

Investigates

Why does an eligible source enter the context?

Feeds

L03 retrieval sandbox II.

Arrive with a prepared artifact

Reading route
Core PAPER-17/PAPER-22; Extend PAPER-18; inspect A04 and candidate repositories G03/G04.
Viewing route
Open the complete text-first lecture packageSix-minute worked NDCG example with ties and unjudged documents. The current equivalent is notes, slide script, worked case, and no-video transcript; no recording is claimed.
Readiness check
Explain why reranking cannot recover a relevant document missing from the candidate set.
Bring
A metric card specifying relevance scale, cutoff, aggregation, and unjudged policy.

Concepts, assumptions, and boundary

Ranking is a sequence of decisions

A retrieval stack often uses an inexpensive first stage to create candidates and a more expensive reranker to reorder a fixed set. Context packing then selects passages under a token or document budget. Improvement at one stage cannot repair candidates that were never generated. Conversely, a better candidate set can look unchanged if the reranker suppresses the new items. Experiments therefore preserve the candidate set when testing reranking and preserve the ranking when testing packing, making the changed factor interpretable.

Exposure competes with coverage

Rank-sensitive metrics value where relevant evidence appears, but context selection also faces redundancy, diversity, source concentration, passage length, and coverage trade-offs. An apparently high-quality slate may repeat the same claim from near-duplicate sources and crowd out complementary evidence. The course treats attention visualizations as mechanism clues only: they can help inspect an open model, but they are not a universal explanation of closed-platform selection or generated attribution.

Inspect the mechanism or evidence structure

MechanismRanked-slate inspection route
Ranked-slate inspection routeEach row connects an input record to the observation required at that pipeline stage: candidate membership, ordering, inclusion, overlap, or capacity. Equal-sized marks prevent the schematic from implying measured values.Candidate setrecord candidatesReranked slaterecord orderingSelected spansrecord inclusionRedundancy checkflag overlapContext budgetrecord capacityschematic states · no scores
Figure design. Five equal-format rows name the candidate, reranking, span-selection, redundancy, and capacity records needed to diagnose a retrieval pipeline. Shapes are categorical and encode no score. Equal-sized marks encode stages, not measured scores. Hold one stage fixed when diagnosing another.
Long description

Each row connects an input record to the observation required at that pipeline stage: candidate membership, ordering, inclusion, overlap, or capacity. Equal-sized marks prevent the schematic from implying measured values.

One action, one feedback state

Action

Reallocate a fixed context budget across candidate passages.

Feedback

The result reports relevance coverage, source diversity, and redundancy separately rather than collapsing them into one score.

Accessible alternative

A worksheet gives four predefined allocations and the same metric table.

Open the sparse/dense/hybrid retrieval explorer

Produce a reviewable intermediate file

Task
Rerank a fixed candidate pool, then run one context-packing ablation.
Inputs
Fixed candidates, relevance labels, passage lengths, rerank scores, packing script.
Timebox
75 minutes
Intermediate file
ranked-list comparison and context-allocation table
Stop condition
Reject an ablation if more than one stage or more than one budget changes.

Why each controlled source is here

Complete, retrieve, and revise

Checkpoint
L03 retrieval sandbox II.
Reflection
Name the exact stage responsible for one gain and one regression.
Revision
Replace aggregate-only conclusions with two topic-level examples and one limitation.
Low-compute route
Use precomputed scores and the deterministic packing simulator.

Five retrieval questions

01Why fix candidates in a reranking experiment?

It isolates ordering effects from candidate-generation effects.

02What does NDCG add beyond Recall?

It reflects graded relevance and position under a declared discount and cutoff.

03Why measure redundancy separately?

Several highly ranked passages can repeat the same evidence, reducing coverage even when relevance scores look strong.

04What is the evidence boundary for W04?

The assigned papers support ranking and exposure mechanisms within their settings; they do not establish a single commercial context-selection rule.

05What must you submit or revise after this week?

L03 retrieval sandbox II. Replace aggregate-only conclusions with two topic-level examples and one limitation.

Continue in the practice package