HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agent
Large language models (LLMs) have significantly improved their 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. The most recent trend is using LLM-based agents to iterate the code generation process. Based on the observation that top-level software engineers often ask clarifying questions to reduce ambiguity in both requirements and coding solutions, we argue that the same should be applied to LLMs for code generation tasks. For this purpose, we define the communication skills of LLMs as “being able to ask clarifying questions when the description of the code generation problem has issues.” In this study, we restrict these issues to three matters from the software requirements engineering field: inconsistent requirements, ambiguous requirements, and incomplete requirements. By asking probing questions about the requirements of problem descriptions before generating the final code, the challenges of programming with LLMs, such as unclear intent specification, may be alleviated, resulting in correct code in the initial iterations. In this work, we conducted an empirical study on the benchmark and analysis of the communication skills of LLMs for code generation. We created a new benchmark, HumanEvalComm, by modifying problem descriptions according to the three issues mentioned above: Inconsistency, Ambiguity, and Incompleteness. We then experimented on HumanEvalComm with different Code LLMs, and a new LLM agent approach, Code Clarification and Generation Agent (Okanagan), to identify and ask questions in ambiguous parts of code and descriptions for further refining the generated code. In the evaluation, we introduced an LLM-based evaluator and created Communication Rate and Good Question Rate as the evaluation metrics to represent the ratio of questions asked and questions with good quality in responses. We found that more than 60% of responses from Code LLMs still generate code rather than ask questions when the problem descriptions are manually modified according to different clarification categories. The Pass@1 and Test Pass Rate of most Code LLMs drop by 35%–52% and by 17%–35%, respectively, with statistical significance in each category for over 75% of the numbers. Okanagan, as an LLM agent approach that uses an LLM such as ChatGPT 3.5, effectively increases Communication Rate and Good Question Rate by an absolute 58% and 38%, respectively. Thus, Okanagan boosts Pass@1 and Test Pass Rate by an absolute 8% and 7%, respectively, when the problem descriptions are modified based on given clarification categories. This result indicates the potential for achieving more effective communication capability using an LLM agent. Our benchmark and full code are publicly available at https://github.com/jie-jw-wu/human-eval-comm.
Thu 9 JulDisplayed time zone: Eastern Time (US & Canada) change
10:30 - 12:30 | Code Generation 2Research Papers / Journal-First Paper at MB 3.210 Chair(s): Chris Brown Virginia Tech | ||
10:30 20mTalk | The Impact of Prompt Programming on Function-Level Code Generation Journal-First Paper Ranim Khojah Chalmers University of Technology and University of Gothenburg, Francisco Gomes de Oliveira Neto Chalmers | University of Gothenburg, Mazen Mohamad Chalmers | RISE - Research Institutes of Sweden, Philipp Leitner Chalmers | University of Gothenburg Link to publication DOI | ||
10:50 20mTalk | GraphQLify: Automated and Type Safety-Preserving GraphQL API Adoption Research Papers Saleh Amareen Wayne State University, Arif Rahman Wayne State University, Sazzadur Rahaman University of Arizona, Tucson, Arizona, USA, Amiangshu Bosu Wayne State University Pre-print | ||
11:10 20mTalk | Influence-Aware Bayesian-Inspired Token Reweighting for Improved Code Generation Research Papers YUQI ZHU Academy of Military Sciences, Ge Li Peking University, Hong Mei Peking University, Zhi Jin Peking University, Wuhan University, Jia Li Wuhan University, Qibin Zheng Advanced Institute of Big Data, Beijing, Jieyuan Zhang Academy of Military Sciences | ||
11:30 20mTalk | HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agent Journal-First Paper Jie JW Wu Michigan Technological University, USA, Fatemeh Hendijani Fard University of British Columbia, Okanagan | ||
11:50 20mAwards | PlayCoder: Making LLM-Generated GUI Code Playable Research Papers Zhiyuan Peng Shanghai Jiao Tong University, Wei Tao LightSpeed, Xin Yin Zhejiang University, Chenhao Ying Shanghai Jiao Tong University, Yuan Luo Shanghai Jiao Tong University, Yiwen Guo Unaffiliated Pre-print File Attached | ||