CodeApex:面向大语言模型的双语编程评估基准
CodeApex: A Bilingual Programming Evaluation Benchmark for Large Language Models
AI总结:
本研究提出双语编程评估基准CodeApex,覆盖编程理解、代码生成、纠错三类任务,评估12款主流大语言模型后发现GPT-4表现最优但仍不及人类,可为LLM编程能力评测提供参考。
摘要:
随着大语言模型(LLMs)的兴起,模型的编程能力得到显著提升,吸引了研究人员越来越多的关注。评估LLMs的编程能力至关重要,因为这能反映LLMs的多方面能力,且具备众多下游应用场景。本文提出CodeApex,这是一个聚焦于LLMs编程理解、代码生成与代码纠错能力的双语基准数据集。编程理解任务通过涵盖概念理解、常识推理与多跳推理的选择题测试LLMs。代码生成任务要求LLMs根据给定的描述与函数原型补全C++函数,以此评估其能力。代码纠错任务要求LLMs修复带有不同错误提示的真实场景错误代码片段。我们评估了12种广泛使用的LLMs,涵盖通用模型与专用模型。GPT-4展现出最优的编程能力,在三项任务上分别取得约69%、54%和66%的准确率。与人类表现相比,LLM的编程能力仍有很大提升空间。我们希望CodeApex能够作为评估LLMs编程能力的参考,进一步推动其发展与进步。
英文摘要:
With the emergence of Large Language Models (LLMs), there has been a significant improvement in the programming capabilities of models, attracting growing attention from researchers. Evaluating the programming capabilities of LLMs is crucial as it reflects the multifaceted abilities of LLMs, and it has numerous downstream applications. In this paper, we propose CodeApex, a bilingual benchmark dataset focusing on the programming comprehension, code generation, and code correction abilities of LLMs. Programming comprehension task tests LLMs on multiple-choice exam questions covering conceptual understanding, commonsense reasoning, and multi-hop reasoning. The code generation task evaluates LLMs through completing C++ functions based on provided descriptions and prototypes. The code correction task asks LLMs to fix real-world erroneous code segments with different error messages. We evaluate 12 widely used LLMs, including both general-purpose and specialized models. GPT-4 exhibits the best programming capabilities, achieving approximate accuracy of 69%, 54%, and 66% on the three tasks, respectively. Compared to human performance, there is still significant room for improvement in LLM programming. We hope that CodeApex can serve as a reference for evaluating the coding capabilities of LLMs, further promoting their development and growth.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。