What is AI reranking?

Reranking is the second stage of two-stage retrieval, which scores the candidate passages returned by search more precisely for relevance to the question and corrects their order.

It differs from retrieval in function: retrieval finds candidates quickly in a large collection, while reranking finds nothing new and only reorders those candidates. A cross-encoder is common, but methods vary and reranking alone does not guarantee accurate answers.

Topic
Embeddings, document processing and RAG
Also known as
Re-ranking, rerank

How AI reranking works

  1. In the first stage a fast retriever, such as vector or hybrid search, returns a broad candidate list; its size is a tunable cap.
  2. A reranking model reads the question and each candidate together and produces a relevance score.
  3. The list is reordered by these scores; the top few chunks go to the language model as context (top-k).
  4. Bi-encoders embed question and document separately and are fast; cross-encoders read both together and are more accurate but slower.

In more detail

Stage-specific evaluation metrics

Two-stage retrieval splits evaluation into stage-specific metrics: the first-stage retriever optimises Recall@K (for example Recall@50) so the right passage is not missed, while reranking optimises Precision@k, MRR@k and NDCG@k at the top of the list (such as top-5) so the best evidence sits in the top slots.

RRF, diversity (MMR) and business-rule ranking

Beyond neural cross-encoders, reranking pipelines frequently apply model-free Reciprocal Rank Fusion (RRF) to combine lexical (BM25) and dense vector rankings, Maximal Marginal Relevance (MMR) to prevent redundant chunks from dominating top-k and metadata rules (such as recency or document authority boosts) before passing context to the LLM.

Reducing the lost-in-the-middle effect

Large language models suffer from 'lost in the middle' degradation when relevant evidence is buried inside a long list of noisy chunks. By filtering 50 to 100 candidates down to 5 to 8 high-relevance chunks and placing the strongest ones strategically, reranking directly reduces hallucination and missed facts.

Commonly confused terms

TermHow it differs
Rank fusion (RRF)Rank fusion (such as Reciprocal Rank Fusion, RRF) merges ranked lists from multiple retrievers (e.g. BM25 and dense vectors) using rank positions alone without reading text, whereas neural reranking reads the query and text jointly to compute semantic relevance.
Reranker modelA reranker model is the specific scoring model (such as a cross-encoder) used during reranking, whereas reranking refers to the pipeline step itself, which can combine models, diversity rules and metadata boosts.

Why AI reranking matters for on-premises AI

In in-house RAG it ensures the most relevant sections reach the language model, raising answer accuracy and cutting needless context. The model runs on the organisation's own servers, so questions and document content are not sent to an external AI service. It adds time and GPU load to retrieval, but because fewer, more relevant chunks reach the language model, total time and cost often balance out. Performance on Turkish documents is measured on the organisation's own question set.

ON-PREMISES EXAMPLE

In a legal department's precedent search, candidate passages are scored in-house by a reranking model so the most relevant sections reach the researcher and the assistant first.

Common questions

Why is reranking a separate stage?

Scoring every document with a precise model is too costly. Fast retrieval narrows candidates first, then a small number are scored precisely.

Does reranking add latency in RAG?

It adds a little time to retrieval. Fewer, more relevant chunks reach the language model, though, which shortens prefill; the net effect is measured.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.