Prépublication · 2026
How Specification Explicitness Shapes Failure in LLM-Generated Code
Elmira Onagh, Maleknaz Nayebi — Monde
Source : arXiv
Résumé
When LLMs turn requirements into code, every underspecified constraint becomes behavior that the model must decide during generation. We test when specifications move beyond structure and begin to control generated behavior. In a controlled experiment, 72 participants implemented and revised Python tasks with an LLM under three levels of specification explicitness. The results show a clear break between lightweight structure and explicit behavioral obligations. Lightweight structure reduced hidden-test failures by only 8.7%. Requiring participants to specify constraints, invariants, negative r…