ACQUIRE

July 19, 2026 · View on GitHub

Python 3.10+ SWE-bench Verified Docker Built on mini-swe-agent License

This repository is the official implementation of Know Before Fix: QA-Driven Repository Knowledge Acquisition for Software Issue Resolution (arXiv:2607.11111). It contains the ACQUIRE main-experiment pipeline, prompts, released QA knowledge, and evaluation reports on SWE-bench Verified.

ACQUIRE first acquires repository knowledge with a Questioner and isolated Answerers, then provides the resulting QA pairs to a Resolver before patch generation.

Setup

Run commands from the repository root:

conda env create -f requirements.yml
conda activate acquire
export PYTHONPATH=src

Configure the model endpoint and credentials:

export OPENAI_BASE_URL=<your_base_url>
export OPENAI_API_KEY=<your_api_key>
# Optional fallback used by mini-swe-agent model wrappers.
export MSWEA_MODEL_API_KEY=$OPENAI_API_KEY

Docker must be available to run the Answerer and Resolver environments.

Run the Main Experiment

The single entry point runs the paper pipeline for each instance:

Questioner -> parallel Answerers -> QA aggregation -> Resolver

Use the released pre-generated QA

The released DeepSeek-V3.2 QA file contains two completed QA pairs for each of the 500 SWE-bench Verified instances. Use --resume-qa-file to preload it and run the Resolver without rerunning completed Questioner or Answerer work:

python -m minisweagent.run.main_experiment \
  --subset verified \
  --split test \
  --model deepseek/deepseek-chat \
  --num-questions 2 \
  --resume-qa \
  --resume-qa-file data/generated_qa/deepseek-v3.2.jsonl \
  --qa-output-dir outputs/main/deepseek-v3.2/qa \
  --qa-output-file outputs/main/deepseek-v3.2/qa/merged.jsonl \
  --repair-output-dir outputs/main/deepseek-v3.2/repair \
  --workers 10

The released file is read as input; the merged QA output is written under outputs/, so the published data is not modified. A selected instance with both QA pairs skips Questioner and Answerer and proceeds directly to Resolver.

Run the complete pipeline from scratch

Omit both resume options to regenerate questions and answers before repair:

python -m minisweagent.run.main_experiment \
  --subset verified \
  --split test \
  --model deepseek/deepseek-chat \
  --num-questions 2 \
  --qa-output-dir outputs/main/deepseek-v3.2-from-scratch/qa \
  --qa-output-file outputs/main/deepseek-v3.2-from-scratch/qa/generated.jsonl \
  --repair-output-dir outputs/main/deepseek-v3.2-from-scratch/repair \
  --workers 10

Without --resume-qa, every selected instance reruns the full Questioner -> parallel Answerers -> Resolver pipeline. --workers is the number of concurrently processed SWE-bench instances. Within each instance, Answerers run independently in parallel; with two questions, the maximum Answerer concurrency is approximately workers × 2.

The three role configurations are maintained separately:

src/minisweagent/config/main_experiment/questioner.yaml
src/minisweagent/config/main_experiment/answerer.yaml
src/minisweagent/config/main_experiment/resolver.yaml

--model overrides the model in all three configurations while preserving each role's temperature and budget settings.

Continue an interrupted QA acquisition run

When resuming output produced by an earlier run, enable --resume-qa without an explicit preload file:

python -m minisweagent.run.main_experiment \
  --resume-qa \
  --model deepseek/deepseek-chat \
  --qa-output-dir outputs/main/deepseek-v3.2-from-scratch/qa \
  --qa-output-file outputs/main/deepseek-v3.2-from-scratch/qa/generated.jsonl \
  --repair-output-dir outputs/main/deepseek-v3.2-from-scratch/repair

This reads <qa-output-dir>/preds.json, reuses valid QA by question_id, and generates only missing QA. When --resume-qa-file is present, that JSONL takes precedence over the work directory's preds.json.

If only part of an instance's QA completes, the Resolver still runs with the available QA. If none completes, the instance falls back to the ordinary Mini-SWE-Agent repair behavior.

Outputs

For the example above:

outputs/main/deepseek-v3.2/
├── qa/
│   ├── preds.json
│   ├── <instance_id>/
│   │   └── <question_id>.traj.json
│   └── ...
└── repair/
    ├── preds.json
    ├── pipeline_status.json
    ├── main_experiment.log
    ├── <instance_id>/
    │   └── <instance_id>.traj.json
    └── ...
  • QA preds.json is a flat list of completed QA records.
  • --qa-output-file uses the existing compatible JSONL format: one instance per line with a qas array.
  • Repair preds.json uses the SWE-bench patch format.
  • pipeline_status.json records Questioner, Answerer, QA completeness, and Resolver status per instance.

Included Data and Results

data/
├── examples/
├── generated_questions/
│   ├── deepseek-v3.2.jsonl
│   └── gpt-5-mini.jsonl
└── generated_qa/
    ├── deepseek-v3.2.jsonl
    └── gpt-5-mini.jsonl

results/
└── evaluations/
    └── <model>/

Pre-generated QA JSONL files can be passed directly through --resume-qa-file. The files under generated_questions/ are released intermediate data; the unified Pipeline regenerates questions itself during a from-scratch run.

Acknowledgements

ACQUIRE is built on mini-swe-agent and evaluated on SWE-bench. We thank the respective authors for open-sourcing their work.