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に依頼する際、リポジトリからのコンテキストをどのように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