Intermediate Free 90 min total Course 05 of 90

Retrieval-Augmented
Generation (RAG)

A language model trained on 2023 data cannot tell you what happened last week. RAG solves this by retrieving the right documents at query time and injecting them into the model's context. This course shows you exactly how that retrieval pipeline works and how to build one that holds up under real load.

Start Module 1 → Talk to Arjun
Is this course for you?
This IS for you if
  • You want to build AI systems that answer questions from your own documents
  • You are an engineer, data scientist, or product manager evaluating RAG versus fine-tuning
  • You have built a basic LLM integration and want to add grounded, cited answers
  • You have completed the Fine-Tuning course and want to know when RAG is the better choice
This is NOT for you if
  • You have never used an LLM API before (start with How LLMs Work first)
  • You want deep vector database internals at the systems level
  • You need a production-scale distributed retrieval infrastructure tutorial
ⓘ
Prerequisites: How LLMs Work and Fine-Tuning LLMs. You should understand what a language model does with its context window and why training data has a cutoff date. If you want to start from zero, take Model Development Fundamentals first. Basic Python familiarity helps for the code examples.
What you will be able to do
✓Explain what RAG is and why it outperforms fine-tuning for live or large knowledge bases
✓Embed text with sentence-transformers and index it with FAISS for fast similarity search
✓Choose a chunking strategy for a given document type and explain the tradeoffs
✓Combine sparse and dense retrieval with a cross-encoder reranker to improve precision
✓Evaluate a RAG pipeline using RAGAS: context precision, faithfulness, and answer relevance
✓Add caching, metadata filtering, and observability to a RAG service under real load

The Six Modules

01
What Is RAG?
The three-component architecture: retriever, context assembler, and generator. Why RAG beats fine-tuning for live data and large knowledge bases. The basic RAG loop in Python.
15 min
→
02
Embeddings and Vector Stores
Dense vector representations of semantic meaning. Cosine similarity and dot product. FAISS, Pinecone, Weaviate, Chroma, and pgvector compared. HNSW versus IVF indexing.
15 min
→
03
Chunking Strategies
Why feeding a full PDF to a vector store breaks retrieval. Fixed-size, sentence-boundary, and document-aware chunking. The precision-recall tradeoff at different chunk sizes and overlap settings.
15 min
→
04
Retrieval and Reranking
Sparse retrieval with BM25, dense retrieval with DPR bi-encoders, hybrid fusion with RRF, and cross-encoder reranking as a second pass. How each configuration shifts precision at 5.
15 min
→
05
RAG Evaluation
The three axes: retrieval quality, generation faithfulness, and answer relevance. RAGAS framework: context precision, context recall, faithfulness, and answer relevance. LLM-as-judge for RAG evaluation.
15 min
→
06
Deploying RAG at Scale
Latency budgets across embedding, retrieval, and generation. Query and semantic caching. Metadata filtering. Observability: chunk logging, faithfulness drift. HyDE, FLARE, and self-RAG.
15 min
→

Supporting Blog Series

Six articles covering every angle of RAG. Read any one independently or work through them alongside the course.

Related Courses

Ready? Start with Module 1.

No account. No paywall. No credit card. Just start learning.

Begin Module 1 →