Skip to content
AI & Machine Learning

Reranking

Definition

Reranking is a second pass in search or retrieval: a fast first step gathers many candidate results, then a slower, more accurate model rescores them and keeps only the best few. In RAG it decides which passages the language model actually sees.

Diagram

  1. 1,000,000 chunks in the index

  2. 150 candidates from a fast search

    embeddings and keywords, milliseconds

  3. 20 kept after reranking

    a model reads each one against the question

  4. 1 answer

    written by the language model from those 20 passages

The fast search is good at not missing things; the reranker is good at ordering them. Reranking 150 candidates adds a little delay and cost per question, so tune how many you rerank against how much better the answers get.

Case study

Worked example