AI Glossary

Reranking

Reranking scores an already retrieved set of candidates against a query and changes their order. It is a second selection stage that helps choose which passages deserve space in a model's context.

· Updated · Chain of Thought

RAG & Retrieval

Initial retrieval needs to search a large corpus efficiently. A reranker works on a much smaller candidate set, so it can examine the query and each passage more closely. It may use a cross-encoder or another scoring model; it does not have to be the language model that writes the answer.

Example: retrieve 50 passages, rerank those candidates, then supply the five strongest to the answer model. Those numbers are illustrative. Test whether the second stage improves evidence selection enough to justify its extra work. A reranker cannot recover a document that never entered its candidate set.

In episode 49, Fergal Reid describes Intercom’s investment in its own retrieval and reranking systems at 15:04. That is a case study, rather than proof that every team should train a reranker.

Retrieve candidates, then score them more closelyAn initial retriever searches a corpus and returns 50 candidates. A reranker scores the query against those same 50 and changes their order. Five selected passages enter the answer context. A document absent from the candidates cannot be recovered by this reranking stage. Retrieve candidates, then score them more closelyIllustrative counts: retrieve 50, rerank the same 50, select 5 Initial retrievalSearch the corpusReturn 50 passagesRerank candidatesScore query + passageReorder the same 50Select contextKeep 5 passagesThen generateMissing evidence stays missing: a reranker cannot recover an absent candidate.Measure evidence quality together with the extra latency and computation.Reranking changes selection order; it does not verify that a passage is true.
An illustrative two-stage pipeline following Cohere’s overview and Sentence Transformers’ retrieve-and-rerank tutorial. Counts are not measured results. Download the image

Sources

Go deeper

From the conversation