Failure-Aware Enhancements for Large Language Model (LLM) Code Generation: An Empirical Study on Decision Framework

Read full text
Authors: Jianru Shen, Zedong Peng, Owen, Lucy
Cited by: 0

Abstract

Large language models (LLMs) show promise for automating software development by translating requirements into code. However, even advanced prompting workflows like progressive prompting often leave some requirements unmet. Although methods such as self-critique, multi-model collaboration, and retrieval-augmented generation (RAG) have been proposed to address these gaps, developers lack clear guidance on when to use each. In an empirical study of 25 GitHub projects, we found that progressive prompting achieves 96.9% average task completion, significantly outperforming direct prompting (80.5%, Cohen's d=1.63, p

Fields of Study & Subjects

Software Engineering Research Software Engineering Techniques and Practices Topic Modeling

Publication details

Journal / source
arXiv (Cornell University)
Publication date
2 February 2026
Document type
Preprint