Build a Grounded RAG Assistant
Create a small question-answering application over owned or freely licensed technical documents. It retrieves passages, cites their origins, and abstains or qualifies answers when evidence is missing.
- Intermediate
- 6 milestones · 27 steps in all
- Quizzes on 9 skills
- Self-paced
Start with M1: Requirements and example queries. Build it one step at a time; your progress is saved as you go.
What you will build
- Answer user queries through retrieval and generation.
- Return source references with outputs.
- Evaluate retrieval quality and answer grounding on held-out questions.
- Document deployment, known limitations, access controls and cost considerations.
Tools and ground rules
- Python or TypeScript; any adequately documented retrieval and model provider.
- Source dataset under a lawful license; no hard-coded API secrets.
- No paid AI provider required for the first milestone; a mock API is allowed for basic tests.
Getting started
Follow the milestones in order. Each one is a short list of steps you work through and mark done, and ends with a quiz on each skill it used: passing a quiz is what counts as evidence for that skill.
From brief to evidence
- Milestone 1 · M1
Requirements and example queries
Requirements plus 10 example queries
Done when: Clear dataset rights, user stories and expected sources.
4 steps
- Pick documents you are allowed to use
- Write the user stories
- Write 10 example questions with their expected sources
- List what is out of scope
- Milestone 2 · M2
Ingestion and retrieval CLI
Ingestion/retrieval command-line tool
Done when: Deterministic loading and query tests.
6 steps
- Set up the project
- Load documents with stable IDs
- Split documents into overlapping chunks
- Embed the chunks and save the index
- Search from the command line
- Test loading and two questions
- Milestone 3 · M3
QA API with citations
API returning an answer plus source IDs
Done when: Accepts a query and returns an answer with source IDs, or states uncertainty.
5 steps
- Build a grounded prompt
- Use a mock model
- Answer, cite, or abstain
- Expose an /ask endpoint
- Test citing and abstaining
- Milestone 4 · M4Includes an exercise
Evaluation report
Precision/recall on a labeled test set plus failure analysis
Done when: Held-out set documented; metrics computed correctly; at least 10 queries; 2 failure causes analysed.
5 steps
- Write the metric functions
- Check your metric code on the Tech Atlas fixture
- Evaluate your own questions
- Analyse two failures
- Write down latency, cost and limits
- Milestone 5 · M5
Security and operations README
Operational README
Done when: Covers secrets, safe user input, logging and error strategy.
4 steps
- Keep secrets out of the repository
- Treat retrieved text as data
- Log what helps, not what leaks
- Handle timeouts and provider errors
- Milestone 6 · M6
Demo and reflection
Reproducible setup and two design trade-off explanations
Done when: Another person can reproduce the demo from the README.
3 steps
- Make the setup reproducible
- Record a short demo
- Explain two trade-offs
A project worth finishing
Finish all 6 milestones and pass their quizzes to demonstrate the skills this project uses.