Best for: Short or vague queries. The hypothetical document bridges the query–document embedding gap.
User Query
"RLHF training"
→
LLM Hallucinate
Generate fake but plausible answer paragraph
→
Embed Hypothesis
rich hypothetical doc → vector
→
ANN Search
match against real corpus
→
LLM Generate
real context + original query → answer
Why It Works
Dramatically improves recall for short or vague queries. Dense query representation.
Pattern Comparison
Pattern
Extra LLM Calls
Recall Lift
Latency
Naive RAG
0
Baseline
Low
HyDE
1 (gen)
+12–18%
Medium
Parent-Child
0
+9–14%
Low
Step-Back
1 (abstract)
+11–16%
Medium
Multi-Query
1 + N searches
+14–20%
High
Controls
Pattern
Compare
Advanced RAG patterns fix the main failure modes of naive RAG: vague queries (HyDE), missing context (Parent-Child), abstract reasoning (Step-Back), and query ambiguity (Multi-Query). Each adds one LLM call but significantly improves retrieval quality.
Advanced RAG Patterns - Interactive Visualization
Advanced RAG patterns address the failure modes of naive retrieval. HyDE generates a hypothetical answer document to improve query-corpus alignment. Parent-Child retrieval uses small chunks for precision but returns full parent sections for context. Step-Back first retrieves abstract principles before specific facts. Multi-Query expands one query into several variants and unions the results.
HyDE improves recall by 12–18% for short or vague queries by bridging the embedding gap
Parent-Child retrieval combines chunk-level precision with full-section context for the LLM
Step-Back prompting grounds specific answers in broader principles, reducing edge-case hallucination
Multi-Query generation maximizes recall for ambiguous questions with multiple valid interpretations
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.