arXiv:2509.21891cs.SEcs.CL2025-09被引 6

用人类与代码代理共写的180万条代码变更,训练更精准的编程模型。

AgentPack: A Dataset of Code Changes, Co-Authored by Agents and Humans

  • 收集人类与AI代理共同编辑的代码变更数据
  • 模型在该数据上训练后性能超越纯人工数据集
  • 适合研究代码生成、智能编程助手的开发者

微调大语言模型用于代码编辑通常依赖挖掘提交记录和拉取请求。以往数据常含噪声:提交信息简略,人类提交混杂多个无关修改,许多来自简单规则机器人。随着软件工程代理的普及,人机共写的代码变更往往伴随更清晰的自然语言意图描述和理由说明。当这些变更进入公开仓库时,也经由维护者筛选,淘汰低质量内容。本文提出AgentPack,一个涵盖180万条由Claude Code、OpenAI Codex和Cursor Agent与人类共写、截至2025年10月初的公共GitHub项目代码变更语料库。我们描述了识别与清洗流程,量化了代理采用趋势,并分析了变更的结构特征。结果表明,基于AgentPack微调的模型优于使用传统人工提交数据训练的模型,证明利用公开的软件工程代理数据可有效提升未来代码编辑模型的性能。

原文摘要 · Abstract (English)

Fine-tuning large language models for code editing has typically relied on mining commits and pull requests. The working hypothesis has been that commit messages describe human intent in natural language, and patches to code describe the changes that implement that intent. However, much of the previously collected data is noisy: commit messages are terse, human-written commits commingle several unrelated edits, and many commits come from simple, rule-based bots. The recent adoption of software engineering agents changes this landscape. Code changes \emph{co-authored} by humans and agents are often accompanied by substantially more explicit natural-language descriptions of intent and rationale. Moreover, when these changes land in public repositories, they are implicitly filtered by humans: maintainers discard low-quality commits to their projects. We present AgentPack, a corpus of 1.8M code edits co-authored by Claude Code, OpenAI Codex, and Cursor Agent across public GitHub projects up to early October 2025. We describe the identification and curation pipeline, quantify adoption trends of these agents, and analyze the structural properties of the edits. Finally, we show that models fine-tuned on AgentPack can outperform models trained on prior human-only commit corpora, highlighting the potential of using public data from software engineering agents to train future code-editing models.

代码生成人机协作数据集AI编程

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