HyperAIHyperAI

Command Palette

Search for a command to run...

Know Before Fix: QA-Driven Repository Knowledge Acquisition for Software Issue Resolution

Abstract

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.

One-sentence Summary

Researchers from Shanghai Jiao Tong University, University of Pittsburgh, and Guangdong Technion–Israel Institute of Technology propose ACQUIRE, a QA-driven framework that acquires structured repository knowledge by having a Questioner pose targeted questions and an Answerer ground answers in repository exploration, then a Resolver generates patches informed by that knowledge, raising Pass@1 by up to 4.4 percentage points on SWE-bench Verified.

Key Contributions

  • ACQUIRE is a QA-driven framework that decouples knowledge acquisition from patch generation by using a Questioner to pose targeted questions and an Answerer to autonomously explore the repository and produce evidence-grounded answers, transforming implicit knowledge gaps into explicit, structured understanding.
  • The framework acquires repository knowledge independently from repair in a two-stage pipeline, so the Resolver generates patches informed by the resulting QA knowledge, which accelerates knowledge-intensive repair stages and shifts agent effort toward verification.
  • Experiments on SWE-bench Verified show that ACQUIRE consistently outperforms representative pre-repair methods, raising Pass@1 by up to 4.4 percentage points with modest additional cost, and ablation studies attribute the gains to decomposing issues into targeted, answerable questions and category-guided question generation.

Introduction

Large language model (LLM) coding agents have advanced automated software issue resolution, yet a critical failure mode persists: the agent lacks deep repository understanding, leading to shallow, keyword-based localization and violations of implicit API contracts. Existing pre-repair methods attempt to enrich context with structural summaries, but they remain driven by issue keywords rather than identifying what specific repository knowledge is missing, often producing incomplete or imprecise context. The authors propose ACQUIRE, a framework that decouples repository knowledge acquisition from patch generation. ACQUIRE deploys a Questioner and an Answerer to decompose an issue into targeted questions across multiple knowledge dimensions and autonomously explore the repository for grounded answers, providing structured QA pairs that a Resolver then uses to generate informed patches.

Dataset

The evaluation of ACQUIRE relies on a single curated benchmark. Here is how the dataset is composed and used.

  • Dataset – SWE‑bench Verified, a subset of the original SWE‑bench.
  • Sources – 500 real GitHub issues drawn from open‑source Python repositories.
  • Filtering – The subset keeps only issues that isolate functional bugs; each instance runs in a controlled, portable environment so that the unit tests are deterministic and reliable.
  • Instance structure – Every example supplies the agent with a natural‑language problem description and the full code repository at the faulty commit. No extra hints, issue comments, or patch snippets are given.
  • Evaluation – Correctness is judged by executing the developer‑written unit tests that accompany the issue. The test framework provides a consistent, automated pass/fail signal.
  • Usage in the paper – The authors treat SWE‑bench Verified purely as a zero‑shot evaluation set. There is no training split; the agent is tasked with understanding the bug, searching the repository, and generating a patch in one shot. The benchmark is used to compare the bug‑fixing performance of two different backbone LLMs (DeepSeek‑V3.2 and GPT‑5‑mini) when paired with the ACQUIRE agent framework.

Method

The authors propose ACQUIRE, a two-stage framework designed to mirror the workflow of experienced developers tackling an unfamiliar codebase. The process begins by acquiring necessary repository knowledge, followed by performing an informed repair. Given an issue description III and an execution environment EEE, the framework systematically bridges knowledge gaps before attempting any code modifications.

As shown in the figure below:

The first stage focuses on question-driven knowledge acquisition. To ensure the acquired knowledge covers dimensions most relevant to the repair, a Questioner module generates NNN targeted questions. This generation is guided by a structured prompt template that encodes four distinct knowledge categories: Mechanism & Behavior, Design & Usage, Locating & Structure, and Ecosystem & Standards. These categories target functional logic flows, API definitions, codebase layout, and external dependencies, respectively. The Questioner autonomously selects the appropriate category for each question based on the issue context.

Once the questions {q1,,qN}\{q_1, \dots, q_N\}{q1,,qN} are generated, they are dispatched to NNN independently instantiated Answerer instances. Each Answerer explores the repository in a read-only mode within the execution environment EEE. The Answerer is prompted to produce grounded answers by referencing concrete repository artifacts, such as file paths and function names, rather than relying on parametric knowledge. If sufficient evidence cannot be found, the agent explicitly acknowledges the gap. Because each Answerer instance receives only the issue description III and its assigned question qiq_iqi, the exploration remains focused and unbiased by other instances. This isolation enables fully parallel execution, reducing the wall-clock latency to that of the single slowest instance. Upon completion, the resulting question-answer pairs are assembled into a knowledge set K={(q1,a1),,(qN,aN)}\mathcal{K} = \{(q_1, a_1), \dots, (q_N, a_N)\}K={(q1,a1),,(qN,aN)}.

In the second stage, knowledge-informed repair, a Resolver module performs the actual issue resolution. The Resolver receives the issue description III alongside the acquired knowledge set K\mathcal{K}K. The NNN QA pairs are serialized into a structured text block and prepended to the Resolver's messages before the repair instruction begins. This static pre-injection ensures that complete repository understanding is established prior to the first repair action, preventing early-stage decisions from being made under partial information. The injected QA pairs serve as supplementary context, informing the Resolver's strategies without overriding its ability to independently verify observations. Operating within the execution environment EEE, the Resolver engages in an iterative loop of code navigation, editing, and test execution until a candidate patch is successfully produced.

Experiment

The evaluation compares ACQUIRE against localization-based and debate-based pre-repair methods on SWE-bench Verified, using Mini-SWE-Agent as the shared repair backbone and measuring Pass@1, cost, and time. ACQUIRE consistently achieves the highest resolution rates across different backbone models while maintaining competitive efficiency, because its QA-driven paradigm decouples knowledge acquisition from repair and injects targeted, reliable repository knowledge. A human audit confirms that nearly all generated QA pairs are factually supported, and the knowledge accelerates repair by reducing blind exploration in the locating and fixing stages. Ablation studies reveal that decomposing the issue into focused questions and using a category-guided template are both essential for performance, and a single QA pair already yields meaningful gains, with an optimal trade-off at two pairs.

The table compares four methods on SWE-bench Verified using GPT-5-mini and DeepSeek-V3.2. DeepSeek-V3.2 consistently delivers higher pass@1 scores than GPT-5-mini, but at greater inference time and cost. Among GPT-5-mini runs, LingmaAgent achieves the highest accuracy, while CoSIL is the most cost-efficient. DeepSeek-V3.2 improves pass@1 by 2.3 to 2.4 percentage points on LocAgent and CoSIL relative to the Mini-SWE-Agent baseline, with both methods exceeding 68%. LingmaAgent with GPT-5-mini reaches the top pass@1 (60.0%) but costs over 0.30 dollars, roughly 13 times more than the cheapest method. CoSIL is the most economical method, with a cost of 0.035 dollars per run, though its pass@1 is 3.2 points lower than the Mini-SWE-Agent baseline.

The full ACQUIRE system achieves a Pass@1 of 70.8% on SWE-bench Verified, outperforming both question-generation ablation variants. Removing the question decomposition component (ACQUIRE-Proposal) reduces performance by 4.8 percentage points, while replacing category-guided questions with free-form questions (ACQUIRE-FreeQ) reduces it by 3.8 points, confirming that structured pre-repair knowledge acquisition improves repair outcomes. Full ACQUIRE attains the highest Pass@1 (70.8%), surpassing ACQUIRE-Proposal (66.0%) and ACQUIRE-FreeQ (67.0%). Ablating question decomposition (ACQUIRE-Proposal) drops Pass@1 by 4.8 percentage points, highlighting the importance of decomposing knowledge needs before repair. Replacing category-guided questions with free-form questions (ACQUIRE-FreeQ) leads to a 3.8 percentage point decline, showing that structured question templates yield better repair results.

The evaluation setup compares multiple agent methods on SWE-bench Verified using GPT-5-mini and DeepSeek-V3.2, while also assessing the ACQUIRE system with ablation variants. DeepSeek-V3.2 consistently improves accuracy over GPT-5-mini but at higher inference cost and time, with LingmaAgent achieving the top pass@1 on GPT-5-mini at a much higher expense, and CoSIL offering the most economical solution though with a slight accuracy trade-off. In the ACQUIRE experiments, the full system outperforms both ablation versions, and removing question decomposition or replacing structured category-guided questions with free-form questions notably degrades repair performance, confirming that structured pre-repair knowledge acquisition is critical.


Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing

HyperAI Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp