Sub topic 13
Keeping the Evaluation Current
Assume you understand basic product requirements, have a general idea of how language models work, and can read short Python and JSON examples. This chapter focuses on maintenance after you create an evaluation set. An evaluation set is a collection of test cases used to measure whether an AI feature still meets its requirements.
An evaluation becomes less useful when the product, users, policies, or model changes. A passing score then creates false confidence. Treat the evaluation as a product asset with an owner, a version, and a review process.
What causes an evaluation to become stale?
An evaluation case becomes stale when it no longer represents an important behavior or when its expected result is no longer correct. Common causes include:
- The product adds a new workflow or supported input type.
- A policy, price, legal rule, or knowledge source changes.
- Users begin asking questions that were not represented in the original data.
- A model, prompt, retrieval system, or tool integration changes.
- A grader changes its instructions or implementation.
- A previous failure is fixed, but nearby variations are not tested.
- The evaluation contains too many easy cases and too few difficult ones.
Track these changes as triggers for an evaluation review. Do not wait for the overall score to decline. A score can remain stable while an important category becomes worse.
Give cases a lifecycle
Store useful metadata with every case. At minimum, record its source, category, expected behavior, severity, owner, and last review date.
| Field | Purpose |
|---|---|
| `source` | Shows whether the case came from design, production feedback, or a known failure |
| `category` | Supports metrics by user intent or behavior |
| `severity` | Identifies failures that need stricter release rules |
| `last_reviewed` | Helps find cases that may need rechecking |
| `status` | Distinguishes active, retired, and quarantined cases |
A case should normally move through this lifecycle:
- Add it when a requirement, user report, or failure reveals a behavior worth testing.
- Review its input and expected result with the relevant product or subject expert.
- Run it in the evaluation and record its result.
- Recheck it when the source policy or product behavior changes.
- Retire it only when the behavior is no longer supported, and keep the history.
Do not silently edit a case after a failure. Editing can erase evidence of a regression. Create a new version or preserve the old input and record why the expected result changed.
from datetime import date
cases = [
{"id": "refund-014", "last_reviewed": "2026-08-01", "status": "active"},
{"id": "search-022", "last_reviewed": "2026-11-01", "status": "active"},
]
today = date.fromisoformat("2026-11-27")
review_after_days = 90
for case in cases:
reviewed = date.fromisoformat(case["last_reviewed"])
age = (today - reviewed).days
needs_review = case["status"] == "active" and age > review_after_days
print(case["id"], "review required" if needs_review else "current")Add production evidence safely
Offline cases should be supplemented with anonymized production examples, user feedback, support tickets, and incident reports. Sample these sources by category, not only by frequency. Rare requests can carry higher risk than common requests.
Remove personal information and secrets before adding a case. Separate the data used to discover new cases from the data used to report final metrics. Otherwise, repeatedly selecting known failures can make the evaluation look worse or better for reasons unrelated to the feature.
Keep both stable and changing portions of the set:
- A stable core protects important behaviors and makes releases comparable.
- A rotating set reflects new user language, new failures, and current product behavior.
Record evaluation versions and changes
Version the cases, graders, prompts, and thresholds together. A result is difficult to interpret if you know the score but not which test set or grader produced it.
A useful change log answers:
- What changed?
- Why did it change?
- Which requirement or failure motivated it?
- Did the score change because the feature changed or because the evaluation changed?
- Who reviewed the change?
When you add cases, report the old and new set separately for a transition period. When you retire cases, record their IDs and reasons. Review category coverage after every significant update so one large category does not hide a missing high-risk behavior.
Exercise
Exercise
A new refund policy changes the deadline from 30 to 45 days. What should you update, and what should you preserve?
Show answer
Update the policy-backed expected results and add cases for the new boundary, such as 30, 45, and 46 days. Preserve the old cases and record that the policy changed, so historical release results remain interpretable.