Claude API Evals: Test Your Prompts and Models with Data
Build evals for Claude API apps and test a prompt or model change with data: test sets, code checks and a Claude judge, so you know if it got better.
- Claude API
- 6 days
- advanced
- 6 lessons
- about 2.5 hours
Free and self-paced. Every lesson is open to everyone.
Start with lesson 1What you will do
For people who finished Claude API for Beginners and run Python scripts that call the Messages API. In six days you write success criteria, build a small test set with edge cases, grade answers with code checks and with a Claude judge and a rubric, compare two prompts or two models on score, spread, speed and cost, and run a regression check after every change. The API is pay as you go with credits in the Claude Console.
How this course works
The course is free and you go at your own pace. Each lesson is short: a bit of reading and a few small tasks you do in the tool itself, so you learn by using it. Every lesson is open to everyone, no account needed. A free account saves your progress, so you can pick up where you left off on any device. What the account stores and how to get it removed is on the privacy page.
Syllabus
- Day 1, 25 minutes How to write success criteria for a Claude task Write four measurable success criteria for a Claude email sorter and run the sorter once on a made-up customer email.
- Day 2, 25 minutes How to build a small test set for a Claude eval Build a test set of twelve labelled emails with edge cases and check that every case has a valid right answer.
- Day 3, 25 minutes How to grade Claude's answers with code checks Run the email sorter over your test set and grade each answer with code checks: valid JSON, a known label and an exact match.
- Day 4, 30 minutes How to grade open answers with a Claude judge and a rubric Grade Claude's draft replies with a contains check and a Claude judge that uses one rubric per quality, then check the judge.
- Day 5, 30 minutes How to compare two prompts or two Claude models on evidence Compare two prompt versions or two models on the same test set, over three trials, in a table of score, spread, speed and cost.
- Day 6, 25 minutes How to keep your Claude eval running when things change Save a baseline, change the prompt, add a new failure case and run a regression check that shows what broke.