Module 06 of 12

Retrieval-Augmented Generation

Lessons

About This Module

A language model only knows what was in its training data, which can be out of date, incomplete, or missing your private information entirely. Retrieval-augmented generation (RAG) fixes this by looking up relevant information first and adding it to the prompt, so the model answers from real sources instead of guessing. It's also how agents get access to your documents, knowledge bases, and databases.

The first lesson is a short, clear explanation of what RAG is and why it helps. The second is a long, hands-on course that builds the pipeline step by step: indexing your documents, retrieval, and generation, then techniques for improving it, such as query translation and routing. The last lesson builds agentic RAG from scratch in Python, where the agent decides when and how to retrieve rather than always running one fixed lookup.

You don't need to finish the long course in one sitting. Watch the indexing, retrieval, and generation parts first, and come back to the advanced techniques when you build your own project.

Lessons

3 videos
01

What is Retrieval-Augmented Generation (RAG)?

IBM Research's Marina Danilevsky explains how combining an LLM with a retrieval step gives answers that are more up to date and traceable to their sources, and why that reduces hallucinations.

Video 6min
02

Learn RAG From Scratch – Python AI Tutorial from a LangChain Engineer

freeCodeCamp's course by Lance Martin: a full hands-on walkthrough of indexing, retrieval and generation, followed by query translation, routing, and adaptive RAG.

Video 2h 33min
03

Building Agentic RAG From Scratch in Pure Python

A code-along build of agentic RAG without a framework, showing how an agent can decide when and how to retrieve instead of running a single fixed lookup.

Video 27min