Level 7 · Artificial Intelligence and Intelligent Automation · Course 7.2 AI Application Engineering
Module 86: RAG
Goal: build retrieval-augmented generation (RAG): an assistant that finds the right passages in your approved documents and answers from them, with sources shown, saying honestly when the documents don't cover the question, and measured so you know how well it works.
You'll need: your semantic search from Module 85, your assistant route from Module 84, your prompt templates and test set from Module 83.
Lessons
- 1RAG architecture15–25 minutes✓
- 2Chunking15–25 minutes✓
- 3Retrieval and reranking15–25 minutes✓
- 4Grounding and citations15–25 minutes✓
- 5Evaluating RAG15–25 minutes✓
🛠️Module practice: A grounded assistant
- An indexing pipeline with cleaning, structure-aware chunking, context prefixes and metadata.
- Two-stage retrieval with permission filtering in the query and reranking.
- A grounded prompt with numbered passages, citations checked in code, and sources shown to the user.
- Honest "I couldn't find that" behaviour, tested.
- A 30-question RAG evaluation covering retrieval, faithfulness, correctness, citations, abstention and permissions, with feedback collection from staff.
✅Module check
Explain in a few sentences, in your own words:
How does a RAG assistant answer from your own documents reliably?
Show a good answer
A good answer mentions: separate indexing (clean, chunk by structure with context and metadata, embed, store) and answering pipelines; retrieval with permission and status filters in the query, hybrid recall then reranking to a few passages, and standalone rewriting of follow-ups; a grounded prompt that answers only from numbered passages treated as material, cites them (or uses built-in citations), and says it couldn't find answers that aren't there; code checks on citations and sources shown to users; and evaluation of retrieval, faithfulness, correctness, citations, abstention and permissions on a test set, re-run on every change and fed by real user feedback.
📝Module quiz
10 questions · 10 marks each · 100 marks in all · pass mark 70% · retry as often as you like ·
