Forum Diskusi dan Komunitas Online

Full Version: How to Reduce AI-Related Defects Before Production
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[attachment=9373]

They Doubled Their Test Coverage Three Releases in a Row. Defect Rates Barely Moved.
A team kept doing the thing that's supposed to work, adding more test cases every release, expanding coverage, and running more scenarios than the release before. Three releases in a row, and their actual defect rate barely budged. Nobody had stopped to ask where the defects were actually coming from. When someone finally did, the answer was almost embarrassing in how simple it was: the overwhelming majority of real defects traced back to one specific root cause, ambiguous requirements that never defined what correct output actually meant for a specific feature category, and no amount of additional test volume was ever going to fix a problem that lived upstream of testing entirely. They'd been adding water to a bucket with a hole in it.

That's the actual argument for reducing AI-related defects rather than just detecting more of them. Detection and prevention are different disciplines, and most testing programs invest almost entirely in the first while treating the second as an afterthought. Here's how I'd actually think about prevention.

Track Root Cause, Not Just Defect Count
A raw defect count tells you almost nothing about what to actually fix. What matters is categorizing every real defect by where it actually originated—a genuine data quality issue, an ambiguous or missing requirement, a prompt that was never adequately tested, an actual model limitation, an integration bug in the surrounding application code, and tracking which category is actually producing the most real defects over time.

This sounds obvious, and it's the step the team in the opening story had skipped entirely. Without this categorization, prevention effort gets spread evenly across categories by default, which is exactly the wrong allocation when defects are genuinely concentrated in one or two specific sources, the way they almost always are once you actually look.

Cost Compounds the Later a Defect Gets Caught
A defect traced back to an ambiguous requirement is dramatically cheaper to fix at the requirements stage than after it's shipped, tested against, and finally caught in production. This isn't a new insight; traditional software has known this for decades, and it applies with real force to AI-specific defects too. An unclear specification for what a feature should actually do costs far less to fix as a paragraph of clarified requirements than as a production incident requiring a hotfix, a retest cycle, and a real incident response.

The practical implication is that prevention effort aimed upstream, clarifying requirements before code exists, validating data before a model gets built around it, and testing a prompt's actual behavior before it reaches integration pays back at a completely different rate than the equivalent effort spent catching the same defect later. A team optimizing purely for more testing volume downstream is spending effort at the most expensive possible point in the process.

Use a Real Root Cause Technique, Not a Surface-Level Label
When a defect surfaces, the instinct is to log the symptom, wrong answer, inappropriate tone, and missed instruction and move on once it's fixed. Real prevention needs to go further, asking why that specific defect actually happened and why the thing that caused it was allowed to happen, repeating that question until you reach an actual systemic cause rather than stopping at the first plausible-sounding explanation.

A wrong answer traced only to "the model got it wrong" stops at the symptom. Traced further, it might reveal the training or reference data never included this category of example, and traced one step further than that, it might reveal nobody had a defined process for identifying which categories of example needed deliberate representation in the first place. That last layer is the actual thing worth fixing, and it's usually several steps past where most teams stop asking why.

Build a Real Taxonomy and Watch Where Effort Actually Goes
Establish real, distinct defect categories specific to AI, hallucination and groundedness failures, bias and fairness issues, security and adversarial gaps, integration and functional bugs, requirements and specification gaps, and track prevention effort allocation against where defects actually cluster in that taxonomy, not where it feels intuitively important to invest.

This is worth revisiting on a real cadence, because the category producing the most defects can shift over time as a team fixes what used to be the biggest source and something else becomes the new leading cause. A prevention effort that never gets reallocated based on this shifting picture ends up over-invested in yesterday's biggest problem and under-invested in today's.

Measure Whether Prevention Efforts Actually Worked
This is the step that closes the loop and the one most teams skip entirely. After investing specifically in preventing a particular defect category, requirements clarity, data representativeness, and whatever the actual root cause turned out to be, track whether that category's defect rate actually declined afterward, not just whether the intervention felt like a reasonable thing to do.

Without this, prevention becomes an article of faith rather than a measured discipline, and a team can spend real effort on an intervention that never actually moved the number it was supposed to move, continuing to invest in it simply because nobody ever checked whether it worked.

A Visual Breakdown of the Approach
[attachment=9374]

A Practical Checklist
  • Every real defect is categorized by root cause, not just logged as a count, with that categorization reviewed regularly for where defects actually cluster
  • Prevention effort is deliberately weighted toward upstream stages, since the same defect costs less to fix the earlier it's actually caught
  • A real root cause technique is applied to genuine defects, pushing past the first plausible explanation to the actual systemic cause
  • A living defect taxonomy specific to AI risk categories guides where prevention investment goes, revisited on a real schedule as the picture shifts
  • Every prevention intervention is checked afterward for whether the targeted defect rate actually declined, not assumed to have worked because it felt reasonable

What I'd Actually Want a Team to Take From This
More testing was never going to fix a defect that originates upstream of testing entirely, the same way pouring more water into a leaking bucket was never going to fill it. The team that tripled their coverage across three releases wasn't wrong to test thoroughly. They were solving the wrong problem, because nobody had asked where their defects actually came from before deciding how to respond to them.

Building this kind of root-cause discipline into how defects get tracked and prevented, not just detected, is a core part of how PrimeQA Solutions approaches AI Testing Services engagements, because reducing defects and catching more of them turn out to be genuinely different goals, and only one of them actually gets cheaper the longer a team keeps doing it.