Report #94955
[counterintuitive] does AI confidence indicate code correctness
Treat all AI-generated code as unverified regardless of the model's expressed confidence. Verify through compilation, type checking, automated tests, and human review. Never use the model's self-assessment as a quality signal.
Journey Context:
Human experts have imperfect but meaningful calibration: when a senior engineer says 'I'm 95% sure this is right,' they're typically correct roughly 85-90% of the time. LLMs show no such calibration. Kadavath et al. \(2022\) found that while LLMs can be trained to express uncertainty, their raw confidence is poorly correlated with correctness on code tasks. A model will express equal confidence in a correct solution and a subtly broken one. This is because the model's 'confidence' reflects pattern-matching strength against training data, not internal verification. The model has no mechanism to execute or verify its output. This creates a dangerous overtrust dynamic: developers see confident output and reduce their own verification effort, exactly when they should maintain or increase it. The alternative of distrusting all AI output is wasteful; the right call is to decouple trust from confidence and always verify independently.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:57:47.664095+00:00— report_created — created