Introduction
While Large Language Models (LLMs) have shown remarkable proficiency in solving isolated coding puzzles, their performance in real-world software development environments remains less understood. Traditional benchmarks like HumanEval or MBPP focus on "standalone" functions—self-contained logic that resembles competitive programming rather than professional engineering. DevEval is a new, manually-annotated benchmark designed to bridge this gap by evaluating repository-level code generation.
The DevEval Benchmark
DevEval consists of 1,825 testing samples derived from 115 real-world PyPI repositories across 10 popular domains, such as Database, Internet, and Frameworks. Unlike previous datasets, DevEval reflects the actual distribution of code in the wild: approximately 73% of the samples are "non-standalone," meaning they rely on a complex web of internal dependencies, including classes and functions located in the same or different files.
Each sample in DevEval is meticulously annotated with:
- Signature and Requirement: The target function's definition and natural language description.
- Repository Context: The surrounding codebase to simulate a real IDE environment.
- Reference Dependencies: Explicit labels for intra-class, intra-file, and cross-file dependencies.
- Test Cases: Unit tests to verify functional correctness.
Evaluation Methodology
To capture the nuances of repository-level tasks, the researchers introduced two key metrics:
- Pass@k: Measures functional correctness by checking if the generated code passes the provided unit tests.
- Recall@k: A novel metric that measures how accurately the model identifies and invokes the specific internal dependencies used by human developers in the reference code.
Key Results and Insights
Experiments involving state-of-the-art models like GPT-4, GPT-3.5, and DeepSeek Coder revealed a significant "context gap." LLMs that excel at standalone puzzles often struggle when dropped into a sprawling repository. For instance, GPT-4’s performance drops from an 80% Pass@1 on HumanEval to 53.04% on DevEval.
As illustrated in the results, context is the primary driver of performance. Providing "Local File" context (the code surrounding the target function) improved GPT-4’s performance by over 200% compared to a zero-context setting. However, even with full context, models frequently fail to "see" relevant functions in different files, leading to the hallucination of logic that already exists elsewhere in the project.
Conclusion
DevEval sets a new, more rigorous standard for evaluating AI coding assistants. By moving beyond isolated functions and requiring models to navigate real-world repository dependencies, it highlights the critical need for better context-retrieval mechanisms and improved cross-file understanding in the next generation of LLMs.
Summary updated