What is reranking?

Reranking is a RAG step that uses a second model to reorder the candidate results of an initial search by their relevance to the query. The first search is fast but coarse. The right passage is often in the list, just not at the top. Reranking moves it up, so the language model receives less context, but more relevant context, and answers improve.

Definition

Reranking is a RAG step that uses a second model to reorder the candidate results of an initial search by their relevance to the query.

How does reranking work?

Search runs in two stages. In the first, semantic search, keyword search or both return a broad list of candidates. In the second, a reranker model reads each candidate together with the query and gives it a relevance score. The candidates are reordered by that score. Only the top few passages are sent to the language model.

When should you use reranking?

When your RAG system finds the right document but cannot bring it to the top. To see this, evaluate retrieval separately from the final answer. Documents that look very similar, such as different versions of the same procedure, are a typical sign that reranking will help.

Unrelated passages in the context raise the risk of hallucination. Reranking reduces that noise. It cannot repair badly split documents, though. Review your chunking first.

What should you watch for?

Not every reranker supports every language. A model trained only on English data can make the ordering worse for German, Arabic or Turkish queries. Choose a multilingual model and test it with questions in each language you serve.

If the reranker is an external API, queries and passages are sent to that service. Where passages contain personal data, assess the transfer under GDPR, or under KVKK, Türkiye’s data protection law, for data processed in Türkiye, together with your legal counsel. Running the model on your own infrastructure is also an option.

Further reading

Related terms

Frequently asked questions

Does every RAG system need reranking?

No. For a small, well-organised document set the first search may be enough. Reranking is worth adding when the right passage appears in the results but does not reach the top. Decide by measuring with your own test questions.

Does reranking slow the system down?

Yes, somewhat. A reranker reads every candidate together with the query, which adds time and compute cost. That is why it is applied to a limited number of candidates. That number sets the balance between quality and speed.

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

An embedding model turns the query and the document into vectors separately, which makes it fast. A reranker reads the query and the passage together and returns one relevance score. It is more precise but too slow to run over a whole index.

Let’s talk about your transformation

Tell us which work repeats every week. We will tell you honestly whether it is worth automating.

How we start

  1. A free first callWe pin down the problem and the goal together.
  2. A 2-week discovery sprintWe look at the data, the process and the tools, and decide where to start.
  3. A written proposalScope, architecture and timeline, in writing.

Example questions

Go straight to

CorrAI answers with AI from the content of this site and can be wrong. Please do not enter personal details. Privacy

Book a free call