From absolute beginner to top 1% RAG expert — theory, intuition, and battle-tested practical guides.
- Total beginners who have heard "RAG" thrown around and want to actually understand it.
- Software engineers who want to build production-grade RAG systems.
- Data scientists / ML engineers who want to go deeper than "just plug in LangChain."
- Architects / tech leads who must decide which vector DB, which retrieval strategy, what to monitor, and how much it will cost.
- AI researchers who want a structured map of the entire RAG landscape.
You need only Python basics and willingness to read carefully. Everything else is built up from first principles.
Each section builds on the last. If you are brand new, read in order. If you are experienced, jump straight to the practical guides — but each guide tells you which fundamentals to read if you get stuck.
Sections are split into:
- Conceptual files (
01-…,02-…) — read these to understand the why. - Practical guides (
06-Practical-Guides/) — runnable, end-to-end builds with code. - Decision frameworks (
04-Vector-Databases/06-…,09-Resources/) — quick reference once you know the basics.
A good first path:
- Read 01-Fundamentals end to end (~1 hour).
- Do Practical Guide 01: Beginner First RAG (~30 mins).
- Read 02-Core-Components (~1 hour).
- Do Practical Guide 02 or 03 (ChromaDB or FAISS).
- Read 03-Search-Techniques + do Practical Guide 04 (Hybrid + BM25 + RRF).
- From there: pick the RAG type (05) and advanced topic (07) that matches your real-world problem.
The "what / why / when" of RAG. Skim if you already know the basics.
- 01 — What is RAG?
- 02 — Why RAG is Needed
- 03 — How RAG Works (Step-by-Step)
- 04 — When To Use (and NOT Use) RAG
- 05 — RAG vs Fine-Tuning vs Long-Context
Every RAG system has the same building blocks. Master these and the rest is just glue.
- 01 — Embeddings (the bedrock)
- 02 — Chunking Strategies
- 03 — Vector Stores: Overview
- 04 — Retrievers
- 05 — LLMs and Prompting for RAG
Where the real gains come from. Semantic, lexical (TF-IDF & BM25), hybrid, and reranking.
- 01 — Semantic Search (Dense Retrieval)
- 02 — TF-IDF Deep Dive
- 03 — BM25 Deep Dive
- 04 — TF-IDF vs BM25 (the showdown)
- 05 — Hybrid Search + RRF (Reciprocal Rank Fusion)
- 06 — Reranking (Cross-encoders, ColBERT)
When to use FAISS, ChromaDB, Milvus, Weaviate, Qdrant, Pinecone, pgvector — with a clear decision tree.
- 01 — Vector DB Fundamentals (ANN, HNSW, IVF)
- 02 — FAISS: When and How
- 03 — ChromaDB: When and How
- 04 — Milvus: When and How
- 05 — Weaviate / Pinecone / Qdrant / pgvector
- 06 — Decision Framework: Which Vector DB?
Naive → Advanced → Modular → Graph → Agentic → Self/Corrective → Multimodal.
- 01 — Naive RAG
- 02 — Advanced RAG
- 03 — Modular RAG
- 04 — Graph RAG
- 05 — Agentic RAG
- 06 — Self-RAG and Corrective RAG (CRAG)
- 07 — Multimodal RAG
End-to-end runnable builds. Each is self-contained.
- 01 — Beginner: Your First RAG in 60 lines
- 02 — Intermediate: Production-style ChromaDB RAG
- 03 — Intermediate: FAISS RAG with persistence
- 04 — Advanced: Hybrid Search with BM25 + Dense + RRF
- 05 — Advanced: Reranking with Cross-Encoders
- 06 — Expert: Agentic RAG with Tool Use
- 07 — Expert: Production RAG Architecture
Query rewriting, advanced chunking, evaluation (RAGAS), cost & latency, security.
- 01 — Query Transformations (HyDE, multi-query, decomposition)
- 02 — Advanced Chunking (semantic, propositional, parent-child)
- 03 — Evaluation: How to Tell if Your RAG is Actually Good
- 04 — Optimization: Latency, Throughput, and Cost
- 05 — Security, Privacy, and Prompt Injection
- 01 — Debugging RAG: Failure Modes and How to Diagnose
- 02 — Production Architecture Patterns
- 03 — Monitoring and Observability for RAG
- 04 — Cutting-Edge RAG (2025–2026 and beyond)
The complete evaluation discipline — every type, every rubric, every gotcha. If you ship a RAG and want it to stay good, read this section.
- README — section map and 30-day plan
- 01 — Evaluation Overview (taxonomy)
- 02 — Retrieval Metrics Deep Dive
- 03 — Generation Metrics Deep Dive
- 04 — Rubrics and LLM-as-Judge
- 05 — Building Eval Datasets
- 06 — Tools Comparison (RAGAS, DeepEval, TruLens, Phoenix, LangSmith, promptfoo)
- 07 — Practical RAGAS Hands-On (runnable CI)
- 08 — Online Evaluation and A/B Testing
- 09 — Adversarial and Red-Team Evaluation
- 10 — Evaluation Anti-Patterns
- Python 3.10+
- Pip / Conda / uv — any package manager you like
- An API key for at least one LLM provider (OpenAI, Anthropic, or a local model via Ollama)
- ~2 GB free disk for sample datasets and small models
A single suggested environment for every practical guide:
pip install langchain langchain-community langchain-openai \
chromadb faiss-cpu sentence-transformers \
rank-bm25 pypdf tiktoken numpy scikit-learn \
transformers torch ragas datasets(Each guide notes what it actually needs — you do not have to install all of this on day one.)
After finishing, you should be able to:
- Explain RAG to a non-technical stakeholder in 90 seconds.
- Pick the right vector DB, embedding model, and chunking strategy for a given problem and justify the trade-offs.
- Build a hybrid (semantic + BM25 + RRF + reranking) retriever from scratch.
- Evaluate RAG quality with the right metrics (faithfulness, context precision, context recall, answer relevancy).
- Diagnose the real cause when a RAG system answers wrong (it is almost never the LLM).
- Architect a production RAG with ingestion pipelines, caching, observability, eval harness, and cost guardrails.
- Know when not to use RAG (which 90% of online tutorials fail to tell you).
Let's begin → 01-Fundamentals/01-what-is-rag.md