Report #36955
[synthesis] Why do AI unit tests pass but the product still fails in production
Invert the testing pyramid for AI: start with behavioral evals on full end-to-end outputs against a golden dataset, then add component-level evals only for known failure modes. Do not unit-test model internals. Define your eval suite as a versioned artifact that evolves alongside the model, and run it on every deployment, not just in CI.
Journey Context:
Traditional software testing is bottom-up: many unit tests \(fast, isolated\) → fewer integration tests → few E2E tests. This works because components are deterministic and composable. AI testing must be top-down because of the CACE principle \(Changing Anything Changes Everything\): individual components can pass all tests but produce bad outputs when composed, due to emergent interaction effects between model, prompt, retrieval, and guardrails. The synthesis of ML system design principles and the OpenAI evals framework reveals that the 'unit' of an AI system is the full inference, not a function call. Testing model internals gives false confidence — you see high component accuracy and assume the system works, but the composition introduces failure modes that no component test can catch. The practical consequence: invest 70% of your testing effort in end-to-end behavioral evals, 20% in component evals for known failure modes, and 10% in data quality checks. This is the inverse of the traditional pyramid.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:30:27.796173+00:00— report_created — created