Skip to content
Hammad Yousuf.
AI evaluation cases · NOTE 09

AI evaluation cases: turn a failure into a regression test

One failed example can tell you what your next AI test is missing.

Starter template · 4 October 2026
Hammad Yousuf
By Hammad YousufSoftware, AI & automation
FAILED INPUT → EXPECTED BEHAVIOR → REGRESSION CASE
Failure-to-test template · Open access

What to inspect

Preserve the input, observed failure and expected behavior before editing the prompt. Add a neighboring case that should still succeed so the fix is not narrowly fitted to one example. Keep the original failure in future regression runs.

Worked example

Synthetic failure: an assistant returns a confident policy answer when the source is absent. A regression case should expect an explicit limitation. A nearby control case supplies the policy and expects a supported answer.

Copy the full prompt

Adapt the inputs to your task. Remove private data before sending anything to a model. This page copies text locally; it does not run the prompt.

Full prompt · adapt the inputs
Convert [FAILURE REPORT] into an evaluation case. Record input, relevant context, observed output, expected behavior and a grading rule. Add one nearby case that should still pass and one ambiguous case that should be escalated. Do not fabricate a measured success rate. Explain which assertion can be automated and which requires review.

Review checklist

  1. Preserve the failure before changing the prompt.
  2. Write expected behavior in observable terms.
  3. Add a nearby successful control case.
  4. Keep holdout cases outside prompt tuning.

Keep the resource

Download the complete note ↓Markdown · explanation, example, prompt and checklistDownload the prompt ↓Plain text · ready to adaptOpen the full-size visual ↓SVG · scalable reference diagram

Documentation & scope

OpenAI: evaluation best practices ↗

This is an original workflow template with an illustrative example. It does not report completed model tests or measured performance. Provider APIs can change; check the linked documentation for your exact integration.

Have a workflow to review?

Bring the task, inputs and the result you need. We can discuss the integration and the checks around it.

Discuss your workflow ↗