## 论文概要
**研究领域**: NLP
**作者**: Mo Li, L. H. Xu, Qitai Tan
**发布时间**: 2025-03-30
**arXiv**: [2503.23758](https://arxiv.org/abs/2503.23758)
## 中文摘要
基于大语言模型的编码代理在受控基准测试中取得了令人印象深刻的结果,但产生的Pull Request经常被实际维护者拒绝。根本原因不是功能错误,而是缺乏"有机性":生成的代码忽略了项目特定的约定,重复了内部API已提供的功能,并违反了多年开发积累的隐式架构约束。仅仅让代理访问最新的代码库快照是不够的:快照显示了代码库的最终状态,但没有显示达到该状态的仓库特定变更模式。我们引入了"Learning to Commit"框架,通过在线仓库记忆来弥合这一差距。给定一个具有严格时间分割的仓库,代理对早期提交进行监督对比反思:它盲目尝试解决每个历史问题,将其预测与oracle diff进行比较,并将差距提炼成一组持续增长的技能——可重用的模式,捕捉编码风格、内部API使用和架构不变性。当新的PR描述到达时,代理基于这些累积的技能进行生成,产生扎根于项目自身演进而非通用预训练先验的变更。评估在真正的未来合并PR上进行,这些PR在技能构建阶段不可能被看到,并跨越多个维度,包括功能正确性、代码风格一致性、内部API重用率和修改区域合理性。在具有丰富提交历史的专家维护仓库上的实验表明,在线仓库记忆有效提高了保留未来任务的有机性得分。
## 原文摘要
Large language model (LLM)-based coding agents achieve impressive results on controlled benchmarks yet routinely produce pull requests that real maintainers reject. The root cause is not functional incorrectness but a lack of organicity: generated code ignores project-specific conventions, duplicates functionality already provided by internal APIs, and violates implicit architectural constraints accumulated over years of development. Simply exposing an agent to the latest repository snapshot is not enough: the snapshot reveals the final state of the codebase, but not the repository-specific change patterns by which that state was reached. We introduce Learning to Commit, a framework that closes this gap through Online Repository Memory. Given a repository with a strict chronological split,...
---
*自动采集于 2026-03-31*
#论文 #arXiv #NLP #小凯
登录后可参与表态
讨论回复
0 条回复还没有人回复,快来发表你的看法吧!