RAG Foundations
Build a retrieval-augmented generation pipeline that retrieves relevant passages and generates answers confined to them.
3 objectives 6 steps about 110 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Explain when RAG is preferable to prompting alone, long context or fine-tuning, given a knowledge source's size, freshness and access rules.
- Implement an ingest-retrieve-generate pipeline with a prompt that confines answers to the retrieved context.
- Improve retrieval with query rewriting or reranking and show the effect on a fixed query set.
Lesson plan
6 steps, about 110 min · 5 of 5 lessons available so far
- When Retrieval Beats Fine-Tuning or Long Context Concept · 15 min
- A Minimal RAG Pipeline End to End Worked example · 25 min
- Assembling Context for Generation Concept · 15 min
- Lab: Query Rewriting and Reranking Lab · 25 min
- Common RAG Failure Modes Concept · 15 min
- Check: Trace a Wrong Answer to Its Cause Knowledge check · 6 questions
Practise it
Build a command-line question-answering tool over the corpus from the Chunking practice: retrieve the top-k passages, generate an answer confined to them, then add a reranker and report how many of 15 test questions change from wrong to right. Add two tenants and a changed or deleted document; assert that retrieval, reranking and caches never return another tenant's content or a source that is no longer authorized.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own RAG PipelineIntermediate · 8–16 h
References
Hard prerequisites
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.