MutaGReP:面向代码使用的免执行仓库基础计划搜索
MutaGReP: Execution-Free Repository-Grounded Plan Search for Code-Use
AI总结:
提出MutaGReP,一种免执行、基于仓库的计划搜索方法,通过突变和符号检索在计划空间进行神经树搜索,用不到5%的上下文窗口达到GPT-4o全仓库上下文的编码性能,并提升小模型在LongCodeArena上的表现。
摘要:
当人类请求LLM利用大型代码仓库中的功能完成编码任务时,我们如何向LLM提供来自仓库的上下文?一种方法是将整个仓库添加到LLM的上下文窗口中。然而,大多数任务仅涉及仓库中的一小部分符号,较长的上下文对LLM的推理能力有害,且上下文窗口并非无限。另一种方法是模拟人类浏览大型仓库、挑选正确功能并形成解决任务计划的能力。我们提出MutaGReP(突变引导的仓库基础计划搜索),一种搜索计划的方法,该方法将用户请求分解为基于代码库的自然语言步骤。MutaGReP在计划空间中执行神经树搜索,通过突变计划进行探索,并使用符号检索器进行基础化。在具有挑战性的LongCodeArena基准上,我们的计划使用GPT-4o的128K上下文窗口不到5%,但在编码性能上可与上下文窗口填满仓库的GPT-4o相媲美。MutaGReP生成的计划使Qwen 2.5 Coder 32B和72B能够匹配具有完整仓库上下文的GPT-4o的性能,并在最难的LongCodeArena任务上取得进展。项目页面:zaidkhan.me/MutaGReP
英文摘要:
When a human requests an LLM to complete a coding task using functionality from a large code repository, how do we provide context from the repo to the LLM? One approach is to add the entire repo to the LLM's context window. However, most tasks involve only fraction of symbols from a repo, longer contexts are detrimental to the LLM's reasoning abilities, and context windows are not unlimited. Alternatively, we could emulate the human ability to navigate a large repo, pick out the right functionality, and form a plan to solve the task. We propose MutaGReP (Mutation-guided Grounded Repository Plan Search), an approach to search for plans that decompose a user request into natural language steps grounded in the codebase. MutaGReP performs neural tree search in plan space, exploring by mutating plans and using a symbol retriever for grounding. On the challenging LongCodeArena benchmark, our plans use less than 5% of the 128K context window for GPT-4o but rival the coding performance of GPT-4o with a context window filled with the repo. Plans produced by MutaGReP allow Qwen 2.5 Coder 32B and 72B to match the performance of GPT-4o with full repo context and enable progress on the hardest LongCodeArena tasks. Project page: zaidkhan.me/MutaGReP
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。