How it works · 8 of 37 Core
What is reranking in RAG search?
A second, careful look
Reranking: Fetch many candidates fast, then a smarter model reorders them and keeps the best few.
Loading the animation…
Say it like this Reranking takes the pages a fast search returns and has a slower, careful model read each one together with the question, so the page that truly answers it rises to the top before the model sees it.
Under the hood — for builders
- The real setup: fetch many, rerank, keep few
- Anthropic's tested pipeline, with its real sizes:
- What reranking added
- Same tests, searches that missed the right chunk in the top 20 (lower is better):
- What each kind actually receives
- The two kinds from the tabs, drawn as their real inputs and outputs:
- Where it started
- BERT reranking (Nogueira & Cho, 2019) on MS MARCO (real Bing search questions): MRR@10 16.7 for keyword search alone, 36.5 reranked. MRR@10 averages 1 ÷ the right passage's position (1.0 = always first).
- LLM vs trained reranker
- RankGPT, ranking quality (nDCG@10, 100 = perfect order) on the TREC DL19 search test: GPT-4 75.6, Cohere Rerank v2 73.2, monoT5 (3B) 71.8.
- Cost
- One extra step per question: a little latency. More candidates = better results but slower (Anthropic).
- Tools
- Cohere Rerank, Voyage rerankers, or open cross-encoders (e.g. sentence-transformers' MS MARCO models).
- Watch out
- A reranker can only reorder what fast search fetched: if the page isn't in the 150, it's gone.
- Sources
- Anthropic, Contextual Retrieval (2024) · Nogueira & Cho, Passage Re-ranking with BERT (2019) · Sun et al., RankGPT (EMNLP 2023).
What happens in the reranking animation, step by step?
- A customer asks. Fast search scans all the shop's help pages in milliseconds and picks its 20 best guesses. Shown here: its guesses #1 to #5, and #14.
- Your turn: which page actually answers the question? Tap it.
- #14 is the answer, but only the top 3 go to the AI model that writes the reply. #14 sits below the line, so the model never sees it. Why?
- Fast search turns the question and each page into numbers separately, then compares the numbers. The words never meet, so the match is easy to miss.
- A reranker reads the question and the page together, word against word. It sees that “no proof of purchase” answers “without the receipt”.
- It does this for each of the 20 guesses, then re-sorts them: #14 jumps to #1 and crosses the line. Same 20 pages; now the right one reaches the model.
- There are two kinds of reranker. Both only see fast search's 20 guesses: one scores them one by one, the other sorts the list in one go. Tap to compare.
What everyday example explains reranking?
A recruiter skims 50 CVs; the manager reads the top 10 properly.
Why should a team care about reranking?
Usually the cheapest big quality jump in RAG.