ChatPaper.aiChatPaper

DevEval: 実世界のコードリポジトリに基づいた手動アノテーションによるコード生成ベンチマーク

DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories

May 30, 2024
著者: Jia Li, Ge Li, Yunfei Zhao, Yongmin Li, Huanyu Liu, Hao Zhu, Lecheng Wang, Kaibo Liu, Zheng Fang, Lanshen Wang, Jiazheng Ding, Xuanming Zhang, Yuqi Zhu, Yihong Dong, Zhi Jin, Binhua Li, Fei Huang, Yongbin Li
cs.AI

要旨

大規模言語モデル(LLMs)のコーディング能力をどのように評価するかは、依然として未解決の問題です。既存のベンチマークは、実世界のコードリポジトリとの整合性が低く、LLMsのコーディング能力を評価するには不十分であることがわかりました。 この知識のギャップを埋めるため、我々はDevEvalという新しいベンチマークを提案します。DevEvalには3つの特徴があります。(1) DevEvalは、コード分布や依存関係分布など、複数の次元で実世界のリポジトリと整合しています。(2) DevEvalは13人の開発者によって注釈が付けられており、要件、元のリポジトリ、参照コード、参照依存関係など、包括的な注釈を含んでいます。(3) DevEvalは、117のリポジトリから1,874のテストサンプルを収集し、インターネットやデータベースなど10の主要なドメインをカバーしています。DevEvalに基づいて、我々はリポジトリレベルのコード生成を提案し、gpt-4、gpt-3.5、StarCoder 2、DeepSeek Coder、CodeLLaMaなど8つの人気LLMsをDevEvalで評価しました。実験の結果、これらのLLMsの実世界のコードリポジトリにおけるコーディング能力が明らかになりました。例えば、我々の実験では、gpt-4-turboの最高Pass@1はわずか53.04%でした。また、LLMsの失敗ケースを分析し、その欠点をまとめました。我々は、DevEvalが実コードリポジトリにおけるLLMsの開発を促進することを期待しています。DevEval、プロンプト、およびLLMsの予測は公開されています。
English
How to evaluate the coding abilities of Large Language Models (LLMs) remains an open question. We find that existing benchmarks are poorly aligned with real-world code repositories and are insufficient to evaluate the coding abilities of LLMs. To address the knowledge gap, we propose a new benchmark named DevEval, which has three advances. (1) DevEval aligns with real-world repositories in multiple dimensions, e.g., code distributions and dependency distributions. (2) DevEval is annotated by 13 developers and contains comprehensive annotations (e.g., requirements, original repositories, reference code, and reference dependencies). (3) DevEval comprises 1,874 testing samples from 117 repositories, covering 10 popular domains (e.g., Internet, Database). Based on DevEval, we propose repository-level code generation and evaluate 8 popular LLMs on DevEval (e.g., gpt-4, gpt-3.5, StarCoder 2, DeepSeek Coder, CodeLLaMa). Our experiments reveal these LLMs' coding abilities in real-world code repositories. For example, in our experiments, the highest Pass@1 of gpt-4-turbo is only 53.04%. We also analyze LLMs' failed cases and summarize their shortcomings. We hope DevEval can facilitate the development of LLMs in real code repositories. DevEval, prompts, and LLMs' predictions have been released.

Summary

AI-Generated Summary

PDF91December 12, 2024