Chapter 01
Module 1: Agentic RAG
Module 1: Agentic RAG
In this module, we learn what LLMs are and build a simple RAG pipeline using keyword search. Then we make it agentic, so the LLM decides when and what to search instead of running a fixed pipeline.
Code: code/
Part 1: RAG
The first 10 lessons walk through building a working RAG pipeline from scratch with keyword search.
- Introduction - What we'll build and why
- Environment Setup - Python, uv, OpenAI API
- What is RAG - Why LLMs need context, the RAG architecture
- The Course FAQ Dataset - Fetching and exploring the FAQ data
- Search - Building a search engine with minsearch
- Building a Prompt - Combining search results into a prompt
- RAG Pipeline - Wiring search + prompt + LLM together
- RAG Helper - Reusable RAGBase class and data loading
- Data Ingestion - Persistent search with sqlitesearch
- Wrap-up of Part 1 - Where to go from here
Part 2: Agents
Part 2 puts the LLM in charge of the search decisions, turning the fixed pipeline into an agent.
- Agents - Why a fixed RAG pipeline isn't enough
- Quick RAG Revision (Optional) - Setting up RAG (also a standalone workshop entry point)
- Function Calling - Giving the LLM tools it can use
- The Agentic Loop - Repeating until the model stops calling tools
- ToyAIKit - A teaching framework for the agent loop
- Other Frameworks - Production frameworks worth exploring
Homework
Optional
Extra material for going deeper on search internals.
- Build a Search Engine (Code) - How minsearch was built from scratch
Original workshop recordings
This module was taught as two live workshops, which we chopped into the per-lesson videos above. To watch the full uncut recordings:
- Part 1 – RAG: Build Your First RAG Application
- Part 2 – Agents: [From RAG to AI Agents: Function Calling and Tool Use](https://www.youtube.com/watch?v=RAqLWJsLZb4)
Old content
Earlier cohorts taught this module differently. See the archived materials for the 2024 and 2025 cohorts.
Notes
Write your own notes below this line:
