先知后修:质量保障驱动的仓库知识获取用于软件问题解决
Know Before Fix: QA-Driven Repository Knowledge Acquisition for Software Issue Resolution
July 13, 2026
作者: Haotian Lin, Silin Chen, Xiaodong Gu, Yuling Shi, Chengxi Pan, Jiaqi Ge, Mengfan Li, Jianghong Huang, Mengchieh Chuang, Beijun Shen, Haibing Guan
cs.AI
摘要
基于大语言模型的编码智能体已在自动化软件问题修复方面取得显著进展,但其仍极易因对代码库理解不足而产生事实性错误。近期方法试图通过预修复阶段的代码库探索来缓解这一局限,然而这些修复驱动策略在未识别智能体知识空白的情况下进行探索,往往提供不精确的上下文信息,无法弥合根本性的认知缺陷。本文提出ACQUIRE——一个面向软件问题修复的问答驱动框架。如同经验丰富的开发者修复代码前先理解陌生代码库的运作方式,ACQUIRE在修复前显式获取代码库知识。该框架通过两个阶段将知识获取与补丁生成解耦:第一阶段,提问者与解答者协作获取结构化代码库知识,其中提问者提出针对性问题,解答者通过自主探索生成基于证据的答案;第二阶段,解析器利用生成的问答知识生成信息完备的补丁。通过将隐式知识空白转化为明确且事实可靠的理解,ACQUIRE加速了知识密集型修复环节,实现了更精准的问题修复。在SWE-bench Verified基准上的实验表明,ACQUIRE始终优于代表性的预修复方法,在适度增加成本和时间的前提下,将Pass@1提升了高达4.4个百分点。
English
LLM-based coding agents have significantly advanced automated software issue resolution, yet they remain highly prone to factual errors caused by insufficient repository understanding. Recent methods attempt to mitigate this limitation through pre-repair repository exploration; however, their fix-driven strategies explore repositories without identifying the agent's knowledge gaps, often yielding imprecise context that fails to bridge the underlying understanding deficit. In this paper, we propose ACQUIRE, a QA-driven framework for software issue resolution. Mirroring how experienced developers first comprehend unfamiliar code before attempting a fix, ACQUIRE explicitly acquires repository knowledge prior to repair. The framework decouples knowledge acquisition from patch generation through two stages: in the first stage, a Questioner and an Answerer collaborate to acquire structured repository knowledge, where the Questioner poses targeted questions and the Answerer produces evidence-grounded answers through autonomous exploration; in the second stage, the Resolver leverages the resulting QA knowledge to generate informed patches. By transforming implicit knowledge gaps into explicit, factually reliable understanding, ACQUIRE accelerates knowledge-intensive repair stages and enables more accurate resolution. Experiments on SWE-bench Verified demonstrate that ACQUIRE consistently outperforms representative pre-repair methods, raising Pass@1 by up to 4.4 percentage points with modest additional cost and time.