Module · 5 lessons

Retrieval-Augmented Generation

Give Claude your own knowledge — retrieve relevant documents and feed them as context so the model answers from your data, current and grounded, instead of guessing.

At a glance

Level
Intermediate
Lessons
5 lessons
Time to complete
1 week
Cost
Free forever · no sign-up

Welcome to Retrieval-Augmented Generation, the seventh module of the Generative AI & LLM Engineering course — and the one where everything you’ve built so far clicks together. A language model only knows what it learned during training: it can’t see your documents, your latest data, or anything private. RAG fixes that. Instead of asking the model to answer from memory, you retrieve the most relevant pieces of your own knowledge base (using the embeddings and vector database from the last two modules) and feed them to the model as context. The model then answers from those facts — current, private, and grounded.

You’ll start with what RAG is and why “retrieve, then generate” beats both a bare model and plain search. Then you’ll build a complete pipeline — retrieve from Chroma, assemble an augmented prompt, and generate an answer with Claude. You’ll learn to chunk documents so retrieval returns the right amount of context, and to ground answers with citations so the model sticks to your sources and admits when it doesn’t know. The capstone is a documentation Q&A bot that answers questions over a real document set and cites where each answer came from.

Every example runs for real against the Claude API on the affordable claude-haiku-4-5 model, with retrieval handled locally and freely by Chroma. By the end you’ll have built the single most important pattern in applied LLM engineering — the one behind nearly every “chat with your docs” product — and you’ll be ready to turn it into autonomous agents in the modules ahead.

Start with Lesson 1, where you’ll see exactly what RAG is and the problem it solves.

Lessons in this module

Achievement

Complete all 5 lessons to finish the Retrieval-Augmented Generation module.

Start module