arXiv:2509.22237cs.CLcs.AI2025-09被引 6

构建更贴近真实开发的代码功能生成评估基准

FeatBench: Towards More Realistic Evaluation of Feature-level Code Generation

  • 仅用自然语言需求作为输入,无代码提示,模拟真实开发流程
  • 通过自动化更新机制构建动态数据集,解决数据泄露问题
  • 揭示智能体存在过度实现导致功能破坏的普遍行为

在仓库级功能实现上评估大语言模型是软件工程的重要前沿。然而,建立能真实反映开发场景的基准仍面临挑战。现有特征级基准普遍存在两大缺陷:任务输入包含代码提示,且静态数据易引发数据泄露。为此,我们提出新基准FeatBench,实现三方面改进:(1) 真实任务输入:仅使用自然语言需求,不含函数签名等代码提示,要求智能体自主从用户意图映射到具体代码变更;(2) 动态数据:通过全自动流水线从最新仓库持续构建新版本,有效避免数据污染;初始版本包含来自27个活跃仓库的157个任务。我们在FeatBench上评估了两个先进智能体框架与四个主流LLM,结果显示最高解决率仅为29.94%。分析发现,智能体普遍存在激进实现行为,导致范围蔓延和广泛回归,即偏离用户明确意图而破坏原有功能。我们已公开FeatBench、自动化流水线及全部实验结果,以推动社区研究。

原文摘要 · Abstract (English)

Evaluating Large Language Models (LLMs) on repository-level feature implementation is a critical frontier in software engineering. However, establishing a benchmark that faithfully mirrors realistic development scenarios remains a significant challenge. Existing feature-level benchmarks generally suffer from two primary limitations: unrealistic task inputs enriched with code hints and significant data leakage risks due to their static nature. To address these limitations, we propose a new benchmark - FeatBench, which introduces the following advances: (1) Realistic Task Inputs. Task inputs consist solely of natural language requirements, strictly devoid of code hints (e.g., function signatures). This format mirrors realistic software development by requiring agents to independently bridge the gap between abstract user intent and concrete code changes. (2) Evolving Data. FeatBench employs a fully automated pipeline to construct new benchmark versions from the latest repositories, effectively mitigating data contamination. The initial release comprises 157 tasks sourced from 27 actively maintained repositories. We evaluate two state-of-the-art agent frameworks with four leading LLMs on FeatBench. The results reveal that FeatBench poses a significant challenge, with the highest resolved rate reaching only 29.94%. Crucially, our analysis uncovers a prevalent behavioral pattern of aggressive implementation, which leads to "scope creep" and widespread regressions where agents break existing features by diverging from the user's explicit intent. We release FeatBench, our automated pipeline, and all experimental results to facilitate further community research.

代码生成评估基准LLM应用软件工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。