arXiv:2608.24221cs.SEcs.CL2026-08

用智能代理+搜索树,让AI深度理解代码库跨文件依赖。

DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration

论文配图:DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration
图 1 · 摘自论文原文
  • 用大模型代理结合蒙特卡洛树搜索,系统遍历代码库结构。
  • 在SWE-QA上超越强基线,多跳推理准确率显著提升。
  • 适合需要深入理解复杂代码库的研发人员和工具开发者。

回答开发人员关于软件仓库的问题是软件工程中的关键但研究不足的问题。现有仓库理解方法主要依赖表面代码检索,缺乏对多文件、复杂架构及长程代码依赖的深层推理能力。为此,我们提出DeepRepoQA,一种面向仓库级代码理解的新型问答框架。该框架基于智能体架构,利用大语言模型代理通过系统化的树搜索机制探索仓库结构。采用蒙特卡洛树搜索(MCTS)使代理能动态导航并检查代码,实现对长程依赖的高效多跳推理。在SWE-QA基准上的全面实验表明,该方法显著优于强基线,验证了系统性MCTS引导探索在多跳仓库推理中的有效性。

原文摘要 · Abstract (English)

Answering developer questions about a software repository is a critical yet under-explored problem in software engineering. While existing repository understanding methods have advanced the field, they predominantly rely on surface-level code retrieval and lack the ability for deep reasoning over multiple files, complex software architectures, and grounding answers in long-range code dependencies. To address these limitations, we propose DeepRepoQA, a novel question answering (QA) framework for repository-level code understanding. DeepRepoQA builds on an agentic framework where LLM agents find answers through a systematic tree search over the repository structure. A Monte-Carlo Tree Search (MCTS) mechanism is employed to empower agents to dynamically search, navigate, and inspect code, enabling effective multi-hop reasoning over long-range code dependencies. Comprehensive experiments on the SWE-QA benchmark demonstrate substantial performance gains over strong baselines, validating the effectiveness of systematic MCTS-guided exploration for multi-hop repository reasoning.

代码理解智能代理多跳推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。