ReadPaper Blog
Know Before Fix: QA-Driven Repository Knowledge Acquisition for Software Issue Resolution
The paper addresses a persistent failure mode in LLM-based coding agents: they often generate incorrect software patches because they lack repository-specific knowledge about dependencies, API contracts, data flow, and design conventions. It proposes ACQUIRE, a two-stage framework that first turns knowledge gaps into targeted repository questions and evidence-grounded answers, then uses that structured QA knowledge to guide patch generation. On SWE-bench Verified, ACQUIRE improves Pass@1 by up to 4.4 percentage points over representative pre-repair methods with modest additional cost and time, suggesting that explicit understanding before editing can make automated issue resolution more reliable.
Source: Know Before Fix: QA-Driven Repository Knowledge Acquisition for Software Issue Resolution

Know Before Fix!
The paper’s core motivation is that modern LLM coding agents can reason fluently yet still fail because they do not understand the repository they are editing. The authors argue that many incorrect fixes are factual errors rather than pure reasoning failures: the issue description alone rarely contains cross-module dependencies, implicit API contracts, data-flow behavior, or repository-specific conventions needed for a correct patch. This gap leads agents toward shallow keyword-based localization, incomplete fault tracing across module boundaries, and edits that violate hidden design assumptions. The paper frames software issue resolution as a knowledge-intensive task in which successful repair depends on acquiring repository facts before modifying code. Its central claim is that an agent should know what it does not know about the codebase before attempting to fix the bug.

The Real Gap
The paper distinguishes ACQUIRE from prior pre-repair exploration methods by arguing that earlier approaches remain largely fix-driven or keyword-driven. Methods such as structural summarization or suspicious-location ranking can provide broader context, but they do not explicitly ask what repository knowledge is missing before repair begins. The authors point out that keyword-linked context can be imprecise or incomplete when the true cause depends on hidden behavior, module interactions, or non-obvious interface contracts. To motivate a question-centered approach, the paper reports an oracle QA experiment on 116 SWE-bench Lite instances that Mini-SWE-Agent failed under DeepSeek-V3.2, where injecting a single privileged QA pair allowed 26 previously failed cases to be resolved. This experiment supports the paper’s hypothesis that targeted pre-repair knowledge can unlock repair capability that the base agent already partly possesses but cannot use without repository understanding.

ACQUIRE’s Trick
ACQUIRE, short for Agent Collaboration for Question-Answer-driven Issue Resolution, operationalizes this hypothesis by separating knowledge acquisition from patch generation. In Stage I, a Questioner decomposes the issue into targeted, self-contained questions, while independently instantiated Answerer agents explore the repository to produce evidence-grounded answers. The question taxonomy is derived from analysis of oracle questions and prior failure studies, and it covers Mechanism & Behavior, Design & Usage, Locating & Structure, and Ecosystem & Standards. These categories are meant to capture how functionality works, what contracts interfaces obey, where relevant code resides, and what external protocols or library semantics may matter. In Stage II, a Resolver receives the original issue and the accumulated QA knowledge set, then generates a candidate patch informed by explicit repository facts rather than only by the issue text.

What the Paper Found
The paper evaluates ACQUIRE on SWE-bench Verified, a curated benchmark of 500 real-world GitHub issues, and reports that it consistently outperforms representative pre-repair methods across two backbone LLMs. The headline result is a Pass@1 improvement of up to 4.4 percentage points, achieved with what the authors describe as modest additional cost and time. Beyond aggregate success rate, the paper’s analysis claims that the acquired QA knowledge is factually reliable, shortens knowledge-intensive repair trajectories, and steers the Resolver toward causally relevant code regions on instances that prior agents failed. These findings matter because automated software repair often spends large token budgets and many execution steps on unsuccessful attempts when repository understanding is missing. ACQUIRE’s results suggest that spending some effort on structured understanding before patching can be more efficient than repeatedly editing from incomplete context.

Bottom Line
The broader implication of the paper is that repository-level question answering can serve as a missing interface between issue descriptions and code modification. By turning implicit uncertainty into explicit questions, ACQUIRE gives the repair agent a structured representation of what must be understood before a patch is safe to generate. This shifts the design of coding agents away from immediate edit generation and toward a workflow closer to experienced developer practice: diagnose the relevant behavior, contracts, locations, and external constraints before committing to a fix. The paper also positions QA-driven knowledge acquisition as complementary to tool-augmented interaction, multi-step planning, and chain-of-thought reasoning, because those capabilities still need reliable repository facts to act on. Its main contribution is therefore not a new patching heuristic, but a framework for making repository understanding an explicit, evidence-grounded stage of software issue resolution.
