TL;DR
While large language models (LLMs) excel at isolated coding puzzles and fixing bugs, adding entirely new features to a complex, multi-file codebase remains a massive challenge. To evaluate this capability, researchers introduced FEA-Bench, a benchmark focused on repository-level incremental code development. The results are a wake-up call: even the most advanced models, like DeepSeek-R1, max out at a success rate of around 10%.
What Problem Does This Paper Address?
Most existing code generation benchmarks fall into two categories: evaluating standalone functions (like HumanEval) or evaluating bug-fixing capabilities within a repository (like SWE-bench). However, real-world software engineering is largely driven by the continuous implementation of new features.
Unlike fixing a bug, which usually involves localized edits to existing code, launching a new feature requires an LLM to simultaneously write entirely new components (classes and functions) and make complementary edits across multiple interconnected files in the codebase. FEA-Bench bridges this gap by providing a dedicated framework to evaluate repository-level incremental development.
Methods
The authors built an automated pipeline to collect and filter real-world pull requests (PRs) from GitHub to construct task instances. The pipeline consists of several stages:
- Component Extraction & Filtering: The pipeline parses the code changes to ensure the PR introduces at least one new function or class, and that these new components make up more than 25% of the total modified lines.
- Intent-Based Filtering: To ensure the PRs are actually feature additions rather than refactoring or bug fixes, the authors used GPT-4o to analyze the PR descriptions and retain only those classified as "new features."
- Execution-Based Verification: Each task instance is paired with its corresponding unit tests. To be included, the unit tests must fail (or throw errors due to missing components) before the feature is added, and completely pass after the ground-truth "gold patch" is applied.
During evaluation, LLMs are given the feature request and the signatures/documentation of the new components as known information, and they must generate the code edits to implement the feature.
Datasets
The paper introduces two datasets derived from highly rated Python packages on PyPI:
- FEA-Bench (Full): Contains 1,401 task instances sourced from 83 diverse GitHub repositories.
- FEA-Bench lite: A curated subset of 200 high-quality, lower-difficulty task instances from 48 repositories, designed for cost-effective and faster evaluation.
As shown in the dataset statistics, FEA-Bench tasks are significantly more complex than SWE-bench, averaging 128.5 edited lines per task compared to SWE-bench's 37.71 lines.
Key Insights and Ideas
- The Output Format Bottleneck: How an LLM structures its response drastically changes its success rate. Models asked to output changes in a "Natural" format (before-and-after code snippets) performed significantly better than those asked to directly generate standard "Patch" files. Raw patch generation imposes strict formatting and line-number requirements that current LLMs struggle to follow accurately.
- The Long-Context Trap: Counterintuitively, providing more repository context isn't always better. When the authors increased the BM25 retrieval limit from 27K tokens to 40K tokens, model performance actually decreased. This indicates that LLMs still struggle to extract relevant information when buried in overly long contexts.
- Complexity Scales Poorly: The success rate of even the best models drops sharply as the number of required new functions increases. For instance, DeepSeek-R1's resolved ratio drops from 18.96% for a single new function down to just 5.47% when three or more functions are required.
Key Results
The authors evaluated a wide range of code-specialized and general-purpose LLMs. The overall performance was remarkably low across the board, highlighting the difficulty of the benchmark.
- Top Performers: Reasoning models with long chain-of-thought capabilities led the pack. DeepSeek-R1 achieved the highest resolution rate on the full benchmark at 9.92% (Oracle setting) and 10.49% (BM25 retrieval setting). DeepSeek-V3 followed closely behind.
- OpenAI Models: OpenAI's o1 achieved a 7.28% resolution rate, outperforming GPT-4o (6.14%).
- Performance by Category: Performance varied wildly depending on the repository type. Tasks within the "Testing" category (e.g., from the
joke2k/fakerrepo) saw the highest resolution rates, while fields like Database and Build Tools proved much harder.
Limitations and Future Work
The authors note several limitations in their current work:
- Language Constraint: The benchmark is currently limited to Python repositories because of Python's straightforward execution and unified testing frameworks (
pytest). - Data Scarcity: High-quality PRs for feature development are difficult to harvest automatically. Many early-stage features in open-source projects are committed directly without going through a rigorous PR review process, leading to lower data quality that had to be filtered out.
- Evaluation Cost: Due to the long context windows required, evaluating models on FEA-Bench is computationally expensive, limiting the experiments to single-round generation (Pass@1).
Future work includes collaborating with professional software engineers to build a human-verified subset and exploring multi-round agent frameworks to improve feature implementation success rates.
Summary updated