Module 89: Evaluation and Safety
Goal: make your AI features trustworthy: catch and reduce hallucinations, defend against prompt injection, measure quality with proper test sets, protect personal data, and watch how the system behaves once people use it.
You'll need: your grounded, tool-using assistant (Modules 86 and 87), its test sets, and your privacy notes (Module 79).
Lessons
- 1Hallucination15–25 minutes✓
- 2Prompt injection15–25 minutes✓
- 3Test sets15–25 minutes✓
- 4Privacy15–25 minutes✓
- 5Monitoring15–25 minutes✓
🛠️Module practice: An evaluated, safeguarded assistant
- Faithfulness and number checks on answers, with a flag or block on failure.
- Planted prompt-injection documents and inputs in staging, with every protection documented and tested.
- A categorised test set run by a script, with code checks, a calibrated model grader, and 100% required on safety and permission cases.
- An updated data inventory, log masking and log retention, and recorded provider data terms.
- A monitoring dashboard with cost and error alerts, a weekly review routine and a tested kill switch.
✅Module check
Explain in a few sentences, in your own words:
How do you make an AI feature trustworthy and keep it that way?
Show a good answer
A good answer mentions: hallucinations reduced by grounding, allowed uncertainty, tools for exact facts, automatic citation, number and faithfulness checks, and human review where it matters; prompt injection treated as a permanent risk, contained by least-privilege tools, approvals, code-enforced permissions, no secrets in prompts, safe output handling and a controlled knowledge base, and tested with planted attacks; realistic, growing, categorised test sets scored by code, humans and calibrated model graders, with safety cases required to pass fully; personal data minimised, masked and retained briefly, with provider terms checked; and production monitoring of usage, cost, latency, errors, quality and safety signals, with reviews, recorded changes, evals before release and a kill switch.
📝Module quiz
10 questions · 10 marks each · 100 marks in all · pass mark 70% · retry as often as you like ·
