The Practitioner's LLM Curriculum ← Week 6 · Reranker Visualizer
Interactive · Week 6 · Section 3

How a reranker fixes mixed retrieval.

Same 60-chunk corpus from Week 5. Stage 1 is embedding retrieval — it pulls a top-20 candidate set by geometric distance, which mixes chunks from adjacent topical clusters. Stage 2 is the reranker — a cross-encoder that reads each chunk together with the query and re-scores by actual content relevance. Watch how the right answers climb from rank 14 to rank 1, and the visually-close-but-irrelevant chunks fall out of the final top-5.

Query
First-stage K 20
Final K 5

Embedding space · candidate retrieval shown geometrically

faded dots aren't candidates · accent rings mark final top-K
stage 1 Embedding retrieval
cheap · top-K1 by vector distance · breadth, not precision
stage 2 Cross-encoder reranker
expensive · re-scores top-K1, returns top-K2 by relevance

What's happening here