Large Language Models Should Ask Clarifying Questions to Increase Confidence in Generated Code
Jie JW Wu

TL;DR
This paper advocates for large language models to ask clarifying questions during code generation to reduce ambiguity, improve code quality, and increase confidence in the output, inspired by human software engineering practices.
Contribution
It introduces a communication-centered process where LLMs identify ambiguities and ask clarifying questions, enhancing code generation reliability.
Findings
Clarifying questions improve code accuracy and confidence.
The proposed method reduces ambiguity in problem descriptions.
Enhanced communication leads to higher quality generated code.
Abstract
Large language models (LLMs) have significantly improved the ability to perform tasks in the field of code generation. However, there is still a gap between LLMs being capable coders and being top-tier software engineers. Based on the observation that toplevel software engineers often ask clarifying questions to reduce ambiguity in both requirements and coding solutions, I argue that the same should be applied to LLMs for code generation tasks. By asking probing questions in various topics before generating the final code, the challenges of programming with LLMs, such as unclear intent specification, lack of computational thinking, and undesired code quality, may be alleviated. This, in turn, increases confidence in the generated code. In this work, I explore how to leverage better communication skills to achieve greater confidence in generated code. I propose a communication-centered…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Software Engineering Techniques and Practices
