mlsanityData to 24 Nov 2026

How Specification Explicitness Shapes Failure in LLM-Generated Code

arXiv 2611.20195 ↗Submitted 15 Nov 2026cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

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 requirements, edge cases, tie-breaking rules, and exception handling cut failures by 47.2% and reduced the number of distinct failure modes by 20.5%. The largest drops were in failure modes tied to implicit obligations. Invariant violations fell by 66.1%, and unsupported assumptions fell by 59.5%. After a requirement change, specifications with explicit behavioral obligations produced regressions in more submissions, but each affected submission lost less previously correct behavior. Explicit specifications also changed how developers judged generated code. Without explicit obligations, participants overestimated generated-code correctness by about 23 percentage points. With explicit obligations, they produced better code but judged it more cautiously. Thus, the lesson is sharper than "better specifications help." Lightweight structure barely helped, while explicit behavioral obligations nearly halved failures, made regressions shallower, and improved calibration.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 49 of its 143 references that are in the map. Submitted 15 Nov 2026.

Builds on

49 of 143 references.

References · 49

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,938
  2. 2021Program Synthesis with Large Language Modelscited by 3,972
  3. 2021Measuring Coding Challenge Competence With APPScited by 938
  4. 2024What Did I Do Wrong? Quantifying LLMs' Sensitivity and Consistency to Prompt Engineeringcited by 93
  5. 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 70
  6. 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 64
  7. 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 57
  8. 2025What Prompts Don't Say: Understanding and Managing Underspecification in LLM Promptscited by 42
  9. 2025A Survey of Vibe Coding with Large Language Modelscited by 30
  10. 2024What Should We Engineer in Prompts? Training Humans in Requirement-Driven LLM Usecited by 26
  11. 2024Specifications: The missing link to making the development of LLM systems an engineering disciplinecited by 18
  12. 2021Test Case Selection and Prioritization Using Machine Learning: A Systematic Literature Reviewcited by 14
37 more
  1. 2023Testing LLMs on Code Generation with Varying Levels of Prompt Specificitycited by 13
  2. 2023Prompt Engineering or Fine-Tuning: An Empirical Assessment of LLMs for Codecited by 12
  3. 2025Towards Formal Verification of LLM-Generated Code from Natural Language Promptscited by 11
  4. 2023Risk ratio, odds ratio, risk difference... Which causal measure is easier to generalize?cited by 10
  5. 2020Documentation of Machine Learning Softwarecited by 9
  6. 2025Are Prompts All You Need? Evaluating Prompt-Based Large Language Models (LLM)s for Software Requirements Classificationcited by 7
  7. 2024Natural Language Processing for Requirements Traceabilitycited by 6
  8. 2025From Requirements to Code: Understanding Developer Practices in LLM-Assisted Software Engineeringcited by 6
  9. 2018Traceability in the Wild: Automatically Augmenting Incomplete Trace Linkscited by 5
  10. 2019Asymmetric Release Planning-Compromising Satisfaction against Dissatisfactioncited by 5
  11. 2021What Makes Agile Software Development Agile?cited by 5
  12. 2023Developers' Perception of GitHub Actions: A Survey Analysiscited by 5
  13. 2020Eye of the Mind: Image Processing for Social Codingcited by 4
  14. 2025Extension Decisions in Open Source Software Ecosystemcited by 4
  15. 2024Examining Ownership Models in Software Teams: A Systematic Literature Review and a Replication Studycited by 3
  16. 2024GitHub Marketplace for Automation and Innovation in Software Productioncited by 3
  17. 2019Mining Treatment-Outcome Constructs from Sequential Software Engineering Datacited by 2
  18. 2019Release Practices for Mobile Apps--What do Users and Developers Think?cited by 2
  19. 2022Example Driven Code Review Explanationcited by 2
  20. 2023User Driven Functionality Deletion for Mobile Appscited by 2
  21. 2023Ownership in the Hands of Accountability at Brightsquid -- A Case Study and a Developer Surveycited by 2
  22. 2024More Insight from Being More Focused: Analysis of Clustered Market Appscited by 2
  23. 2024Analysis of Marketed versus Not-marketed Mobile App Releasescited by 2
  24. 2024Negative Results of Image Processing for Identifying Duplicate Questions on Stack Overflowcited by 2
  25. 2024Recommending and Release Planning of User-Driven Functionality Deletion for Mobile Appscited by 2
  26. 2025Inferring Questions from Programming Screenshotscited by 2
  27. 2025ImageR: Enhancing Bug Report Clarity by Screenshotscited by 2
  28. 2025One Documentation Does Not Fit All: Case Study of TensorFlow Documentationcited by 2
  29. 2025Students' Perception of LLM Use in Requirements Engineering Education: An Empirical Study Across Two Universitiescited by 2
  30. 2016The landscape of software failure cause modelscited by 1
  31. 2017Does Quality of Requirements Specifications matter? Combined Results of Two Empirical Studiescited by 1
  32. 2018Inferencing into the void: problems with implicit populations Comments on `Empirical software engineering experts on the use of students and professionals in experiments'cited by 1
  33. 2022GitHub Marketplace for Practitioners and Researchers to Date: A Systematic Analysis of the Knowledge Mobilization Gap in Open Source Software Automationcited by 1
  34. 2023Image-based Communication on Social Coding Platformscited by 1
  35. 2023Mining Reddit Data to Elicit Students' Requirements During COVID-19 Pandemiccited by 1
  36. 2025The Impact of Foundational Models on Patient-Centric e-Health Systemscited by 1
  37. 2026REprompt: Prompt Generation for Intelligent Software Development Guided by Requirements Engineeringcited by 1

Built on by

Not cited yet.