Report #102296
[counterintuitive] An LLM's confidence score reliably predicts whether generated code is correct
Never accept or reject code based on model confidence alone. Use execution, tests, and retrieved documentation; if confidence gating is required, calibrate on your own labeled data and re-calibrate per task and model version.
Journey Context:
Spiess et al. studied calibration for code completion, function synthesis, and program repair across several models and found Expected Calibration Error ranging from 0.09 to 0.73. Intrinsic confidence measures were poorly aligned with correctness, and reflective self-assessment was inconsistent. The paper shows that a well-calibrated confidence signal would be valuable for graduated quality control, but out-of-the-box LLM confidence is not that signal. Verbalized certainty is especially dangerous because it mimics expert calibration while lacking the underlying epistemics.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T05:18:19.972952+00:00— report_created — created