EditBench: Evaluating LLM Abilities to Perform Real-World Instructed Code Edits

Wayne Chi, Valerie Chen, Ryan Shar, Aditya Mittal, Jenny Liang, Wei-Lin Chiang, Anastasios Nikolas Angelopoulos, Ion Stoica, Graham Neubig, Ameet Talwalkar, Chris Donahue

Introduction

Instructed code editing—where Large Language Models (LLMs) directly modify a developer's existing code based on a user instruction—is becoming a dominant interaction mode in AI coding assistants like GitHub Copilot and Cursor. However, existing benchmarks for code generation often rely on artificial sources, templated instructions, or "clean room" environments. They fail to capture the complexity of real software development, where developers rarely ask for a whole function from a clean prompt. Instead, they highlight a messy block of code and provide brief, sometimes cryptic instructions like "fix the flask app" or "optimize this."

To bridge this gap, researchers have introduced EditBench, the first benchmark for LLM code editing built entirely from "in-the-wild" data. EditBench evaluates models on real instructions and code contexts collected directly from developers, providing a much-needed reality check on current LLM capabilities.

Methodology: Ground-Truth Data Collection and Evaluation

The authors took a "ground truth" approach to data collection by developing an open-source VS Code extension. They recruited nearly 500 users who utilized the extension during their daily programming workflows.

The VS Code extension used to collect real-world edit data from developers, capturing instructions, highlighted code, and cursor position.

From over 2,600 raw interactions, the researchers curated a high-quality set of 545 problems across Python and JavaScript. The curation process involved filtering out trivial or overly ambiguous edits and translating core problems into five natural languages to test cross-lingual robustness.

Crucially, a team of experienced programmers spent months writing custom test environments and unit tests for every single problem. This ensures that the evaluation is based on functional correctness rather than mere text matching.

Overview of the EditBench evaluation process, showing how instructions and multi-faceted context (code, highlights, cursor) are fed to an LLM and verified against test cases.

Key Insights and Model Performance

The benchmark reveals several critical insights about how LLMs handle real-world coding tasks:

  • The "Messiness" of Human Instructions: Real-world prompts are significantly shorter and less specified than typical benchmark prompts. Models must infer intent from the surrounding code rather than just following a recipe.
  • Context is a Force Multiplier: Providing the model with the specific lines the user highlighted improved performance by up to 11%. However, adding the exact cursor position yielded mixed results, suggesting models still struggle to utilize fine-grained spatial UI cues effectively.
  • The 60% Wall: The authors evaluated 40 diverse LLMs, and the results serve as a wake-up call. Instructed editing is a formidable challenge, with only three models scoring over 60%. Claude 3.5 Sonnet emerged as the top performer. Most state-of-the-art models clustered between 40% and 55%, with closed-source models generally dominating the top of the leaderboard.
  • Task Sensitivity: Models generally perform better at fixing bugs—where the "correct" state is often implied by an error message—than at adding new features or optimizing code, which involve a much larger design space.

Limitations and Future Work

While EditBench represents a significant step forward, it currently focuses primarily on Python and JavaScript. Furthermore, creating the test harnesses required intensive manual labor by expert programmers. Attempts to use AI agents to generate these tests automatically resulted in a 0% success rate, highlighting a major area for future research in automated evaluation. Finally, to prevent data contamination, the authors have implemented pre-emptive measures to discourage web scraping of the dataset.

EditBench proves that evaluating LLMs on real-world, context-dependent tasks captures a unique dimension of coding ability that traditional benchmarks miss, paving the way for more robust and practical AI coding assistants.

Summary updated

BibTeX
@inproceedings{chi2026editbench,
  author = {Wayne Chi and Valerie Chen and Ryan Shar and Aditya Mittal and Jenny Liang and Wei-Lin Chiang and Anastasios Nikolas Angelopoulos and Ion Stoica and Graham Neubig and Ameet Talwalkar and Chris Donahue},
  title = {{EditBench: Evaluating LLM Abilities to Perform Real-World Instructed Code Edits}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=FtL9eEmU6v},
}
Figure