HackerPapers

arXiv:2308.13507cs.SE

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

Jie JW Wu

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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 process that uses an LLM-generated communicator to identify issues with high ambiguity or low confidence in problem descriptions and generated code. I then ask clarifying questions to obtain responses from users for refining the code.

arXiv comments
6 pages, 2 figures, 1 table. Accepted and presented at the 7th Annual Symposium on Machine Programming (MAPS 2023 Workshop, see https://mapsworkshop.github.io/). Reference: "Wu, Jie JW. Large Language Models Should Ask Clarifying Questions to Increase Confidence in Generated Code. The 7th Annual Symposium on Machine Programming (MAPS 23), December 3, 2023, San Francisco, CA, USA"
Journal reference
DOI
Subjects
cs.SESoftware Engineering cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Apr 2024 to Apr 2024.

Comments linking this paper, per year.

Discussed in comments1 thread

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.