Library / 04 Quality, Evals & Reliability
Reviewed Oct 2026Testing & Evaluating AI Systems
Use tests for guarantees, evals for judgment, and QA for unanticipated seams.
This sheet covers which method to use. For what to measure and where to set release bars, see AI Product Evals →
01 / table
Choose the right method
| Method | Best for | Example |
|---|---|---|
| Unit / contract | Invariants | Rejected evidence cannot mutate accepted state |
| Integration | Cross-component flow | Evidence → review → state → history |
| End-to-end | Browser-to-API journeys | Review and confirm visible state update |
| LLM eval | Semantic judgment | Consequence correctly detected |
| Manual / adversarial QA | Unexpected UX and failures | Contradictory input or duplication |
02 / cards
Golden scenario anatomy
| Part | Define before inspecting output |
|---|---|
| Given | Current State, relevant rules, incoming Evidence and open Questions/Reviews |
| Expected interpretation | Review or no Review, affected fact, proposal and explicit uncertainty |
| Prohibited behavior | What must not be inferred, hidden, mutated or turned into certainty |
| After human action | Expected authoritative State, History, review lifecycle and downstream results |
03 / table
Regression neighbors
| Case type | Purpose |
|---|---|
| Original failure | Prevent the exact bug returning |
| Paraphrase | Test underlying meaning, not wording |
| Positive neighbor | Allow valid nearby behavior |
| Negative neighbor | Do not convert speculation into fact |
| Timeout / stale input | Check safe degradation |
04 / flow
When an eval fails
ReproduceLocate first wrong layerFix ownerOriginal caseAdjacent casesHoldouts + monitoring
05 / list
Quality dimensions
- State integrity
- Interpretation quality
- Groundedness and evidence
- Safe failure behavior
- User correction burden
- Consistency across repeated runs
GOING DEEPER
Password-reset regression family
| Case | Evidence | What it tests |
|---|---|---|
| Original | Password reset tickets were approved for automation. | Reproduces the original decision boundary |
| Paraphrase | Security signed off on automating password resets. | Checks semantic generalization |
| Positive neighbor | Automation is live in production. | Distinguishes implementation from approval |
| Negative neighbor | We may automate password resets later. | Keeps speculation out of Current State |
| Failure | Provider times out after Evidence is saved. | Preserves durable input and safe recovery |
Failure triage: Specify expected behavior first. Then determine whether the model interpreted it incorrectly, deterministic validation/application logic failed, or the UI represented correct behavior badly. Tests guard invariants; evals judge ambiguity; exploratory QA finds surprises.
PRACTICAL FRAMEWORK / AI PRODUCT WORK
Permission-withheld regression case
Run an otherwise valid task with one necessary source or permission deliberately withheld.
| Condition | Expected result |
|---|---|
| Source is inaccessible | Agent acknowledges what it cannot verify and does not fabricate facts. |
| Action permission revoked | No side effect; explicit approval/access request or safe escalation. |
| Old result remains in memory | Current access policy still governs; no disclosure from stale context. |
| Permissions restored | Task succeeds with correct provenance and audit evidence. |
Include this test in both the deterministic permission suite and the semantic eval suite. A fluent refusal can still conceal an unauthorized data read.