Week 09 — Retrieval Augmentation (RAG)
| Material | Where |
|---|---|
| Lecture notes | Chapter 8 · RAG — HTML |
| Lab | LangChain + LangGraph RAG lab · Download notebook |
| Papers | RAG (Lewis et al., 2020) (PDF) · Self-RAG (Asai et al., 2023) (PDF) |
This week
Define RAG and see a complete question–evidence–answer example. Prepare documents through chunking, embeddings, and indexing, then use the collection to retrieve passages and generate an answer. Diagnose failures before introducing retrieval improvements, agent-controlled searches, and Self-RAG’s learned judgments. The lab implements document preparation and question processing with LangChain and LangGraph.
Lab
Load the source article, inspect chunks and embeddings, retrieve passages, and check the model input and cited answer. Connect retrieval and generation with LangGraph, then apply the same workflow to the RAG paper and change the number of retrieved chunks. Download the notebook and upload it to Colab to run.