Advanced RAG Patterns
Go beyond basic retrieval. Master chunking strategies, hybrid search, re-ranking, query transformation, and production-grade RAG evaluation.
By Bishwambhar Sen • Last updated
What you'll learn
Advanced RAG Patterns is an advanced-level course of 8 lessons organised into 3 modules, with an estimated workload of ~12 hours. The course works towards building a production-grade query pipeline with hybrid re-ranking. It moves through Better Retrieval, Query Engineering, and Evaluation & Production. The course is made up of 7 interactive lessons and 1 project lesson.
Better Retrieval
- 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.
- 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.
- 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.
Query Engineering
- 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.
- 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.
- 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.
Evaluation & Production
- 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.
- 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.
Hands-on project in this course: Capstone — Production RAG Pipeline.
3 modules also include a recommended video from IBM Technology, Sam Witteveen, and DeepLearning.AI, embedded below the lesson list.
Prerequisites
This course is listed as advanced level. The catalog is ordered as a progression, so it is easiest to follow after AI Fundamentals: From Zero to Your First Model and Embeddings & Vector Databases. If you already know that material, you can start here directly.
The course ends with a short quiz; passing it earns the Advanced RAG Patterns badge.
Curriculum
Course Quiz
5 questions · ~5 min · Pass 4/5 to unlock your badge