Applied AI

Hybrid Search for RAG: What Rank Fusion Does Before Reranking

Hybrid Search for RAG: What Rank Fusion Does Before Reranking
Written byVien Hong
Published
Reading time4 min

When evaluating search for a document-grounded AI application, separate two questions: did the system find the useful document, and did it place that document near the top? Those questions call for different checks.

Hybrid retrieval combines lexical and semantic matching. Rank fusion merges the resulting lists, while an optional reranker evaluates the retrieved candidates again. Understanding those boundaries gives you a more precise way to diagnose retrieval problems before changing the answer-generating model.

Lexical and semantic retrieval find candidates differently

Qdrant describes hybrid search as finding matches through semantic meaning, exact keywords, or both. It documents one implementation that combines dense vectors for semantic search with BM25 full-text search on a payload field. That is an implementation option, not a requirement that every search engine uses the same design.

Consider a hypothetical public API documentation collection. One query contains the identifier retry_delay. Another asks, "How do I wait longer before trying a failed request again?" These are illustrative queries, not results from a test.

The identifier suggests checking how lexical retrieval handles the term. The paraphrased question suggests checking whether semantic retrieval finds the relevant explanation despite different wording. Neither example proves which method will perform better on an actual index.

Two search paths leading toward overlapping document cards

Use examples like these to build an evaluation set. Include identifier queries and paraphrases, then label which documents would help answer each one. Treat literal matching as something to verify against your indexing setup rather than a promise attached to the word "lexical."

Rank fusion merges the lists

In Azure AI Search's documented hybrid pipeline, a single request runs full-text and vector searches in parallel. The request includes search and vectorQueries, and the index holds plain text and embeddings. Reciprocal rank fusion, or RRF, merges the results.

Microsoft's explanation of RRF describes a process based on positions in ranked lists. Each document receives a contribution for its position in each input list. Those contributions are summed, and the combined score determines the merged order.

This is different from adding a raw lexical score to a raw vector score. RRF uses the rank positions those retrieval paths produced. It does not read the document and decide whether the passage answers the question.

Two ordered card lists merging into a single ordered list

In the hypothetical documentation example, the API reference page might appear in both lists while a conceptual guide appears in only one. Fusion combines their ranking evidence. Without running the queries, there is no basis for claiming which page would finish first or whether that order would be useful.

For diagnosis, keep the input lists available alongside the fused output. They help distinguish a candidate that was never retrieved from one that appeared in a retrieval path but ended up too low after merging.

The two meanings of k need separate names

Microsoft documents an RRF contribution as 1 / (rank + k). Here, rank is the document's position in an input list, and k is a constant in the fusion formula.

The same documentation explicitly distinguishes that constant from the vector query's nearest-neighbor count, which is also called k. The shared letter can make configuration discussions unnecessarily confusing.

Use descriptive names in design notes: "RRF constant" and "vector neighbor count." The former belongs to the rank contribution calculation. The latter refers to how many nearest neighbors the vector query requests. They are not interchangeable controls.

Avoid copying a configuration value between engines just because both expose something called k. First identify the stage and meaning of the setting. Keep engine-specific defaults and tuning decisions separate from the general explanation of rank fusion.

Reranking evaluates an existing candidate set

Azure's semantic ranker can operate on an initial BM25-ranked or RRF-ranked result set. Its models receive the query and retrieved results to look for better matches. That is a separate stage from merging ranked lists.

The similar terminology deserves care. Semantic vector retrieval is a retrieval path; Azure's semantic ranker is a later ranking stage. Calling both "semantic" does not make them the same operation.

Azure also documents semantic ranking as optional in its hybrid request. The hybrid overview explains that queryType=semantic invokes it and that the relevant settings can be removed when it is not used. Hybrid retrieval does not inherently require that extra stage.

A bounded candidate tray passing through a separate sorting window

Candidate limits matter here. Microsoft's semantic ranking documentation says only the top 50 results progress to semantic ranking, and that the reranking exercise uses only text. That limit describes Azure's documented stage, not a universal reranker limit.

The practical inference is that this reranker cannot rescue a document outside the candidate set it receives. If a useful page never reaches that stage, investigate retrieval and candidate selection before treating reranker tuning as the fix.

Evaluate retrieval before adding another stage

A useful comparison starts with labeled queries from the intended document collection. Evaluate lexical-only, vector-only, and hybrid retrieval against the same queries. Then assess reranking separately. This is an evaluation recommendation, not a claim that one configuration will win.

Keep a few checks distinct:

  • Candidate recall: did the retrieved set include the documents labeled useful?
  • Final ranking quality: did useful results appear where the application needs them?
  • Latency: how long did each configuration take under the chosen test conditions?
  • Cost: what did each configuration require at the expected query volume?

Inspect a failed query stage by stage. Check each retrieval list, the fused list, and the candidates supplied to any reranker before changing the generator. Record where the useful document disappeared or fell below the cutoff you chose.

For the next iteration, change retrieval or reranking, not both at once. Keep the corpus and evaluation queries fixed so you can measure the effect of that change and decide whether to keep it.

Sources

More from the blog

View all