What is multi-query retrieval?
Multi-query retrieval is a retrieval technique that uses a language model to derive several queries from one user question, worded differently or covering different angles, searches with each and merges the results.
It differs from query rewriting in query count: rewriting produces one better query, while multi-query retrieval produces several variants and pools their results. Query expansion adds terms to one query; in multi-query retrieval each variant runs as a separate search.
- Topic
- Embeddings, document processing and RAG
- Also known as
- Multi-query RAG
How multi-query retrieval works
- The user's question goes to a language model, which produces several query variants in different wording or covering different aspects.
- Each variant runs separately in embedding search and, where needed, keyword search.
- Result lists are merged into one with a rank fusion method such as Reciprocal Rank Fusion or a reranking model; duplicates are removed.
- The best chunks go to the language model as context.
In more detail
The RRF formula, score independence and weighting
Reciprocal Rank Fusion (RRF) scores each document by adding, across lists, the reciprocal of its rank plus a smoothing constant k, commonly 60, which limits the dominance of single-list outliers. Because RRF ignores raw similarity scores, reranking the fused results with a cross-encoder and optionally weighting the original user query more highly helps keep exact matches from being diluted by noisy variants.
Query drift risk and variant quality control
If the LLM generates overly broad or off-topic variants, a failure mode called query drift, noisy documents flood the merged candidate pool and hurt precision. Constraining variant generation with structured output (e.g., 3 to 5 concise queries), preserving domain entities verbatim and deduplicating near-identical variants before search keeps retrieval focused.
Latency optimisation: starting the original query in parallel and using a small model
Generating query variants introduces an extra sequential LLM call before vector or keyword search can start, directly increasing time-to-first-token (TTFT). Teams reduce this overhead by using small fast models (or speculative/async execution that fires the original query immediately while variants are still being generated) and by running all resulting searches concurrently.
The RAG-Fusion connection and adaptive routing
Often popularised under the name RAG-Fusion when paired with Reciprocal Rank Fusion, multi-query retrieval is frequently combined with hybrid search (dense + BM25) per variant and a final cross-encoder reranker. In current retrieval stacks, adaptive routers skip multi-query expansion on simple single-fact queries and trigger it only on ambiguous or multi-faceted questions.
Commonly confused terms
| Term | How it differs |
|---|---|
| HyDE | HyDE (Hypothetical Document Embeddings) generates a synthetic answer document and embeds it to find similar real chunks; multi-query retrieval generates diverse search queries rather than a hypothetical answer passage. |
| Multi-hop retrieval | Multi-hop retrieval runs sequential queries where step N+1 depends on facts extracted in step N; multi-query retrieval generates all query variants up front and runs them independently in parallel. |
Why multi-query retrieval matters for on-premises AI
A single query can miss relevant content written in different terms across company documents; multi-query retrieval closes this coverage gap, helping most with questions that have several aspects. The price is more searches and latency, managed by limiting variant count and parallelism. All variants must run under the same permission filters; merging must not bring a document the user cannot see into the list. The gain is measured on the organisation's question set against single-query results.
An airport operator also searches “what to do when a passenger boarding bridge fails” with variants such as “jetway fault procedure” and “boarding bridge emergency instruction”, pooling instructions different units wrote under different names.
Common questions
How does multi-query retrieval differ from query expansion?
Query expansion adds terms to one query. Multi-query retrieval produces several separate queries, searches with each and merges the results.
How many query variants should be generated?
Usually a few. Each variant adds a search and latency; choose the number by measuring coverage gain against response time on the organisation's question set.
Related terms
Sources
- Rackauckas, RAG-Fusion: a New Take on Retrieval-Augmented Generation, 2024
- Cormack, Clarke and Büttcher, Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods, 2009
In the glossary: Glossary, M to Q