PromptForge
AI Glossary

Retrieval & data

Reranking

Also known as: re-ranking, cross-encoder

Definition

Reranking takes an initial set of retrieved candidates and reorders them with a more accurate but slower model. It is one of the cheapest ways to materially improve RAG quality.

Retrieval is a two-stage problem. First, cheaply narrow millions of documents to perhaps 50 candidates using embedding similarity. Then apply a cross-encoder reranker, which examines the query and each candidate together and scores relevance far more accurately.

The reason for two stages is cost. Cross-encoders are too slow to run over an entire corpus but perfectly affordable over 50 candidates.

Teams debugging poor RAG answers often reach for a bigger generation model when the real problem is that the right passage was retrieved at rank 12 and never made it into the prompt. Reranking fixes that directly.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.