CourseRetrieval-Augmented Generation: The Complete Course · Course guide · part 1 of 95
Part 1 · Course guide

Retrieval-Augmented Generation: The Complete Course

5 min read·13 Oct 2026

How to make a language model answer from your documents, correctly, with citations, and say so when it cannot.

Retrieval-augmented generation (RAG) looks simple: find some text, paste it into a prompt, ask the model. Most of the work is in everything around that: getting documents in without losing their tables, finding the right piece among thousands, keeping old and private documents out, making the answer cite its source, and proving all of it with numbers. This course teaches each stage through one system you build piece by piece: Hollin Answers, an assistant over the documents of Hollin Home Appliances, a made-up appliance maker, for its support agents, repair partners and customers. Hollin is fictional; every lesson also opens with a real, cited case.

Who this course is for

You are...Start at
New to Python or to calling a language modelThe AI Engineering course Module 0, Module 1 and Module 7 first, then Module 1 here
An engineer who has built a basic RAG demoModule 1 as a quick check, then Module 2
Already running RAG in productionModules 6, 8, 9, 11 and 12, then the capstone
Mostly interested in qualityModule 1, Lesson 2, then Module 11
Mostly interested in security and permissionsModule 2, Lesson 1; Module 5, Lesson 3; Module 9, Lesson 4; Module 12, Lesson 4

Every module's README lists what you need to know before starting it, so you can check whether it is safe to skip the one before.

Prerequisites

You should be comfortable withLevelWhere to learn it in depth
Python: functions, dictionaries, list comprehensions, classesIntermediateAI Engineering Module 1
Calling a language model, prompts, tokens, temperatureBasicAI Engineering Modules 0 and 7
Structured output with PydanticBasicAI Engineering Module 7
Vectors and a dot productBasic, explained again in Module 4AI Engineering Module 4
SQL and a web APIBasic, for Modules 10 and 14AI Engineering Modules 10 and 11
DockerBasic, for Module 14 onlyAI Engineering Module 13

The AI Engineering course has a one-module introduction to RAG (its Module 8). This course is the full treatment: if you have done that module, you can start here at Module 2.

What you need

  • A Google account, to run code in Google Colab and to keep your hollin-answers repository in Google Drive between sessions. Nothing to install.
  • One free API key, from Groq or Google Gemini, to use in Colab. Or no key at all, if you run a model on your own computer with Ollama and work in a code editor.
  • Embedding models and rerankers run locally from Hugging Face and need no key.
  • For the capstone and a few production lessons (PostgreSQL with pgvector, Docker Compose, CI), your own computer. Those lessons say so.

Setup takes about ten minutes: course-guide/02-setup-colab-and-llm-providers.md.

The modules

#ModuleWhat you add to Hollin AnswersNeeds first
1RAG FoundationsThe first grounded answer with a citation; which sources need retrieval and which need a databasePython and one model call
2Document Ingestion and ParsingLoaders for HTML, PDF, CSV, email and Markdown; clean text; duplicates caught; a typed record with access rightsModule 1
3ChunkingChunks that keep headings and tables together, with stable IDs and metadataModule 2
4EmbeddingsA cached, versioned embedder and the first retrieval scores on the labelled questionsModule 1
5Vector Stores and IndexingChroma and FAISS behind one retriever interface, permission filters inside the search, updates and deletesModule 4
6Search: Dense, Sparse, and HybridBM25, hybrid search with fusion, thresholds, current-over-archived rankingModules 4 and 5
7Query Understanding and TransformationRewritten follow-up questions; routing to documents or to the case databaseModules 1, 4, 5 and 6
8Reranking and Post-Retrieval ProcessingA cross-encoder reranker and a context assembler that fits the budgetModules 4, 5 and 6
9Generation, Grounding, and CitationsGrounded answers, verified citations, "I don't know", injected text containedModules 1, 5 and 8
10RAG Architectures and PatternsCorrective and agentic RAG in LangGraph, text-to-SQL, compared with the plain pipelineModules 5 to 9
11EvaluationAn evaluation harness, a judge you have checked, and a regression gateModules 4, 5, 6 and 9
12Production EngineeringCaching, freshness, access control at every step, tracing, fallbacksModules 5 to 9
13Advanced and Emerging TopicsQuery-log mining, unanswerable-question detection, a corpus auditModules 6, 8, 9, 11 and 12
14Capstone: A Production RAG ServiceA multi-tenant FastAPI service on PostgreSQL with pgvector, and a gauntlet of probes in CIThe labs of Modules 5, 6, 7, 8, 9, 11 and 12

How each lesson works

Every lesson is a walk through one Hollin example, one picture at a time:

  1. The situation: a problem at Hollin, brought by a named person.
  2. A real case, first: something that really happened, from a published source, cited.
  3. The idea: fifteen to thirty figures, one idea each, one running example.
  4. Run it: code with a walkthrough of every line.
  5. Break it: a failure you cause on purpose.
  6. In production: what teams do with this at scale.
  7. Check yourself: questions, one exercise, key terms and sources.

Each module ends with a lab (a guided build of its piece of Hollin Answers) and an incident file (a real, published failure replayed on Hollin's data and fixed). More detail: course-guide/01-how-this-course-works.md.

The tools you will use

Python throughout, plain Python first for every mechanism. LangChain for models, retrievers and text splitters, and LangGraph for loops and state, so the same code works with Groq, Gemini or Ollama. sentence-transformers for local embeddings and rerankers, rank_bm25 for keyword search, Chroma and FAISS in notebooks, PostgreSQL with pgvector and FastAPI for the service, Docker Compose to run it. Everything is open source apart from the hosted model services.

Course guide

FileRead it when
01-how-this-course-works.mdBefore your first lesson
02-setup-colab-and-llm-providers.mdBefore you run any code
03-hollin-answers.mdTo meet Hollin, the people, the sources and the dates
06-shared-data.mdTo see the corpus, questions and users every module reuses
04-style-guide.mdOnly if you are writing or editing lessons
05-image-style-guide.mdOnly if you are drawing the course figures