Report #26552
[synthesis] Non-deterministic AI outputs break regression testing — same input, different output, tests flake or pass incorrectly
Replace deterministic assertion tests with evaluation benchmarks that measure statistical properties over many runs. Use eval suites with rubric-based grading \(exact match, fuzzy match, LLM-as-judge\). Track pass@k metrics over evaluation sets rather than asserting exact outputs. For CI, run against a fixed model version with temperature=0 and accept that this catches regressions in prompting/logic but not in model quality.
Journey Context:
Traditional testing assumes: same input → same output → assert equals. AI breaks this fundamentally. Teams try three common wrong approaches: \(1\) Set temperature=0 and seed for determinism — this reduces variance but doesn't test the system as users experience it, and still isn't fully deterministic for many models; \(2\) Snapshot testing on exact outputs — becomes a maintenance nightmare as models update and every snapshot needs rebasing; \(3\) Giving up on automated testing entirely — obviously dangerous. The right approach is a paradigm shift: test statistical properties, not exact outputs. Define what 'correct' means categorically \(does the output contain the right entity? is the tone appropriate? does it follow the format?\), test over distributions, and track metrics over time. This is eval-based testing, not unit testing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:58:07.754353+00:00— report_created — created