The assertion problem

Traditional tests compare output to an expected value. A model produces different valid phrasings of the same correct answer, so exact-match assertions fail constantly on correct behaviour and teach the team to ignore the suite.

Test properties, not strings

Assert the things that must be true: it cited a source that exists, it stayed within the allowed categories, it didn’t mention a competitor, it escalated when the stakes were high. Properties are checkable and stable across rephrasing.

Keep the deterministic tests deterministic

Most of an AI feature is ordinary software — routing, permissions, formatting, storage. Those deserve normal tests with exact assertions, and blurring the two is how teams end up with no reliable suite at all.

Test the plumbing exactly and the model behaviourally. Confusing the two gives you a suite nobody trusts.

The regression set grows from incidents

Every real failure becomes a permanent case. This is the mechanism that makes an incident worth something rather than merely embarrassing, and it is what an evaluation set is for.

Run it on every change to anything

Prompt edits, model versions, retrieval sources, and upstream data all change behaviour without touching application code. Tying the eval run to prompt versions in the repository is what makes that automatic rather than remembered.

Accept a pass rate, not perfection

Behavioural suites are graded, not binary. Set a threshold, alert on movement rather than on any single failure, and treat the never-events — leaked data, fabricated policy — as absolute blockers separate from the score.