Multi-Query Retriever
A single phrasing is one sample of what the reader meant. Ask the same question three more ways and retrieve for all of them — the union catches what any one wording would have missed.
Which queries run
Recall
Each phrasing, and its own top 2
—The union, against what was actually relevant
Where the variants come from
In a real multi-query retriever an LLM writes the rephrasings. The three below are written by hand as a labelled example of what it would produce — no model runs in this page. Everything after that point, the retrieval and the union, is really computed here.
Overview
The vocabulary mismatch problem
Embedding-based retrieval finds documents whose vectors are near the query’s vector. That works well when the question and the document use close language, and fails when they do not.
Ask “how do I speed up my model?” of a corpus that discusses “reducing inference latency”, “quantisation” and “batch throughput” and the embedding may simply not land near any of them. The data is present and the phrasing is wrong. And a single query gets a single shot at matching it.
The failure is silent. The retriever returns its nearest neighbours regardless, so you get plausible-looking, unhelpful chunks with no sign that a thing was missed. A multi-query retriever fixes this by making a few other phrasings of the question. Often 3 to 5. Using a language model. Then searching with each phrasing on its own and merging the results. "How do I speed up my model?" turns "reduce inference latency," "optimise batch throughput," and "quantise model weights". Three queries that together cover vocabulary the first missed. The merge step deduplicates by document id and can either union the results (boost recall) or intersect them (boost precision). The cost is N extra embedding calls and N extra vector searches per user query. This is small compared to the generation step that follows. This page shows the vocabulary mismatch on a real corpus, shows the recall improvement from multiple queries, and covers the tradeoff between union and intersection merging.
A single phrasing is one sample of what the reader meant.
In this guide
- The vocabulary mismatch problem
- Making a few queries and merging
- One question, a few searches
- Why fusion rather than joining
- The costs
- What a few searches recover that one does not
- Guided tests
- What it costs, and what to use instead
- Common mistakes
- What to recall
- Where it helps, and where it does not
- Tied methods, and how they combine
- Questions people ask
- Recap in one screen
Multi-Query Retriever: A Practical Guide
One question can be asked many ways, and vector search only finds what is phrased like the query it was given. A multi-query retriever generates several rewordings, searches with each, and merges the results.
The vocabulary mismatch problem
Embedding-based retrieval finds documents whose vectors are near the query’s vector. That works well when the question and the document use close language, and fails when they do not.
Ask “how do I speed up my model?” of a corpus that discusses “reducing inference latency”, “quantisation” and “batch throughput” and the embedding may simply not land near any of them. The data is present and the phrasing is wrong. And a single query gets a single shot at matching it.
The failure is silent. The retriever returns its nearest neighbours regardless, so you get plausible-looking, unhelpful chunks with no sign that a thing was missed. A multi-query retriever fixes this by making a few other phrasings of the question. Often 3 to 5. Using a language model. Then searching with each phrasing on its own and merging the results. "How do I speed up my model?" turns "reduce inference latency," "optimise batch throughput," and "quantise model weights". Three queries that together cover vocabulary the first missed. The merge step deduplicates by document id and can either union the results (boost recall) or intersect them (boost precision). The cost is N extra embedding calls and N extra vector searches per user query. This is small compared to the generation step that follows. This page shows the vocabulary mismatch on a real corpus, shows the recall improvement from multiple queries, and covers the tradeoff between union and intersection merging.
Making a few queries and merging
A multi-query retriever asks a language model to give N other phrasings of the question. Often 3 to 5. Each approaching it from a different angle. The first question above might turn:
- “What methods reduce model inference latency?”
- “How can I improve throughput at serving time?”
- “What makes a neural network run faster in production?”
Each is embedded and searched on its own. This gives N result sets which are then combined and deduplicated. Because the rewordings cover different vocabulary, their nearest neighbours differ. And the union covers much more of the apt material than any one query would.
Merging is often done with reciprocal rank fusion rather than raw scores. RRF assigns each document a score of Σ 1/(60 + rank) across the lists it appears in. This rewards documents that a few rewordings agree on and avoids the problem that likeness scores from different queries are not right comparable.
One question, a few searches
A single embedding of a question is one point in the space. If the question is phrased differently from the documents that answer it, that point sits in the wrong place. And no amount of index tuning will fix it.
Multi-query retrieval hedges by making a few rewrites of the question, searching with each, and combining the results.
First: "How do I stop getting so many alerts?"
1. "How to reduce alert volume"
2. "Configuring notification thresholds"
3. "Suppressing copy alerts"
Each rewrite lands in a different region of the embedding space. And their union covers far more of the apt material than any one of them. The third might be the only one that fetches the deduplication documentation.
The method is straightforward:
prompt = """Generate 3 alternative phrasings of this question that would
retrieve relevant documents. One per line, no numbering.
Question: {question}"""
queries = [question] + model.generate(prompt).strip().split("\n")
ranked_lists = [index.search(q, k=20) for q in queries]
results = rrf(ranked_lists) # fuse by rankNote that the first question is included. The rewrites are additions, not replacements — a poor rewrite then dilutes the results slightly rather than destroying them.
Why fusion rather than joining
The results from a few searches must be combined, and how matters.
Concatenating and deduplicating loses the ranking data: a document ranked first by two rewrites is treated the same as one ranked twentieth by one.
Averaging scores needs the scores to be comparable across searches, and they are not reliably so.
Reciprocal rank fusion uses only ranks:
score(d) = Σqueries 1 / (60 + rank(d))
A document fetched highly by a few rewrites builds up from each. So agreement across rewrites turns evidence. That is just the property you want: a document that only one rewrite found is plausible; one that all four found is probably right.
RRF also needs no normalisation, which is what makes it real when combining an arbitrary number of retrievers.
The costs
| Cost | Detail |
|---|---|
| One model call | To generate the rewrites, 200–500ms |
| N searches | Usually parallelisable, so latency is the slowest one |
| More candidates | N×k documents before fusion |
| Reranking load | More candidates to rerank, if reranking |
The searches parallelise, so the added latency is roughly one model call plus one search — not N searches. That makes the technique much cheaper in practice than it looks.
Three or four rewrites is the usual range. Beyond that, the extra rewrites are paraphrases of paraphrases and the returns flatten while the reranking load grows.
Cache aggressively: at temperature 0 the rewrites are deterministic, and repeated or close questions are common in real traffic.
What a few searches recover that one does not
The sections above explain why the pattern makes variants and fuses them rather than concatenating. Here it is run -- three phrasings of one question against one corpus, the union measured against each variant alone. And the case where extra queries make the result worse.
Fusing those three result lists with reciprocal rank fusion recovers what no single phrasing found on its own.
That still leaves the question of why fusion beats simply concatenating the phrasings into one long query. Averaging vectors turns out to be a worse fix than combining rankings.
The pattern is not free, and it is not foolproof either. One more call on the critical path. And a bad variant can drag a good result set down with it.
Guided tests
- Compare a single query with the set. Look at what one phrasing fetches against the union of all of them. The union is broader, and often includes at least one document no single query found.
- Find the documents only one variant fetches. These are just the recall the technique is buying. Material the first phrasing would have missed fully.
- Look for agreement. Documents fetched by a few variants are the strongest candidates. And that consensus is what rank fusion promotes to the top.
- Watch the precision cost. The merged list is longer and holds more marginal results. Multi-query improves recall and dilutes precision, which is why a reranker often follows it.
What it costs, and what to use instead
Multi-query is not free. Making the variants is an extra LLM call on the critical path. This adds latency and cost to each request. And it runs N searches instead of one. For an interactive use that cost is real.
Tied approaches make different trades. HyDE makes a hypothetical answer and embeds that, on the input that an answer is textually closer to the passage holding it than a question is. Query decomposition splits a multi-part question into separate sub-questions, which multi-query does not do. It rephrases rather than divides. And hybrid search, combining dense retrieval with BM25 keyword matching, fixes much of the same vocabulary problem for a fraction of the cost,. This is because exact term matching catches just the rare words embeddings handle worst.
Common mistakes
- Making variants that all say the same thing. If the rewordings are near-the same, they retrieve the same documents and you have paid for nothing. The prompt must push for truly different angles and vocabulary.
- Merging by raw likeness score. Scores from different query embeddings are not comparable. Use rank-based fusion.
- Skipping deduplication. The same chunk fetched by four variants will if not take four slots of context.
- Not reranking afterwards. The merged list is broader and noisier; a cross-encoder reranker recovers the precision.
- Using it where the problem is chunking. If the apt text is split badly across chunks, no amount of query rewriting will retrieve it intact.
What to recall
A multi-query retriever compensates for the fact that a single embedding gets one try at matching the corpus vocabulary. It makes a few rewordings, fetches with each, and fuses the ranked lists. It buys recall at the cost of an extra LLM call, N searches, and some precision. So it pairs naturally with a reranker. Where the mismatch is about rare or exact terms, hybrid search with BM25 gets much of the same gain far more cheaply.
Where it helps, and where it does not
It helps with vague or short queries. "It's broken" gives an embedding with almost no sign; a few set rewrites give a few usable ones.
It helps when documents use different vocabulary from users. Jargon, product names, formal register.
It helps with multi-faceted questions, where different aspects live in different documents. Decomposition is a tied and sometimes better approach. Split the question into its parts by name and retrieve for each.
It does not help much when the query now holds exact identifiers. Rewriting "error E4471" risks losing the code. This was the most retrievable part. Including the first query protects against this.
It does not help when recall is now high. If recall@20 is 0.97, there is almost nothing left to find and the extra latency buys nothing. Measure before adding it.
That last point extends: multi-query fixes a recall problem. If your failures are sorting failures. The right document is fetched at rank 15. A reranker is the correct tool, not more queries.
Tied methods, and how they combine
| Technique | What it changes |
|---|---|
| Multi-query | Several phrasings, fused |
| Decomposition | Splits a compound question into sub-questions |
| HyDE | Searches with a generated hypothetical answer |
| Step-back prompting | Asks a more general question first |
| Self-query | Extracts metadata filters from the question |
Step-back prompting is worth knowing: for a set question, first ask a broader one ("what are the general principles of X?"), retrieve for both, and fuse. It surfaces background material that a narrow query misses.
Decomposition is the better choice for truly compound questions. "How do refunds differ from exchanges, and what are the deadlines?" is three questions; rewriting it three ways is less effective than splitting it into its actual parts.
These compose, and each adds latency. The sorting to add them in is by measured gain on your own question set. And in most systems hybrid search and reranking come first.
Questions people ask
How many rewrites? Three or four including the first. More flattens out.
Should I include the first query? Yes, always — it protects against a bad rewrite and preserves exact identifiers.
Which model for the rewrites? A small fast one. Paraphrasing a question is not a demanding task.
Does it increase hallucination? No — the rewrites are only search keys and are never shown to the user or to the answering model.
How do I combine the result lists? Reciprocal rank fusion, which needs only ranks.
Is it better than HyDE? They address the same gap differently and can be used together. HyDE matches the documents' register; multi-query covers a few phrasings.
Recap in one screen
- One embedding of a badly-phrased question searches from the wrong point; a few rewrites cover more ground.
- Generate 3–4 phrasings, search with each, and fuse with reciprocal rank fusion.
- Always include the first query, so a poor rewrite cannot destroy the results.
- Agreement across rewrites is evidence, and RRF rewards it by itself.
- It fixes recall problems; sorting problems need a reranker instead.