Context Switch
← All references
Library / 04 Quality, Evals & Reliability
Reviewed Oct 2026

Testing & 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

MethodBest forExample
Unit / contractInvariantsRejected evidence cannot mutate accepted state
IntegrationCross-component flowEvidence → review → state → history
End-to-endBrowser-to-API journeysReview and confirm visible state update
LLM evalSemantic judgmentConsequence correctly detected
Manual / adversarial QAUnexpected UX and failuresContradictory input or duplication
02 / cards

Golden scenario anatomy

PartDefine before inspecting output
GivenCurrent State, relevant rules, incoming Evidence and open Questions/Reviews
Expected interpretationReview or no Review, affected fact, proposal and explicit uncertainty
Prohibited behaviorWhat must not be inferred, hidden, mutated or turned into certainty
After human actionExpected authoritative State, History, review lifecycle and downstream results
03 / table

Regression neighbors

Case typePurpose
Original failurePrevent the exact bug returning
ParaphraseTest underlying meaning, not wording
Positive neighborAllow valid nearby behavior
Negative neighborDo not convert speculation into fact
Timeout / stale inputCheck safe degradation
04 / flow

When an eval fails

ReproduceLocate first wrong layerFix ownerOriginal caseAdjacent casesHoldouts + monitoring
05 / list

Quality dimensions

GOING DEEPER

Password-reset regression family

CaseEvidenceWhat it tests
OriginalPassword reset tickets were approved for automation.Reproduces the original decision boundary
ParaphraseSecurity signed off on automating password resets.Checks semantic generalization
Positive neighborAutomation is live in production.Distinguishes implementation from approval
Negative neighborWe may automate password resets later.Keeps speculation out of Current State
FailureProvider 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.

ConditionExpected result
Source is inaccessibleAgent acknowledges what it cannot verify and does not fabricate facts.
Action permission revokedNo side effect; explicit approval/access request or safe escalation.
Old result remains in memoryCurrent access policy still governs; no disclosure from stale context.
Permissions restoredTask 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.