5 lessons
What is RAG, and why does it exist?
The open-book exam idea behind retrieval-augmented generation, and why it beats both "just ask the model" and "retrain the model on your data" for most real applications.
Chunking strategies for retrieval
Why you can't just embed a whole book as one vector, the actual trade-offs in splitting documents, and the strategies real systems use.
Vector search at scale, ANN, and how HNSW actually works
Why comparing your query against every stored vector doesn't scale, and the clever shortcut approximate nearest neighbor search uses instead.
Reranking and hybrid search
Why the first retrieval pass often isn't good enough on its own, how BM25 keyword search complements embeddings, and the math behind combining both with reciprocal rank fusion.
Hands-on: building a complete mini-RAG pipeline in C++
A capstone lesson wiring together chunking, embeddings, cosine similarity, and prompt construction into one working retrieval pipeline you can run end to end.