Key takeaways
An AI assistant can retrieve the correct information and still answer incorrectly if better evidence is ranked below distracting content.
Reranking improves the ordering of retrieved candidates; it cannot recover information that the retrieval stage never found.
Hybrid search with rank fusion and a cross-encoder reranker is a useful architecture to evaluate before introducing more complex approaches.
Document authority, effective dates and access permissions must be enforced separately from semantic relevance.
Measure answer correctness, evidence coverage, response time and cost together; a higher retrieval score alone does not establish business value.
Your AI assistant found the answer. Why did it get it wrong?
Imagine a customer-service adviser asking an internal AI assistant whether accidental screen damage is covered under a particular insurance product. The assistant searches the company's documents, finds several relevant passages and confidently explains that the damage is covered. Unfortunately, it has relied on a marketing brochure rather than the policy wording that applies to the customer's contract.
The problem is not necessarily that the language model lacks intelligence. Nor does it necessarily mean the company needs to replace its vector database. The applicable policy may already be among the search results. It simply did not receive enough priority when the system selected the information used to produce the answer.
This distinction matters to any organisation building a knowledge assistant, whether it supports insurance claims, employee policies, technical troubleshooting or regulatory research. Finding documents about a subject is not the same as finding the evidence that resolves a specific question.
RAG reranking techniques address that gap. They help an AI application reconsider its initial search results and prioritise passages that are more useful for answering the user's question. Combined with appropriate document controls and answer validation, they can make an existing AI system more dependable without automatically requiring a larger generative model.
What reranking changes inside a RAG system
Retrieval-augmented generation (RAG) gives an AI model access to external information at the time it answers a question. The original RAG research explored combining learned model knowledge with retrieved evidence.[1] In enterprise applications, that evidence might come from product manuals, policies, contracts or an internal knowledge base.
Think of the first search as a shortlist. Keyword search can identify exact terminology, while semantic search can identify passages with related meanings using numerical representations called embeddings. Both approaches can find useful material quickly, but neither necessarily puts the best answer first.
A reranker examines the shortlisted passages again using a more detailed assessment of their relationship to the question. The application then selects evidence for the large language model (LLM) to use when generating its response. Reranking is therefore a retrieval-quality improvement, not a modification to the generative model's training.
The distinction between candidate depth and context depth is important. As a starting experiment, an engineering team might retrieve 40 passages, rerank those 40 and supply the strongest five to the language model. These numbers are proposed tuning parameters, not established optimal values. Relevant evidence outside the 40 cannot be recovered by a reranker that only sees those candidates.
Four ways to put better evidence first
1. Rank fusion: combine different search perspectives. Keyword ranking, commonly implemented with BM25, is useful for identifiers, clause numbers and specialist terms. Dense vector search is useful when users describe the same concept in different words. Reciprocal Rank Fusion (RRF) combines their ranked lists without requiring directly comparable numerical scores. Each list contributes 1/(c + r) for a document appearing at rank r, with c controlling how strongly top positions are favoured.[2] RRF is a lightweight fusion step, not a deep reading of the passages.
2. Cross-encoder reranking: evaluate the question and passage together. Unlike a typical bi-encoder, which creates separate representations for queries and documents, a cross-encoder processes each query-passage pair jointly. This allows it to examine relationships that a single embedding similarity score may miss, such as whether a clause actually addresses an exception. The additional computation makes this most suitable for a shortlist rather than an entire document collection.[3]
3. Late-interaction models: retain finer-grained matching. ColBERT is an example of an architecture that independently encodes queries and documents into contextual token representations and evaluates their interactions during search.[4] It can serve as a retrieval or reranking component. It is worth evaluating where specialised terminology and fine-grained matching matter, provided the organisation can manage the index size and infrastructure requirements.
4. LLM-based reranking: ask a language model to assess relevance. A pointwise approach scores each passage individually; pairwise ranking compares two candidates at a time; listwise ranking considers a group and proposes an ordering. Research by Sun and colleagues demonstrated competitive relevance-ranking results from prompted language models on information-retrieval benchmarks.[5] Such methods warrant evaluation for complex questions but introduce additional latency, token costs, possible position bias and exposure to instructions embedded in untrusted documents.
These techniques are not mutually exclusive. A practical design can combine keyword and vector retrieval using RRF, apply a cross-encoder to the merged shortlist and reserve more expensive analysis for workloads where a measured benefit justifies it.
Relevance does not mean the document is right
A passage can be highly relevant to the wording of a question and still be wrong for the business situation. An expired policy, a draft procedure or a document for another product could be ranked first by a capable reranker.
In the insurance example, the application must identify the customer's applicable product, jurisdiction and policy version using trusted records. The relevant contract and endorsements take precedence according to the organisation's approved rules. A brochure cannot override the contractual terms simply because its wording matches the question.
Enforce access permissions before content is returned to or processed by the ranking service. Filter out inapplicable documents using reliable metadata such as effective dates, product identifiers, document approval status and tenant boundaries. A relevance score must never compensate for an unauthorised document. Where the applicable version cannot be established or authoritative sources conflict, the application should request clarification or refer the case for human review.
Treat retrieved text as information rather than instructions. A document containing a statement such as an instruction to ignore system rules must not be allowed to change the application policy, access another customer's records or authorise an action. This is especially important when a general-purpose LLM is itself used to rerank documents.
Why adding more documents can make answers worse
An apparently simple response to retrieval failures is to send more search results to the language model. Sometimes that helps, particularly when answering a question requires multiple independent sources. But more context can also introduce duplicated passages, unrelated detail and conflicting versions.
The research paper Lost in the Middle found that the placement of relevant material within long inputs affected the performance of the language models studied, with useful evidence in the middle often being harder to use.[6] This does not establish an identical behaviour for every model, but it explains why a larger context window should not be treated as a substitute for context selection.
After reranking, remove near-duplicate passages, preserve necessary neighbouring clauses and reserve enough space for all parts of a multi-part question. One passage might establish eligibility, another an exclusion and a third the required approval process. Selecting only the highest-scoring passage may omit a critical qualification.
Where repetitive results crowd out complementary evidence, consider a diversity-aware selection method such as Maximal Marginal Relevance (MMR), which trades off query relevance against similarity to previously selected passages. Test it carefully: in legal or policy questions, closely related neighbouring clauses may both be essential.
Context assembly should preserve the original source identifiers and section references. The generated response should cite the passages that support its material claims. If the evidence is insufficient, the system should acknowledge that rather than treating the highest ranking score as proof.
How to tell whether you actually need a reranker
Review a set of incorrect answers before purchasing another AI service. Inspect the initial retrieval results, the selected context and the generated response separately. This makes it possible to determine which stage needs improvement.
If the necessary passage never appears in the retrieved candidates, investigate document ingestion, text extraction, chunk boundaries, metadata filters, query rewriting and search coverage. A reranker cannot resolve a missing-candidate problem on its own.
If the correct evidence appears in the initial shortlist but is buried below weaker matches, reranking is a strong candidate for testing. If it appears in the final context and the response is still incorrect, investigate instruction design, model behaviour, evidence interpretation or answer validation instead.
Evidence from the BEIR information-retrieval benchmark shows why comparing architectures is worthwhile: the study found BM25 to be a credible baseline, while late-interaction and reranking approaches performed strongly on average at a higher computational cost.[7] Benchmark findings provide a reason to test these methods, not a promise of improvement on a company's private documents.
Measure evidence quality and the business outcome separately
Build an evaluation dataset from authorised, representative questions. Ask subject-matter specialists to identify applicable supporting passages, partial matches, misleading near-matches and questions that cannot be answered from the available evidence. Include different product versions, languages, terminology and question complexity.
Candidate Recall@K measures the proportion of annotated relevant passages found within the initial K results. For questions with a single required passage, the percentage of questions for which that passage appears in the shortlist is also a useful hit-rate measure. For multi-part questions, check whether the shortlist contains every necessary piece of evidence.
Mean Reciprocal Rank (MRR) rewards placing the first relevant result near the top. Normalised Discounted Cumulative Gain (nDCG@k) measures ranked relevance within the first k results, rewarding highly relevant passages near the beginning and allowing graded relevance judgements. Neither metric alone establishes that the context contains all the evidence needed to answer.
At the answer level, measure factual correctness, citation support, appropriate abstention and the incidence of consequential errors. For customer support, track whether the adviser can resolve the question with less searching or rework. The value of a retrieval improvement should eventually appear in a meaningful operational measure.
Compare the same questions with and without reranking using consistent document versions, generation models and acceptance criteria. Record median and 95th-percentile response times, ranking costs and total cost per accepted answer. Review results by language and workload so an aggregate improvement does not conceal a deterioration in an important group.
A practical path from pilot to production
Begin with an existing keyword or vector retrieval baseline. If both approaches contribute useful results, compare hybrid retrieval with the baseline before adding another model. Establish the minimum evidence coverage, answer-quality requirements and response-time budget with the business owner.
Evaluate a small number of rerankers on a held-out dataset. Adjust candidate depth and the final context budget together. Compare a hosted ranking service with a self-hosted model where appropriate, taking into account deployment effort, data-transfer permissions, batching, throughput, model limits and total operating cost.
Introduce the best-performing configuration through a controlled rollout. Monitor ranking timeouts and use a validated fallback only if the original retrieval results are acceptable for that workload. For consequential questions, insufficient or uncertain evidence should trigger a controlled abstention or human review rather than an unchecked answer.
Version the retriever, reranker, chunking configuration and selection rules. Record permitted diagnostic information such as candidate identifiers, ranks, model versions and timings, without unnecessarily logging confidential passage text or personal information.
Reassess the system whenever the document collection or business rules change. An updated product catalogue can introduce new near-matches, and a new document layout can cause previously reliable chunks to lose essential context. The effectiveness of reranking depends on the entire information pipeline.
Make the information problem the starting point
A small knowledge base with consistent documents and precise questions may work perfectly well with ordinary search. An organisation with thousands of overlapping policies, diverse terminology or complicated eligibility conditions may benefit more from a second ranking stage.
The sensible investment decision is not to choose the most sophisticated reranker. It is to identify whether the assistant is failing to find the right evidence, failing to prioritise it or failing to interpret it, and then address the responsible stage.
If your organisation has a RAG assistant that performs well in demonstrations but struggles with real questions, a targeted review of retrieval quality, document authority, context selection and answer evaluation can help determine where improvements are most valuable.
The strength of a knowledge assistant is not measured by how many documents it can search. It is measured by how reliably it can identify, use and communicate the information that matters.
References and further reading
[1] Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems 33. https://papers.nips.cc/paper/2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html
[2] Microsoft Learn. Relevance scoring in hybrid search using Reciprocal Rank Fusion (RRF). https://learn.microsoft.com/en-us/azure/search/hybrid-search-ranking
[3] Sentence Transformers documentation. Retrieve & Re-Rank. https://www.sbert.net/examples/sentence_transformer/applications/retrieve_rerank/README.html
[4] Khattab, O. and Zaharia, M. (2020). ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT. SIGIR 2020. https://arxiv.org/abs/2004.12832
[5] Sun, W., et al. (2023). Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agents. Proceedings of EMNLP 2023. https://aclanthology.org/2023.emnlp-main.923/
[6] Liu, N. F., et al. (2024). Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 12, 157–173. https://aclanthology.org/2024.tacl-1.9/
[7] Thakur, N., et al. (2021). BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models. NeurIPS Datasets and Benchmarks. https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/hash/65b9eea6e1cc6bb9f0cd2a47751a186f-Abstract-round2.html
Apply the approach
Suppose an insurance adviser asks whether accidental screen damage is covered under an identified customer's contract. In this hypothetical ranking exercise, four authorised, applicable documents are shortlisted, but an approved product brochure initially appears before the policy wording. The ranks below demonstrate a possible reordering of these four candidates, not measured model performance. The applicable policy and endorsement must be interpreted together before any coverage conclusion is made.
Contains the contractual coverage clause. It should be examined as primary evidence.
May modify the coverage or exclusions in the base policy; retain it alongside the wording.
Provides operational guidance but does not replace the applicable contractual terms.
Contains related marketing information but is not the authoritative basis for deciding coverage.
Put the approach into practice
- 01Collect real failure cases and distinguish missing evidence, poor ranking and generation errors.
- 02Validate document permissions, applicability and version metadata before evaluating reranking.
- 03Compare keyword, vector and hybrid retrieval on the same annotated questions.
- 04Benchmark a cross-encoder or other suitable reranker using consistent candidate sets, evidence requirements and latency budgets.
- 05Test final context assembly for complementary clauses, citation support and safe abstention.
- 06Deploy only where measured answer-quality improvements justify the additional operating costs and controls.
Frequently asked questions
What is the difference between a reranker and an embedding model?
An embedding model commonly produces separate numerical representations of queries and passages for efficient similarity search. A cross-encoder reranker evaluates the query and each shortlisted passage together to estimate relevance more directly. They serve complementary purposes.
Is reciprocal rank fusion the same as cross-encoder reranking?
No. Reciprocal Rank Fusion combines positions from multiple search rankings. A cross-encoder examines passage content in relation to the query and generates new relevance scores. Fusion can precede cross-encoder reranking in a hybrid search pipeline.
Can reranking eliminate AI hallucinations?
No. It can improve the evidence supplied to the generative model, but errors can still arise from incomplete documents, incorrect source information, flawed context assembly or the model's interpretation. Independent validation and appropriate abstention remain important.
How many documents should a RAG reranker process?
There is no universal number. Test several candidate depths against representative questions, measuring evidence recall, latency and ranking cost. Then choose a smaller final context that retains the necessary evidence without exceeding the input budget.
Should we use an LLM or a dedicated reranking model?
A dedicated reranker is a useful starting point for repeated relevance-scoring tasks. An LLM-based ranker may merit testing for nuanced or multi-condition queries, but it can introduce greater cost, variable output and additional security considerations. Compare both on your own evaluation set.
Does reranking require replacing our existing vector database?
Usually not. A second-stage ranker can often receive the shortlisted passages from an existing search system. The integration depends on whether the system exposes the candidates, relevant text and metadata while enforcing the required access controls.