ChatPaper.aiChatPaper

MutaGReP: 코드 사용을 위한 실행 없이 저장소 기반 계획 탐색

MutaGReP: Execution-Free Repository-Grounded Plan Search for Code-Use

February 21, 2025
저자: Zaid Khan, Ali Farhadi, Ranjay Krishna, Luca Weihs, Mohit Bansal, Tanmay Gupta
cs.AI

초록

사람이 대규모 코드 저장소의 기능을 사용하여 코딩 작업을 완료하도록 LLM(Large Language Model)에 요청할 때, 저장소의 컨텍스트를 LLM에 어떻게 제공할 수 있을까? 한 가지 접근 방식은 전체 저장소를 LLM의 컨텍스트 창에 추가하는 것이다. 그러나 대부분의 작업은 저장소의 일부 심볼만을 필요로 하며, 더 긴 컨텍스트는 LLM의 추론 능력을 저해하고, 컨텍스트 창은 무한하지 않다. 대안적으로, 우리는 인간이 대규모 저장소를 탐색하고 적절한 기능을 선택하여 작업을 해결할 계획을 세우는 능력을 모방할 수 있다. 우리는 MutaGReP(Mutation-guided Grounded Repository Plan Search)를 제안한다. 이는 사용자 요청을 코드베이스에 기반한 자연어 단계로 분해하는 계획을 탐색하는 접근 방식이다. MutaGReP는 계획 공간에서 신경망 트리 탐색을 수행하며, 계획을 변형하고 심볼 검색기를 사용하여 기반을 마련한다. 도전적인 LongCodeArena 벤치마크에서, 우리의 계획은 GPT-4o의 128K 컨텍스트 창의 5% 미만을 사용하지만, 저장소로 채워진 컨텍스트 창을 가진 GPT-4o의 코딩 성능과 맞먹는다. MutaGReP가 생성한 계획은 Qwen 2.5 Coder 32B와 72B가 전체 저장소 컨텍스트를 가진 GPT-4o의 성능과 동등하게 만들고, 가장 어려운 LongCodeArena 작업에서의 진전을 가능하게 한다. 프로젝트 페이지: zaidkhan.me/MutaGReP
English
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

Summary

AI-Generated Summary

PDF52February 26, 2025