HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agent

📅 2024-05-31
📈 Citations: 3
Influential: 0
📄 PDF

career value

192K/year
🤖 AI Summary
This work addresses the lack of proactive clarification capability in large language models (LLMs) when generating code from ambiguous, contradictory, or incomplete requirements. To this end, we introduce HumanEvalComm—the first benchmark explicitly designed to evaluate communication competence in code generation. We formally define and quantify “communication ability” in this context, proposing novel metrics including Communication Rate and Good Question Rate. We further design Okanagan, an interactive clarification agent that integrates defect injection (to simulate inconsistency, ambiguity, and incompleteness), multi-step reasoning, and human-in-the-loop evaluation. Experiments reveal that state-of-the-art Code LLMs exhibit consistently weak communication performance. Okanagan substantially improves question quality (Good Question Rate +42.3%) and final code correctness (HumanEval Pass@1 +18.7%), demonstrating that communication enhancement is critical for engineering-grade code generation.

Technology Category

Application Category

📝 Abstract
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. 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. In this work, we conducted an empirical study on the benchmark and analysis of the communication skills of LLMs for code generation. We define communication skills of LLMs as ``being able to ask clarifying questions when the description of the code generation problem has issues''. We created a new benchmark, HumanEvalComm, by modifying problem descriptions according to three issues: inconsistency, ambiguity, incompleteness. We defined new evaluation metrics such as Communication Rate and Good Question Rate, and then experimented on HumanEvalComm with different Code LLMs, and a new LLM agent approach, Okanagan, to identify and ask questions in ambiguous parts from code and descriptions for further refining the generated code. Finally, we discussed evaluation results by comparing Code LLMs and Okanagan with our findings.
Problem

Research questions and friction points this paper is trying to address.

Large Language Models
Code Generation
Communication Ability
Innovation

Methods, ideas, or system contributions that make the work stand out.

HumanEvalComm
Okanagan
Code Generation Evaluation
🔎 Similar Papers
No similar papers found.