arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.17829cs.SEcs.AIcs.CL
收藏

CodeScout: 一种有效的强化学习代码搜索代理训练方法

CodeScout: An Effective Recipe for Reinforcement Learning of Code Search Agents

Lintang Sutawika, Aditya Bharat Soni, Bharath Sriraam R R, Apurva Gandhi, Taha Yassine, Sanidhya Vijayvargiya, Yuchen Li, Xuhui Zhou, Yilin Zhang, Leander Melro… 展开作者

Lintang Sutawika, Aditya Bharat Soni, Bharath Sriraam R R, Apurva Gandhi, Taha Yassine, Sanidhya Vijayvargiya, Yuchen Li, Xuhui Zhou, Yilin Zhang, Leander Melroy Maben, Graham Neubig

AI总结:

本文提出CodeScout,通过强化学习方法训练仅使用标准Unix终端的代码搜索代理,实验证明其在多个基准测试中优于大型语言模型。

摘要:

代码搜索代理在大型仓库中执行任务的前提是代码定位,即识别相关文件、类和函数。尽管已有基于嵌入的检索方法用于仓库级代码定位,但近期研究更关注开发能够定位相关代码的代理,作为独立前导或与实际工作交替进行。大多数现有代码搜索代理配备了复杂的专用工具,如从静态分析导出的仓库图。本文证明,通过有效的强化学习配方,仅使用标准Unix终端的代码代理即可训练出表现优异的结果。在三个基准测试(SWE-Bench Verified、Pro和Lite)上,我们的模型在2-18倍更大的基础和微调LLM上表现更优或具有竞争力,有时甚至接近闭源模型如Claude Sonnet的性能。本文特别关注重新利用现有代码代理环境进行代码搜索、奖励设计和RL优化的技术。我们发布了由此产生的模型家族CodeScout,以及所有代码和数据,供社区进一步开发。

英文摘要:

A prerequisite for coding agents to perform tasks on large repositories is code localization - the identification of relevant files, classes, and functions to work on. While repository-level code localization has been performed using embedding-based retrieval approaches such as vector search, recent work has focused on developing agents to localize relevant code either as a standalone precursor to or interleaved with performing actual work. Most prior methods on agentic code search equip the agent with complex, specialized tools, such as repository graphs derived from static analysis. In this paper, we demonstrate that, with an effective reinforcement learning recipe, a coding agent equipped with nothing more than a standard Unix terminal can be trained to achieve strong results. Our experiments on three benchmarks (SWE-Bench Verified, Pro, and Lite) reveal that our models consistently achieve superior or competitive performance over 2-18x larger base and post-trained LLMs and sometimes approach performance provided by closed models like Claude Sonnet, even when using specialized scaffolds. Our work particularly focuses on techniques for re-purposing existing coding agent environments for code search, reward design, and RL optimization. We release the resulting model family, CodeScout, along with all our code and data for the community to build upon.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑