How would you evaluate an AI system that classifies or explains flaky test failures?
Answer
Build a labeled set from reviewed historical failures with categories such as product defect, test defect, environment failure and unknown. Measure per-class precision and recall, calibration and abstention, then test on new time periods to expose drift. Require linked evidence such as logs and traces, prevent automatic quarantine on low confidence, and audit whether rare high-impact product failures are being mislabeled as flakes.
Strong answer includes
- uses reviewed labels and time-separated evaluation data
- measures errors per class rather than accuracy alone
- keeps high-impact quarantine decisions controlled
Practical example
An AI triage system labels a test as an environment flake with 90% confidence because it failed intermittently three times before; a human audit later finds it was actually an intermittent race condition in the product's session-handling code, exposed by the very timing variance that made the model call it flaky rather than by any test infrastructure problem.