in nine months of operation
for a 1,200-case suite, parallelised
across four ML services
Verity is continuous integration for model behaviour. Every pull request that touches a prompt, a model version, a retrieval parameter, or a preprocessing step triggers an evaluation run against versioned test suites. If a metric moves beyond its declared tolerance, the merge is blocked and the diff shows which cases changed.
It is not a research tool. It is a merge gate.
Application code has had regression testing for decades. Machine learning components in the same repositories, at the time we started, had none.
A prompt would be edited to fix one case and quietly break eleven others. A model version bump would improve the headline metric and degrade an important sub-population. Neither showed up until a user complained, because the only evaluation was a notebook someone ran manually before a release, if they remembered.
The uncomfortable part is that everyone knew this. The reason it persisted is that ML evaluation is slow, non-deterministic, and expensive, and those three properties make it a bad fit for the CI systems that already existed.
Test suites live in the repository as versioned YAML. A change to the suite is a reviewable diff, which prevents the failure mode where a metric improves because someone quietly edited the cases.
Each suite declares what it is protecting and how much movement is acceptable. Some metrics are hard gates. Others warn. The suite author has to make that call and write it down, which is itself a useful forcing function.
The report shows every case whose outcome changed direction, with previous and current output side by side. This is the feature that turned Verity from a number people ignored into a report people read.
Evaluations are expensive and largely repeated. Results are cached against a hash of model version, prompt, parameters, and input, so a typical run only executes the cases the change could actually affect.
Flaky gates destroy trust instantly. The first version failed intermittently on non-determinism, and within two weeks engineers were adding a skip label by reflex. We rebuilt around repeated sampling with statistical bounds and fixed seeds where the model allowed it. Trust recovered slowly.
Cost. Running full suites on every push was untenable. Content-hash caching plus running the full suite only on the merge queue — a reduced suite on intermediate pushes — brought it to something the budget tolerated.
Suites go stale. A suite written eight months ago protects yesterday's requirements. We added coverage reporting against production traffic patterns, which surfaces the areas real usage hits that no suite covers.
In nine months of operation, Verity blocked 23 merges that would have shipped a genuine behavioural regression. Six of those were in the abstention logic of the Lumify retrieval system, which is precisely the behaviour that had failed publicly once already.
Full suite runs complete in about 7 minutes for 1,200 cases. 11 suites are now in use across four services.
The cultural change is harder to quantify and probably more valuable: prompt changes now arrive with an evaluation delta in the pull request description, and that has become an ordinary part of review rather than something anyone has to ask for.
I would have solved non-determinism before shipping anything. Launching with a flaky gate cost more trust than the tool's first three months of value earned back, and that is a self-inflicted wound.
I would also have built the per-case diff view first. It was scheduled as a later enhancement, and it turned out to be the reason anyone read the report at all.
Awards and results connected to this project.
Papers that came out of, or fed into, this work.
There is always more detail than a write-up can carry — architecture trade-offs, what the evaluation missed, the decisions that were closer than they look. Ask.
