Free course · by Debugshala, Indore
RAG Tutorial
8 free lessons, in the order we teach them in class: start at lesson 1 and work down. Every lesson has an analogy, a diagram, code you can run or copy, a quick quiz and an FAQ.
- 8Lessons
- 1Modules
- ~2 hReading time
- FreeAlways
01Retrieval-Augmented Generation
- What is RAG? Retrieval-Augmented Generation Explained SimplyWhat is RAG? Learn retrieval-augmented generation step by step: chunking, indexing, retrieval and prompt augmentation, with a runnable TF-IDF demo in Python.
- Vector Databases Explained: How RAG Stores and Finds EmbeddingsWhat a vector database stores, how IVF and HNSW indexes speed up search, why metadata filters matter, and when numpy, Chroma or pgvector is enough for RAG.
- RAG Chunking Strategies: Fixed, Recursive, Semantic and MoreCompare five RAG chunking strategies with runnable Python: sentence, recursive, heading-based and semantic splitting, plus a test that measures retrieval hits.
- Hybrid Search and Re-ranking for RAG: BM25, RRF, Cross-EncodersLearn hybrid search for RAG: BM25 written by hand, Reciprocal Rank Fusion, weighted fusion and cross-encoder re-ranking, with runnable Python and a recipe.
- Advanced RAG Architectures: Rewriting, Routing, Corrective RAGAdvanced RAG architectures explained: query decomposition, routing, small-to-big retrieval, corrective RAG, GraphRAG and agentic RAG, and when to use each.
- HyDE in RAG: Hypothetical Document Embeddings ExplainedHyDE explained: search with an LLM-written hypothetical answer instead of the question. See why it works, when it drifts, and how to anchor it in Python.
- RAG vs CAG: Cache-Augmented Generation vs Retrieval ExplainedRAG vs CAG compared: how cache-augmented generation preloads a KV cache, when the knowledge fits, memory and token maths in Python, and hybrid designs.
- RAG Evaluation: Metrics to Test Retrieval and Answer QualityHow to evaluate a RAG system: hit rate, recall@k, MRR, faithfulness and answer relevance, a golden question set, LLM judges and a repeatable test loop.