1.  [](/)
2.  [Diagrams](/diagrams)
3.  Query Expansion: Rewriting the Question Before You Search

[Back to Diagrams](/diagrams)Diagram Series

# Query Expansion: Rewriting the Question Before You Search

Query Expansion: Rewriting the Question Before You Search

![Query expansion rewrites the user's question before retrieval: a short or ambiguous query is expanded into related terms, synonyms, and sub-questions, so first-stage search matches documents the literal phrasing would have missed.](/diagrams/query-expansion.webp)Full screen

Query Expansion: Rewriting the Question Before You Search

Your users type two words into a search box. Those two words are a lossy compression of everything they actually meant.

Take "jaguar speed." Car, animal, or browser? A single embedding locks onto one reading. Whichever one the model picks, the other two just vanish.

Query expansion comes at this from two angles.

Multi-query has an LLM rewrite the question into several versions: "jaguar car top speed mph," "jaguar animal running speed," "how fast can a jaguar run." Each one searches on its own, then the results fuse with Reciprocal Rank Fusion. One query finds 6 results. Four rewrites find 14, and they cover every reading of the question.

HyDE flips it around. Instead of expanding the question, you generate a hypothetical answer, a short made-up paragraph that would answer it, and search for documents close to that paragraph rather than the two-word query. A full paragraph carries far more signal than two words ever could.

When to use which: multi-query when the query is genuinely ambiguous, HyDE when the intent is clear but the query is too short to say it, both together when you want maximum coverage.

The real point is that retrieval quality isn't only about better embeddings. It's about handing the system enough signal to work with. Short queries starve it.

Run this on your own data

Mixpeek turns video, images, audio, and documents in your object storage into searchable, timestamped results through one API.

[Search your own data](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=diagram_detail&utm_campaign=mvs_onramp)

## Related diagrams

[

![How you split a document decides what you can find: fixed-size chunks cut mid-sentence and strand the answer across two pieces, while splitting on meaning keeps each chunk a complete thought. Chunk too small and you lose the context that makes an answer usable; chunk too large and the relevant sentence is diluted by everything around it.](/diagrams/foundations/chunking.webp)

How you split decides what you find



](/diagrams/chunking)[

![Retrieval-augmented generation (RAG): a user asks a question, search retrieves the few most relevant passages from your indexed data, and the model answers from those passages placed in its prompt. The quality ceiling is retrieval, not the model: most hallucinations are retrieval failures, because the model can only answer with what it was fed.](/diagrams/foundations/rag.webp)

The model answers with what you feed it



](/diagrams/rag)[

![Documents fill empty buckets with a mean; queries sum and leave empty buckets zero: the asymmetry is what makes the FDE dot product approximate Chamfer / MaxSim.](/diagrams/muvera-query-doc-asymmetry.webp)

MUVERA: Why Query and Document Are Encoded Asymmetrically



](/diagrams/muvera-query-doc-asymmetry)