Evals and quality
Gate releases on a versioned eval set grown from production, with attack and tool choice cases. Grade with code first and watch quality, cost and speed.
- Required 2
- Recommended 13
Required
Put attack cases in every eval run
AIF-77Give each AI feature's eval set at least 20 attack cases, marked critical. Fail CI when any run follows an injected instruction, leaks data it should not or calls a forbidden tool.
Test that answers do not change with who asks
AIF-32For features that rank, score or decide about people, add eval pairs that differ only in one personal detail, such as a name or age. Fail the run when outcomes differ.
Recommended
Grade AI features against fixed examples
AIF-86Test every AI feature against a fixed set of graded examples, and fail the build when the score drops.
Grow the eval set from production
AIF-26Turn every confirmed bad answer from production into an eval case within one week, and keep at least 50 cases per feature.
Version the eval set and keep a held-out part
AIF-76Give each eval set a version that rises on every change, and compare scores only within one version. Keep at least 20% of cases held out, never shown in prompts, examples, fine-tune data or feedback stores.
Grade with code before a grading model
AIF-27Grade every quality that code can check with exact code checks. Use a grading model only for qualities code cannot check. It must first agree with people on at least 80% of good answers and 80% of bad ones.
Run each case several times
AIF-28Run each eval case at least three times and score the pass rate per case. One run of a model can pass or fail by chance.
Measure cost and speed in every eval run
AIF-29Record tokens, cost and latency for each case in every eval run, and fail the run when they pass the limits in the feature's spec.
Watch quality in production
AIF-30Track at least one quality signal per AI feature in production. Alert when it drops by more than a set amount, such as 10 points in a week.
Have a person read a sample every week
AIF-31Have a person read a random sample of production outputs every week, such as 30 per feature. Record each as good or bad with a reason.
Rebuild fine-tuned models from stored data and compare before switching
AIF-62Store each fine-tuned model's training file hash, base model version and settings under one version ID. Before switching to a new fine-tune, run the full eval set on the old and the new model, and switch only when the score holds.
Keep a set of tasks with the tools they need
AIF-82Keep at least 50 tasks in plain words, each with the tool and the key arguments a good agent would use. Include tasks where the right move is no tool, or a question back.
Run the tool evals on more than one model
AIF-83Run the task set against at least two model families, and against the clients most of your agent traffic comes from. Run each task at least three times.
Gate releases on tool choice scores
AIF-84Score each run by the share of tasks with the right tool, the share with the right arguments, and the calls per task. A release fails when either share drops more than 2 points below the last release.
Rerun the tool evals on every tool change
AIF-85Run the tool evals in CI on every change to a tool's name, description or schema, and on every change to the set of tools.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-features/evals-and-quality">Agent Wranglers AI features playbook</a>. In code you write, add a comment next to it with the same link.