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.
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.
Sources
- Cohere: Rerank overview — Explains the query-and-candidate scoring stage.
Go deeper
- How do you evaluate a RAG system? AI, decoded · How to Evaluate a RAG System
- What is a reranker in a RAG system? AI, decoded · What Is a Reranker in RAG?
- Sentence Transformers: Retrieve and re-rank docs
Implement an efficient retrieval stage followed by closer query-passage scoring.