Open Agent School · Public worked example
Reranking: meaning and example
Welcome! Take one idea with you today.
Reranking is a second retrieval step. A fast first stage returns a shortlist of candidates (K of them); a slower, more careful model, often a cross-encoder that reads the question and passage together, scores each candidate and reorders them. Only the top few (n) go to the language model.
Picture it: An invented plant shop has 20 synthetic care passages for a question about yellowing leaves. Three passages truly answer it, sitting at first-stage ranks 2, 9, and 17. You must choose how many candidates to rerank and how many to keep for the answer.
What is easy to mix up?
A reranker cannot restore missing candidates. Measure first-stage recall at K, improve it with hybrid search or better chunking, and then use reranking to order the shortlist.
Teaching example by Open Agent School. Source: Nogueira and Cho - Passage Re-ranking with BERT.