Report #54193
[counterintuitive] If AI generates correct code for a task once, it will handle that task reliably
Never trust a single AI output. For critical code, use best-of-k sampling \(generate multiple solutions, test each, select the passing one\). Implement deterministic verification \(tests, type checks, linters\) as mandatory gates. Track pass@k metrics, not pass@1.
Journey Context:
The widespread belief is that AI coding ability is a stable property: if it handles a task correctly once, it knows how to handle it. This is a fundamental misunderstanding of LLMs as stochastic next-token predictors, not deterministic knowledge stores. The same prompt can yield correct code on one run and subtly broken code on another, depending on sampling parameters, random seed, and context. The Codex paper introduced the pass@k metric precisely because single-attempt success rate \(pass@1\) is misleading: a model that passes 30% of the time on first attempt might pass 80% of the time within 10 attempts. This means past success doesn't predict future reliability, the gap between can do and reliably does is much larger than people assume, and verification infrastructure is more important than generation quality. The practical implication: invest in verification pipelines, not in trying to get the perfect prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:27:39.474499+00:00— report_created — created