Skip to main content

05 · Retrieval & Memory

Grounding models in your data. RAG and its building blocks — how to connect a model to external knowledge and give agents persistent memory.

StepTopicOne-linerStatus
1RAGThe core pattern: retrieve relevant context, inject into prompt, generate🔴
2Embedding modelsModels that encode text into dense vectors for semantic comparison🔴
3Vector databasesSpecialized stores for high-dimensional vectors with ANN search🔴
4Chunking strategiesHow to split documents so retrieval finds the right piece🔴
5Semantic searchFinding documents by meaning, not keywords🔴
6Hybrid searchCombining BM25 keyword and dense vector search for better recall🔴
7Re-rankingA second-pass model that reorders retrieval results by relevance🔴
8Knowledge graphStructured entity-relationship graphs as an alternative to vector retrieval🔴
9GraphRAGRAG over a knowledge graph — better for multi-hop and relational queries🔴
10Agentic RAGAgents that decide when and how to retrieve, rather than retrieval being fixed🔴
11Long-context retrievalUsing extended context windows as an alternative to chunked retrieval🔴
12Working & episodic memoryShort-term (within session) and long-term (across sessions) agent memory🔴

← Previous section: 04 · Model Optimization & Formats | Next section → 06 · Agents & Orchestration