← Theory library
RAG & Vector Search theory
Chunking, embeddings, hybrid retrieval, reranking, and grounded answers.
Practise in the Code Lab →Easy
- 1. Why retrieval-augmented generation existsGround answers in your own documents instead of model memory.
- 2. Embeddings and vector similaritySemantic meaning as geometry in high-dimensional space.
- 3. Chunking strategies that decide your quality ceilingBad chunks cannot be rescued by a better model.
- 4. Vector indexes: HNSW, IVF, and ANN trade-offsApproximate search buys speed with a recall knob.
- 5. Hybrid search: BM25 plus vectorsKeywords catch what embeddings miss, and vice versa.
- 6. Reranking with cross-encodersRetrieve broadly, then reorder precisely.
Medium
- 7. Prompting the generator for grounded, cited answersForce citations and permit abstention.
- 8. Evaluating RAG: retrieval and generation separatelyMost RAG bugs are retrieval bugs.
- 9. Multi-tenant security and permission-aware retrievalA shared index is a data-leak surface.
- 10. Agentic and graph RAG patternsWhen one retrieve-then-answer pass is not enough.