ModelRefs / HyDE (Hypothetical Document Embeddings) — Prompt Pattern
HyDE (Hypothetical Document Embeddings) — Prompt Pattern
Generate a hypothetical answer first, then embed it to retrieve better than the bare query. Ask the LLM to draft a fake answer document, embed that, and search.
Overview
Ask the LLM to draft a fake answer document, embed that, and search. Often improves recall when queries are short.
When to use it: Short user queries retrieve poorly against rich documents.
Pattern details
| Pattern class | retrieval |
|---|---|
| Difficulty | advanced |
| Also known as | hypothetical document embedding |
| Last reviewed | 2026-06-07 |
Known failure modes
- Confident hallucination — Draft is wrong but still retrieves something. Mitigation: Always re-rank retrieved chunks against original query.
When not to use it
- Using HyDE when queries are already long and specific.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to HyDE (Hypothetical Document Embeddings) — Prompt Pattern.
Frequently asked questions
When should I use the HyDE (Hypothetical Document Embeddings) prompt pattern?
Short user queries retrieve poorly against rich documents.
What are common failure modes of HyDE (Hypothetical Document Embeddings)?
Confident hallucination
Does HyDE (Hypothetical Document Embeddings) work across models?
Yes when the anatomy is preserved — see model compatibility matrix on the pattern page.