On-Prem AIGlossary

What Is Reranking?

Also known as: re-ranking, cross-encoder reranker, reranker

Definition

Reranking is a second retrieval stage in RAG where a more precise model re-scores the top candidate passages from the first search and reorders them, so the LLM receives only the most relevant context.

Reranking Explained

First-stage retrieval has to be fast, so it compares one query vector against millions of stored vectors. That is efficient but approximate. A reranker takes the top 20 to 100 candidates and reads each one together with the question, typically using a cross-encoder model, and produces a sharper relevance score. The best handful go to the LLM.

The cost trade-off is clear: the reranker is slower per item but only runs on a short list. The gain is largest when the corpus holds many near-duplicate passages, which is normal in manufacturing: dozens of work instructions that differ by one part number, revisions of the same procedure, or supplier specifications with identical wording.

Reranking is often combined with hybrid search, which merges keyword search (BM25) and vector search. Exact identifiers such as part numbers, drawing numbers and ECO numbers match poorly in embeddings but perfectly in keyword search, so hybrid retrieval followed by reranking is a common strong baseline.

Rerankers can run locally. Open models in the bge-reranker and similar families fit on modest GPUs, so the whole retrieval stack stays inside the customer network.

Why It Matters

  • It raises answer accuracy without changing the LLM or re-indexing documents.
  • It reduces the context sent to the LLM, which lowers latency and token cost.
  • It helps most where documents are repetitive, as in controlled procedures and part catalogs.
  • It can run on-prem, so it fits air-gapped deployments.

In Practice

A technician asks for the torque value for a hydraulic fitting on model X. Hybrid search returns 40 candidates from 9 similar work instructions. The reranker scores each against the full question and puts the correct step from the model X instruction first and a similar step from model Y fifth. Only the top 5 go to the LLM, which answers from the right document instead of blending two.

Frequently Asked Questions

Do I always need a reranker?

No. For a small, clean corpus, good chunking and hybrid search may be enough. Add a reranker when similar documents cause wrong or mixed answers.

What is the difference between a reranker and an embedding model?

An embedding model encodes query and passage separately for fast search. A cross-encoder reranker reads them together, which is more accurate but too slow to run over the whole corpus.

Does reranking help with part numbers?

Indirectly. Keyword search catches exact identifiers and the reranker orders the combined results. Treat part numbers as metadata filters where possible.

How much latency does it add?

Typically tens to a few hundred milliseconds for a short candidate list on a GPU, depending on the model and list size.

Working with Reranking in a live environment? Our engineers do this every day - and our AI agents automate most of it.