用合成环境训练通用编程智能体,减少对真实代码库依赖
Training Versatile Coding Agents in Synthetic Environments
- 用大模型自动生成项目和任务,无需依赖真实GitHub数据
- 在三个基准上表现接近现有方法,但所需训练轨迹少得多
- 适合研究通用编程智能体或需大量合成数据的场景
以往训练软件工程智能体的方法依赖GitHub仓库中的问题和测试套件,存在两大局限:一是对现有仓库的依赖限制了灵活性,二是主要聚焦于修复问题,难以覆盖程序员面临的多样化任务。为此,我们提出SWE-Playground,一个从零生成项目与任务轨迹的新流程。该方法利用大语言模型与智能体,完全自主生成代码环境,不依赖外部数据源,从而支持更广泛的编程任务,如通过生成单元测试复现问题、从零实现库函数等。我们在三个不同基准上验证了该方法的有效性,结果表明其生成的轨迹具有密集的训练信号,使智能体在远少于以往工作所需轨迹的情况下达到相当性能。
原文摘要 · Abstract (English)
Prior works on training software engineering agents have explored utilizing existing resources such as issues on GitHub repositories to construct software engineering tasks and corresponding test suites. These approaches face two key limitations: (1) their reliance on pre-existing GitHub repositories offers limited flexibility, and (2) their primary focus on issue resolution tasks restricts their applicability to the much wider variety of tasks a software engineer must handle. To overcome these challenges, we introduce SWE-Playground, a novel pipeline for generating environments and trajectories which supports the training of versatile coding agents. Unlike prior efforts, SWE-Playground synthetically generates projects and tasks from scratch with strong language models and agents, eliminating reliance on external data sources. This allows us to tackle a much wider variety of coding tasks, such as reproducing issues by generating unit tests and implementing libraries from scratch. We demonstrate the effectiveness of this approach on three distinct benchmarks, and results indicate that SWE-Playground produces trajectories with dense training signal, enabling agents to reach comparable performance with significantly fewer trajectories than previous works.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。