arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.00215cs.SE
收藏

HumanEvalComm:针对 LLM 和 LLM Agent 的代码生成沟通能力基准测试

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

Jie JW Wu, Fatemeh H Fard

AI总结:

本文提出代码生成沟通能力基准 HumanEvalComm,通过修改问题描述引入不一致、歧义和不完整问题,并定义新评估指标,比较了多种 Code LLMs 与新 LLM agent 方法 Okanagan 的提问与优化代码能力。

摘要:

大型语言模型(LLMs)在代码生成领域执行任务的能力已有显著提升。然而,LLMs 要从具备能力的编码者进阶为顶尖软件工程师之间仍存在差距。基于顶尖软件工程师常通过提出澄清问题来减少需求和编码方案中歧义的观察,我们认为代码生成任务中的 LLMs 也应采取相同做法。在这项工作中,我们对代码生成中 LLMs 的沟通技能进行了基准测试与分析的实证研究。我们将 LLMs 的沟通技能定义为“当代码生成问题的描述存在问题时,能够提出澄清问题”。我们通过根据不一致、歧义和不完整这三个问题修改问题描述,创建了一个新基准 HumanEvalComm。我们定义了沟通率和好问题率等新评估指标,随后在 HumanEvalComm 上使用不同的 Code LLMs 以及一种新的 LLM agent 方法 Okanagan 进行了实验,该方法用于从代码和描述中识别歧义部分并提出问题,以进一步优化生成的代码。最后,我们通过比较 Code LLMs 和 Okanagan 讨论了评估结果并分享了发现。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑