新基准EvoCodeBench动态更新,专评代码模型在10个领域的实际表现。
EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluations
- 动态更新数据避免泄露,首版含275个真实仓库样本。
- 按10大编程领域标注,首次量化模型在各领域的优劣表现。
- 揭示GPT-4等模型在互联网领域表现不佳,小模型反超大模型。
如何评估大语言模型在代码生成中的表现仍是开放问题。现有基准存在数据泄露和缺乏领域特定评估两大缺陷。为此,我们提出EvoCodeBench,具备三大优势:(1) 动态更新数据,每6个月更新一次以避免数据泄露;本文发布首版EvoCodeBench-2403,包含275个来自25个开源仓库的样本。(2) 构建涵盖10个主流编程领域的分类体系,并为每个样本标注领域标签。(3) 引入领域特定评估指标,除Pass@k外,新增领域改进度(DSI),定义模型的舒适与陌生领域。评估8个主流模型(如gpt-4、DeepSeek Coder)发现:gpt-4在该基准上最高Pass@1仅为20.74%;其虽在多数领域表现优异,但在互联网领域落后于其他模型;StarCoder 2-15B在数据库领域表现突出,甚至超越33B模型。该基准已公开。
原文摘要 · Abstract (English)
How to evaluate Large Language Models (LLMs) in code generation remains an open question. Existing benchmarks have two limitations - data leakage and lack of domain-specific evaluation. The former hurts the fairness of benchmarks, and the latter hinders practitioners from selecting superior LLMs for specific programming domains. To address these two limitations, we propose a new benchmark - EvoCodeBench, which has the following advances: (1) Evolving data. EvoCodeBench will be dynamically updated every period (e.g., 6 months) to avoid data leakage. This paper releases the first version - EvoCodeBench-2403, containing 275 samples from 25 repositories. (2) A domain taxonomy and domain labels. Based on the statistics of open-source communities, we design a programming domain taxonomy consisting of 10 popular domains. Based on the taxonomy, we annotate each sample in EvoCodeBench with a domain label. (3) Domain-specific evaluations. Besides the Pass@k, we compute the Domain-Specific Improvement (DSI) and define LLMs' comfort and strange domains. These evaluations help practitioners select superior LLMs in specific domains and discover the shortcomings of existing LLMs. We evaluate 8 popular LLMs (e.g., gpt-4, DeepSeek Coder) on EvoCodeBench and summarize some insights. EvoCodeBench reveals the actual abilities of these LLMs in real-world repositories. For example, the highest Pass@1 of gpt-4 on EvoCodeBench-2403 is only 20.74%. Besides, we evaluate LLMs in different domains and discover their comfort and strange domains. For example, gpt-4 performs best in most domains but falls behind others in the Internet domain. StarCoder 2-15B unexpectedly performs well in the Database domain and even outperforms 33B LLMs. EvoCodeBench has been released.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。