Loading patterns…
Query Transformation Retrieval(QTR)
Rewrite or expand the user query before retrieval so embeddings land near relevant documents. HyDE generates a hypothetical answer document and embeds that to find real neighbors, multi-query expansion issues several reformulations and fuses the results, and step-back prompting abstracts the question to retrieve underlying principles first. These transformations give large zero-shot retrieval gains without training the retriever.
In 30 seconds
- What
- Rewrites or expands queries before retrieval-via hypothetical answers, multiple reformulations, or abstraction to principles-to improve embedding alignment with relevant documents.
- When to use
- Vague or under-specified user questions where direct embedding fails to surface relevant documents without retraining the retriever.
- Watch out
- Transformation can hallucinate plausible but incorrect intermediate queries, leading to confident retrieval of irrelevant or misleading documents.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Query Transformation Retrieval: Overview
Rewrite or expand the user query before retrieval so embeddings land near relevant documents. HyDE generates a hypothetical answer document and embeds that to find real neighbors, multi-query expansion issues several reformulations and fuses the results, and step-back prompting abstracts the question to retrieve underlying principles first. These transformations give large zero-shot retrieval gains without training the retriever.
- HyDE hypothetical document embedding
- Multi-query reformulation and fusion
- Step-back abstraction to principles
- Query decomposition into sub-questions
- Reciprocal rank fusion of result sets
- Training-free retriever improvement
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
ReasoningLayer Box
Run these agents in your own office, with unlimited tokens.
The ReasoningLayer Box puts the models, the memory and your AI workers on a box at your place. Nothing leaves the building, nothing is metered, and there is no price per person. The design partner program is open by application: our lowest price and a direct say in the roadmap.
- No token meter, no credits
- Your data never leaves your building
- One box for a team of 10 to 20