RAG Architectures
RAG architectures on one sheet: what RAG is, core components, four patterns (naive, advanced, agentic, multi-stage), retrieval strategies, indexing, variants, data flow, context construction, evaluation, challenges, optimisation and best practices.
Cheat sheet · Offered as a template
In this diagram
- RAG Architectures
- ① What is RAG Architecture?
- Combines Retrieval + Generation
- Grounded, Accurate, Up-to-date
- Reduces Hallucinations
- Modular & Extensible
- ② Core Components
- User Query
- Retriever
- Retrieved Context
- Generator (LLM)
- Response
- Retriever : Finds relevant information
- Generator : Generates answer using context
- ③ Naive RAG
- Query
- Top-k Docs
- LLM
- Answer
- Advanced RAG
- Re-rank
- Agentic RAG
- Planner / Agent
- Tool Use (Retriever)
- Docs
- Multi-Stage RAG
- Retrieve (Stage 1)
- Rerank / Filter
- Retrieve (Stage 2)
- ④ Retrieval Strategies
- Dense Retrieval (Embeddings)
- Sparse Retrieval (BM25)
- Hybrid Retrieval (Dense + Sparse)
- Multi-vector Retrieval
- Contextual Compression
- Metadata Filtering
- Graph-based Retrieval
- ⑤ Indexing & Storage
- Chunking Strategies (Fixed / Recursive / Semantic)
- Vector Databases (FAISS, Pinecone, Milvus, Weaviate)
- Keyword Indexes (Elasticsearch, OpenSearch)
- Graph Databases (Neo4j, TigerGraph)
- ⑥ RAG Architecture Variants
- Self-RAG
- LLM decides what to retrieve
- Reflects on own answers
- Iterative retrieval & generation
- Corrective RAG
- LLM checks faithfulness
- Retrieves more if needed
- Corrects final answer
- Adaptive RAG
- Chooses best retrieval strategy based on query