8

Advanced RAG Patterns

Match each query type to the correct RAG architecture

A consulting firm built a RAG system over 10 years of project reports. Standard RAG answered 'What was the outcome of Project Phoenix?' perfectly but completely failed 'What are our most common project failure patterns?' — the answer requires synthesizing themes across 200 documents, not retrieving one. That query needs GraphRAG.

— Level 8 · Production RAG Pipeline
+100 XP5 min8 / 10

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.

1 of 9