EDIT-Bench
收藏资源简介:
EDIT-Bench是一个用于评估大型语言模型(LLM)代码编辑能力的基准数据集。它由来自真实世界的用户指令和代码上下文组成,包括5种自然语言和2种编程语言。数据集包含545个问题,涉及多种现实世界的用例,从解决错误到添加功能。EDIT-Bench的独特之处在于它引入了上下文相关的问题,要求模型理解代码上下文、突出显示的代码和光标位置,而不仅仅是用户指令。该数据集旨在解决现有代码生成基准无法捕捉真实世界编辑行为的问题。
EDIT-Bench is a benchmark dataset for evaluating the code editing capabilities of Large Language Models (LLMs). It consists of real-world user instructions and code contexts, covering 5 natural languages and 2 programming languages. The dataset contains 545 questions spanning a variety of real-world use cases, ranging from bug fixing to feature addition. What distinguishes EDIT-Bench is its introduction of context-dependent questions, which require models to comprehend the code context, highlighted code snippets, and cursor position, rather than merely relying on user instructions. This dataset is designed to address the limitation that existing code generation benchmarks fail to capture real-world code editing behaviors.
EditBench 数据集概述
数据集基本信息
- 数据集名称: EditBench
- 数据来源: 基于 Copilot Arena 的真实代码编辑构建
- 存储位置: https://huggingface.co/datasets/copilot-arena/EditBench
- 许可证: Apache 2.0 License
数据集用途
- 提供生成代码片段的方法
- 在隔离的 Docker 容器中评估代码编辑
实验运行方法
快速开始
-
运行预生成代码编辑测试: bash bash run_experiment.sh examples/run_gpt_o3_mini_tests.py
-
生成并测试代码解决方案: bash bash run_experiment.sh examples/run_gpt_4o_mini_experiment.py --should_generate
主要功能
- 生成文件: 使用
generate_files函数为指定模型生成代码文件 - 测试编辑: 使用
test_edits函数运行模型生成的测试
技术特性
- 在 Docker 容器中执行实验
- 支持多线程生成解决方案
- 提供结果展示脚本
display_results_csv.py
开发信息
- 编程语言: Python 3.8+
- 贡献方式: 通过 GitHub Pull Request 提交贡献
- 联系方式: 通过 GitHub Issues 或直接联系维护者

- 1EDIT-Bench: Evaluating LLM Abilities to Perform Real-World Instructed Code EditsCarnegie Mellon University, UC Berkeley, LMArena · 2025年



