Zenaique
Compare

Reranker vs Retriever

The two stages of production RAG, and why you need both

The verdict

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

Reranker vs Retriever: dimension-by-dimension comparison
DimensionRetrieverReranker
StageFirst (recall)Second (precision)
ScaleMillions of docsDozens per query
LatencyMillisecondsTens to hundreds of milliseconds
PrecomputedYes (doc embeddings)No (per-pair)
QualityBaselineHigher on the shortlist
Best forCheap shortlistingPrecision 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

What they're really testing
Whether you know why production RAG needs both stages and roughly how much precision the rerank step buys.
Say this
The retriever handles recall: it must fetch every plausible candidate cheaply, so it uses precomputed embeddings and vector similarity. The reranker handles precision: it reads query and doc together, scoring each pair with a cross-encoder for a much better ranking on a small shortlist. Retrieving top-100 with a bi-encoder and reranking to top-5 with a cross-encoder typically buys ten to twenty points of MRR or nDCG for a fixed latency budget, and that is why every production RAG stack does both.
Traps to sidestep
  • 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

If searching across a large corpusRetriever
If reranking a shortlist of 10 to 100 candidatesReranker
If latency budget is under 10 ms per queryRetriever
If answer quality depends on picking the best few of a shortlistReranker

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