Advanced RAG Patterns
Go beyond basic retrieval. Master chunking strategies, hybrid search, re-ranking, query transformation, and production-grade RAG evaluation.
Curriculum
Lesson 1: Chunking Strategies That Actually Work
Fixed-size, recursive character, semantic, and document-aware chunking — learn how chunk size and overlap directly impact retrieval quality, with experiments to prove it.
Lesson 2: Hybrid Search: Semantic + BM25 Keyword
Combine dense vector search with sparse BM25 keyword matching using Reciprocal Rank Fusion (RRF). Understand when hybrid beats pure semantic and how to tune the alpha weight.
Lesson 3: Re-ranking with Cross-Encoders
Use a cross-encoder model to re-score retrieved candidates and surface the truly most relevant chunks. Covers Cohere Rerank API and local sentence-transformers re-rankers.
What is Retrieval-Augmented Generation (RAG)?
How RAG combines retrieval with generation to ground LLM responses in factual, up-to-date information.
Lesson 4: Query Transformation & HyDE
Rewrite ambiguous user queries before retrieval using step-back prompting and Hypothetical Document Embeddings (HyDE) — closing the gap between what users ask and what documents say.
Lesson 5: Multi-Query & Step-Back Retrieval
Generate multiple query variations from a single user question and merge the retrieved sets. Use step-back questions to retrieve broader context for narrow queries.
Lesson 6: Contextual Compression & Filtering
Filter retrieved chunks down to only the sentences that answer the query, using LLM-based extractive compression. Reduce token costs while improving answer quality.
Advanced RAG Techniques
Multi-query retrieval, re-ranking, and hybrid search strategies for production-grade RAG pipelines.
Lesson 7: Evaluating RAG Pipelines with RAGAS
Measure faithfulness, answer relevancy, context precision, and context recall using the RAGAS framework. Build a golden dataset and run automated eval across pipeline variants.
Lesson 8: Capstone — Production RAG Pipeline
Build a production-grade RAG system that combines hybrid search, re-ranking, and contextual compression, evaluated end-to-end with RAGAS on a real document corpus.
Evaluating RAG Pipelines
Metrics and frameworks for evaluating RAG system quality — retrieval precision, faithfulness, and relevance.
Course Quiz
5 questions · ~5 min · Pass 4/5 to unlock your badge