Retrieval-Augmented Generation (RAG)

Build question-answering systems grounded in your own documents: chunking, embeddings, keyword and hybrid search, reranking, prompts, citations, evaluation and production concerns, with small runnable examples.

Start course →

Syllabus

Why and How RAG Works

  1. Why RAG Exists
  2. The RAG Pipeline End to End
  3. RAG vs Fine-Tuning vs Long Context
  4. What RAG Does Not Fix

Preparing Documents: Loading, Chunking, Metadata

  1. Loading and Cleaning Documents
  2. Chunking Strategies
  3. Metadata, Permissions and Hierarchies

Retrieval: Keyword, Vector and Hybrid

  1. Embeddings and Semantic Search
  2. Keyword Search with TF-IDF
  3. BM25: The Standard Keyword Ranker
  4. Hybrid Search and Reciprocal Rank Fusion
  5. Vector Indexes and Approximate Search

Improving Retrieval Quality

  1. Query Rewriting and Expansion
  2. Reranking and Diversity (MMR)
  3. Choosing Top-k and Managing Context Cost

Generating Grounded Answers

  1. Building the RAG Prompt
  2. Citations You Can Verify
  3. Groundedness Checks and Refusals

Evaluating a RAG System

  1. Retrieval Metrics: Recall@k and MRR
  2. Evaluating Answers: Faithfulness and Relevance
  3. Failure Analysis: Where Did It Break?

Running RAG in Production

  1. Keeping the Index Fresh
  2. Security, Privacy and Prompt Injection
  3. Latency, Cost and Caching
  4. Advanced Patterns: Agentic, Graph and Multimodal RAG

Putting It Together

  1. Case Study: A Support Knowledge-Base Assistant
  2. Revision: Cheat Sheet and Self-Check