修復前須知:基於品質保證的儲存庫知識獲取以解決軟體問題
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.