Advanced RAG Patterns
The Three RAG Architectures
The Three RAG Architectures
Standard RAG: Retrieve → Augment → Generate. One retrieval step. Best for point lookups, factual Q&A, filtered search. ~80% of production RAG queries.
GraphRAG (Microsoft, 2024): Builds a knowledge graph from the corpus — entities, relationships, hierarchical summaries. Enables 'global' queries: themes, patterns, synthesis across entire datasets. 10-100x higher indexing cost. Use when theme-level synthesis is core to the use case.
Agentic RAG: The LLM decides when and what to retrieve. Multi-step reasoning, tool use, verification loops. Best for compliance checking, research tasks, multi-source synthesis. Higher latency but handles queries that standard RAG cannot.
HyDE (Hypothetical Document Embeddings): Generate a hypothetical ideal answer to the query, embed the hypothesis, use that embedding for retrieval. Boosts nDCG@10 from 44.5 to 61.3 on complex queries. Fails for fact-bound queries where the hypothesis drifts.