← Back to Glossary
HyDE (Hypothetical Document Embeddings)
Hypothetical Document Embeddings
Phase 03 · RAGtechnique

Generating a hypothetical answer with an LLM first, embedding that fake answer, and using it to search for real matching documents.

Why it exists

Short queries don't match the embedding distribution of long document passages. Embedding a hypothetical full answer bridges the gap.

How it works

  1. LLM generates draft hypothetical answer. 2) Embed hypothetical answer. 3) Vector search real corpus using that embedding.

Where you'll use this