AI CompendiumA public chart of the language
Home / Retrieval & Memory / Reranking
Retrieval & Memory

Reranking

also called Reranker, Cross-encoder

A second pass that reorders candidates by actual relevance.

Definition

A model that scores each candidate against the query directly and reorders the results, after a fast first-stage retrieval has narrowed the field.

Retrieve loosely, rerank strictly. Fetch a hundred candidates cheaply, score them properly, keep the top five. This small step often improves answer quality more than swapping the generation model.

The pattern is a funnel: cheap retrieval casts a wide net, expensive scoring orders the shortlist. It works because a cross-encoder that reads query and candidate together is much more accurate than comparing two independently-computed vectors — and because you only pay that cost on a few dozen candidates.

How people use it
Improving a disappointing RAG system.
"The right passage was ranked eleven. Add a reranker before touching the prompt."
Worked example

The highest-leverage step in most RAG systems

The right document retrieves but sits at rank eleven, outside the top ten.

Reranking pulls it into the top three, so it survives the context budget. Where the budget only fits five chunks, the difference between rank eleven and rank two is the difference between a correct answer and a confident wrong one.

Sources
Related terms