MCTS-Refined CoT: High-Quality Fine-Tuning Data for LLM-Based Repository Issue Resolution
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
LLMs demonstrate strong performance in auto-mated software engineering, particularly for code generation and issue resolution. While proprietary models like GPT-4o achieve high benchmarks scores on SWE-bench, their API dependence, cost, and privacy concerns limit adoption. Open-source alternatives offer transparency but underperform in complex tasks, especially sub-100B parameter models. Although quality Chain-of-Thought (CoT) data can enhance reasoning, current methods face two critical flaws: (1) weak rejection sampling reduces data quality, and (2) inadequate step validation causes error accumulation. These limitations lead to flawed reasoning chains that impair LLMs'ability to learn reliable issue resolution. The paper proposes MCTS-REFINE, an enhanced Monte Carlo Tree Search (MCTS)-based algorithm that dynamically validates and optimizes intermediate reasoning steps through a rigorous rejection sampling strategy, generating high-quality CoT data to improve LLM performance in issue resolution tasks. Key innovations include: (1) augmenting MCTS with a reflection mechanism that corrects errors via rejection sampling and refinement, (2) decomposing issue resolution into three subtasks-File Localization, Fault Localization, and Patch Generation-each with clear ground-truth criteria, and (3) enforcing a strict sampling protocol where intermediate outputs must exactly match verified developer patches, ensuring correctness across reasoning paths. Experiments on SWE-bench Lite and SWE-bench Verified demonstrate that LLMs fine-tuned with our CoT dataset achieve substantial improvements over baselines.Notably, Qwen2.5-72B- Instruct achieves 28.3%(Lite) and 35.0%(Verified) resolution rates, surpassing SOTA baseline SWE-Fixer-Qwen-72B with the same parameter scale, which only reached 24.7%(Lite) and 32.8%(Verified).
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. First posted on arXiv 15 Jun 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 65
- 2025Agentic Software Issue Resolution with Large Language Models: A Surveycited by 6
- 2026From Historical Patches to Repair Plans: Outcome-Conditioned Reasoning for Repository-Level Program Repaircited by 3
- 2026When LLM Meets Tree Search: A Systematic View of Inference as Search in Large Language Modelscited by 0
- 2026When LLM Meets Tree Search: A Systematic View of Inference as Search in Large Language Models31 Aug 2026
- 2026From Historical Patches to Repair Plans: Outcome-Conditioned Reasoning for Repository-Level Program Repair30 Jan 2026
- 2025Agentic Software Issue Resolution with Large Language Models: A Survey24 Dec 2025
- 2025SWE-Exp: Experience-Driven Software Issue Resolution31 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2025MCTS-Judge: Test-Time Scaling in LLM-as-a-Judge for Code Correctness Evaluation
- 2025SoRFT: Issue Resolving with Subtask-oriented Reinforced Fine-Tuning
- 2026Does Pass Rate Tell the Whole Story? Evaluating Design Constraint Compliance in LLM-based Issue Resolution
- 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMs
- 2025SWE-Factory: Your Automated Factory for Issue Resolution Training Data and Evaluation Benchmarks
- 2026When the Chain Breaks: Interactive Diagnosis of LLM Chain-of-Thought Reasoning Errors
- 2025Lingxi: Repository-Level Issue Resolution Framework Enhanced by Procedural Knowledge Guided Scaling
- 2026Advances and Frontiers of LLM-based Issue Resolution in Software Engineering: A Comprehensive Survey