Retrieval

What is Reranking?

Reranking is a second-stage retrieval step that uses a more accurate model (typically a cross-encoder) to reorder initial search results. It improves precision by comparing query and document together, rather than just comparing embeddings.

Why It Matters

Embedding similarity is fast but imprecise—it can rank tangentially related docs highly. Reranking uses cross-encoders that directly compare query-document pairs, catching nuances that embeddings miss. Can improve RAG accuracy by 10-20%.

Two-Stage Retrieval

1
Initial Retrieval — Fast embedding search, get top 50-100 candidates
2
Reranking — Cross-encoder scores each candidate, return top 5-10

Bi-Encoder vs Cross-Encoder

Bi-Encoder (Stage 1)

Embeds query and docs separately. Fast, scalable to millions. Less accurate.

Cross-Encoder (Stage 2)

Processes query+doc together. Slow, but much more accurate. Use on small candidate set.

Related Terms

← Back to Glossary