Track 08 · RAG
8.1 RAG Core
57 topics in 7 parts. Use it as a checklist before an interview, or as a map of what to learn next.
- CCritical
- HHigh
- MMedium
- NNew 2026
01RAG Pipeline4 topics
- Document Ingestion → Chunking → Embedding → Vector Store → Retrieval → Context Injection → LLM GenerationC
- Why RAG: knowledge cutoff, private data, hallucinationC
- RAG vs fine-tuning vs prompt engineering — decision treeC
- Offline indexing vs real-time querying phasesH
02Ingestion & Chunking11 topics
- Document loaders: PDF, HTML, DOCX, DB, CSVC
- Fixed-size chunking with overlap (512 tokens, 10-20% overlap)C
- Sentence-aware splitting: preserve sentence boundaries before chunkingH
- Semantic chunking: embed + split at similarity dropsH
- Recursive character text splitterH
- Hierarchical (parent-child) chunkingC
- Document-structure aware chunking: split at headings/sections for markdown and HTMLH
- Code-specific chunking by function/classM
- Metadata enrichment: source, timestamp, sectionH
- Contextual Retrieval (Anthropic): prepend LLM context before embeddingN
- Contextual Retrieval results: 35% fewer failures; 67% fewer with rerankingN
03Retrieval Strategies10 topics
- Dense retrieval: vector similarity, cosine/dot productC
- Sparse retrieval: BM25, keyword TF-IDFC
- Hybrid search: BM25 + vector + RRF fusion (k=60)C
- Reranking: bi-encoder (100 candidates) → cross-encoder (top 5)C
- HyDE: generate hypothetical answer, embed itH
- Multi-query retrieval: rephrase query N times, merge resultsH
- Query expansion / reformulation: add synonyms, context to improve recallH
- Step-back prompting: abstract the question firstH
- ColPali multimodal RAG: page-as-image, no OCR neededN
- ColQwen2.5 benchmark: 84% recall on financial PDFs vs 62% text-onlyN
04Advanced RAG Patterns9 topics
- Agentic RAG: agent decides when and what to retrieveH
- GraphRAG (Microsoft): knowledge graphs, community summariesH
- CRAG (Corrective RAG): self-evaluate, re-retrieve if poorH
- Self-RAG: model decides retrieval need, evaluates relevanceH
- Multi-hop RAG: chained retrieval for multi-step questionsH
- Query decomposition: break complex query into sub-queries, merge resultsH
- Contextual compression: trim retrieved chunks to only relevant sentencesH
- RAPTOR: recursive abstractive tree of summariesM
- RAG vs Long Context: cost/latency decision frameworkN
05RAG Failure Modes & Debugging8 topics
- Step 1: is the issue in retrieval or generation? — run retrieval alone firstC
- Retrieval failure: wrong chunks returned — fix: hybrid search, better embedding modelC
- Lost-in-the-middle: model ignores chunks in middle of long contextH
- Hallucination despite correct retrieval — fix: lower temp, cite sources, NLI checkC
- Embedding model mismatch: query vs document style differ (fix: HyDE, asymmetric models)H
- Stale index: outdated documents, fix: incremental re-indexingM
- Context noise: irrelevant chunks injected — fix: reranking, similarity threshold > 0.7H
- Chunking artifacts: answer split across chunk boundary — fix: larger chunks, parent-childH
06Core Concepts8 topics
- Embedding spaces & high-dimensional geometryC
- Cosine similarity vs Euclidean vs Dot Product — when eachC
- ANN (Approximate Nearest Neighbor) vs exact searchC
- HNSW: multi-layer graph, O(log n), M & ef paramsC
- IVF (Inverted File): cluster-then-search approachH
- Flat index: exact brute-force search, small datasets (<100K vectors)M
- PQ (Product Quantization): compress vectors for memoryM
- Recall vs latency trade-off: tuning ef_searchH
07Vector DB Platforms7 topics
- Pinecone: managed, serverless, production-gradeH
- Weaviate: hybrid + knowledge graph, native BM25H
- Qdrant: Rust-based, high performance, rich filteringH
- Chroma: local-first, dev-friendly, Python-nativeH
- pgvector: Postgres extension, SQL + vectorH
- FAISS: Meta library, research, in-memoryM
- When to use each: scale, ops, compliance, costC
Practise it
Knowing it is half.
Saying it is the rest.
Run a realistic voice interview with an AI panel in the Interview Room, then read a scored report on every answer.