Course 4 · Unit 2
RAG
Part of Applications with LLMs
- 7 lessons
- ≈ 25 h of study
- Level: intermediate
Topics covered
- Document ingestion
- Chunking
- Embeddings
- Vector databases
- Retrieval
- Reranking
- Hybrid search
- Query rewriting
- Graph RAG
- Multimodal RAG
- Evaluation
Lessons in this unit
- Ingestion and chunking — getting documents ready to be found 65 min
A RAG system can only retrieve what you've chunked well beforehand. Here you learn to clean, chunk with overlap and tag each chunk with its metadata. - Lexical retrieval — inverted index, TF-IDF and BM25 60 min
The algorithm that has been behind search engines for thirty years is still essential in a modern RAG system. You build it from scratch and learn to compute it by hand. - Dense retrieval — embeddings, top-k and approximate indexes 110 min
Searching by meaning instead of by words, and doing it fast with millions of vectors. You build exact search, an IVF index and measure how much recall speed costs you. - Hybrid search, reranking and query rewriting 85 min
No search engine is good at everything. You learn to fuse BM25 and embeddings with RRF, to reorder the candidates with a reranker and to rewrite queries so they find what the user meant. - Building and evaluating a RAG system — prompts with citations, metrics and failure analysis 90 min
You close the pipeline by assembling the prompt with citations within a token budget, and you learn to prove with numbers whether your RAG system works and, when it fails, at which stage. - Graph RAG — retrieving by following relationships 95 min
When the answer is spread across several documents linked by relationships, searching by similarity isn't enough. You build a knowledge graph, traverse it for multi-hop questions and learn when it's worth its cost. - Multimodal RAG — tables, images and PDF layout 85 min
Real documents aren't just running text. You learn to retrieve tables, figures and whole pages, to choose between describing them with text or using joint embeddings, not to mix scores from different modalities and to evaluate by modality.
Prerequisites
Before this unit it helps to have done:
- APIs and services for AI (Course 4 · Unit 1)
The full explanations, auto-graded exercises, exams and projects are inside the academy.
Every lesson you complete gives you 10 yang, the academy's currency, and every unit exam you pass, 50.
Shall we start?
Create your account and activate your subscription: you get the whole syllabus from day one.