Reranking
Reranking is a two-stage retrieval strategy in which an initial set of candidate documents or passages-retrieved quickly by a lightweight model-is reordered by a more powerful cross-encoder model that jointly scores query and document together. The goal is to get the best of both worlds: fast recall from the first stage and high-precision relevance from the second.
Think of it like a job-hiring process. A recruiter first skims hundreds of CVs quickly and creates a shortlist of 20. Then a hiring manager reads each shortlist candidate carefully and ranks them by genuine fit. The quick skim gets the right people in the room; the careful read decides who gets the offer.
In a RAG pipeline you might first retrieve the top-50 chunks from a Vector Database using cosine similarity on Embeddings, then pass those 50 to a cross-encoder reranker (such as a fine-tuned BERT model) that scores each chunk against the query holistically. Only the top 5 reranked chunks are fed into the LLM context, dramatically improving answer quality without increasing retrieval latency proportionally.
Reranking is closely tied to RAG architectures, Embedding quality, and Vector Database retrieval; the reranker itself is often a Fine-tuning of BERT-style cross-encoders trained on query-relevance pairs. It directly addresses cases where vector similarity alone fails to surface the most contextually useful passages.
You will encounter reranking in production RAG systems, enterprise search products, and recommendation engines where retrieval precision meaningfully impacts the quality of downstream generated answers.