Reranker vs Retriever
The two stages of production RAG, and why you need both
Retrievers fetch a shortlist fast; rerankers score the shortlist accurately. Production RAG uses both. A bi-encoder retrieves the top 100, a cross-encoder reranks to the top 5.
Retriever
Glossary →First-stage search. Usually a bi-encoder (independent embeddings of query and docs plus vector similarity) or BM25 over an inverted index. Optimized for scanning millions of documents in milliseconds.
Best for: Fast shortlisting across a large corpus.
Reranker
Glossary →Second-stage scorer. Usually a cross-encoder that reads the query and each candidate document together and emits a relevance score. Much more accurate per pair, and much more expensive per candidate.
Best for: Scoring a shortlist with high precision.
At a glance
| Dimension | Retriever | Reranker |
|---|---|---|
| Stage | First (recall) | Second (precision) |
| Scale | Millions of docs | Dozens per query |
| Latency | Milliseconds | Tens to hundreds of milliseconds |
| Precomputed | Yes (doc embeddings) | No (per-pair) |
| Quality | Baseline | Higher on the shortlist |
| Best for | Cheap shortlisting | Precision on the shortlist |
Key differences
- 1Retrievers precompute doc embeddings; rerankers score each query-doc pair fresh
- 2Retrievers scale to millions of docs; rerankers scale to dozens per query
- 3Retrievers pay latency once at query time; rerankers add per-candidate latency
- 4Cross-encoder reranking typically adds 10 to 20 points of MRR or nDCG for a fixed budget
- 5Neither replaces the other; the two-stage pipeline is the production standard
In the interview
- Recommending a cross-encoder for first-stage retrieval
- Blaming embeddings for RAG quality when reranking is missing
- Assuming a better embedding model removes the need for rerank
- Missing that the reranker is O(k) per query, so it cannot scan the full corpus
How to choose
Retrieve with a bi-encoder, rerank with a cross-encoder. That is the production default.
Common misconceptions
Myth: A stronger embedding model removes the need for reranking.
Reality: Cross-encoders capture query-document interactions no static embedding can. A rerank still helps even the strongest embeddings.
Myth: Rerankers can run over the full corpus.
Reality: They score each pair fresh, so a full scan is O(N) per query. That is why they only rerank a shortlist.
Memory aid
Retriever: fast pass over the pile. Reranker: careful comparison of each finalist.
Can you combine them?
This is the standard combo. Retrieve top-100 with a bi-encoder, rerank to top-5 with a cross-encoder, feed the rerank output to the LLM.
Related topics
Related comparisons
Bi-encoder vs Cross-encoder
Two ways embeddings power retrieval and reranking
Chunking strategies: fixed vs semantic vs recursive
Three ways to slice documents before they hit the vector store
Hallucination Mitigation vs Context Window Management
Two critical challenges in production LLM systems
Long context vs RAG
Show the model everything, or choose what it should see
RAG vs Fine-tuning
Two approaches to giving LLMs domain specific knowledge
Semantic Search vs Keyword Search
Dense vector similarity vs sparse term matching for retrieval