Skip to content

Repository files navigation

The Complete RAG Mastery Course

From absolute beginner to top 1% RAG expert — theory, intuition, and battle-tested practical guides.


Who This Course Is For

  • 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.


How To Use This Course

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:

  1. Read 01-Fundamentals end to end (~1 hour).
  2. Do Practical Guide 01: Beginner First RAG (~30 mins).
  3. Read 02-Core-Components (~1 hour).
  4. Do Practical Guide 02 or 03 (ChromaDB or FAISS).
  5. Read 03-Search-Techniques + do Practical Guide 04 (Hybrid + BM25 + RRF).
  6. From there: pick the RAG type (05) and advanced topic (07) that matches your real-world problem.

Course Map

📘 01 — Fundamentals

The "what / why / when" of RAG. Skim if you already know the basics.

🧩 02 — Core Components

Every RAG system has the same building blocks. Master these and the rest is just glue.

🔍 03 — Search Techniques

Where the real gains come from. Semantic, lexical (TF-IDF & BM25), hybrid, and reranking.

🗄️ 04 — Vector Databases (Deep Dive + Decision Framework)

When to use FAISS, ChromaDB, Milvus, Weaviate, Qdrant, Pinecone, pgvector — with a clear decision tree.

🌳 05 — Types of RAG

Naive → Advanced → Modular → Graph → Agentic → Self/Corrective → Multimodal.

🛠️ 06 — Practical Guides (Beginner → Expert)

End-to-end runnable builds. Each is self-contained.

🚀 07 — Advanced Topics

Query rewriting, advanced chunking, evaluation (RAGAS), cost & latency, security.

🎓 08 — Expert Level

🧪 10 — Evaluation Deep Dive

The complete evaluation discipline — every type, every rubric, every gotcha. If you ship a RAG and want it to stay good, read this section.

📚 09 — Resources


Prerequisites

  • 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.)


What "Top 1%" Means In This Course

After finishing, you should be able to:

  1. Explain RAG to a non-technical stakeholder in 90 seconds.
  2. Pick the right vector DB, embedding model, and chunking strategy for a given problem and justify the trade-offs.
  3. Build a hybrid (semantic + BM25 + RRF + reranking) retriever from scratch.
  4. Evaluate RAG quality with the right metrics (faithfulness, context precision, context recall, answer relevancy).
  5. Diagnose the real cause when a RAG system answers wrong (it is almost never the LLM).
  6. Architect a production RAG with ingestion pipelines, caching, observability, eval harness, and cost guardrails.
  7. 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