2026-08-28 — views
SWE-Prime Improves Model Performance With Fewer Trajectories
Read this because Builders should care because noisy supervision can encourage models to imitate undesirable problem-solving behaviors.
New method SWE-Prime filters training data to improve large language models ability to resolve real-world software issues.
The Challenge of Supervised Fine-Tuning
Prior work has focused on constructing large-scale agent trajectory datasets and performing supervised fine-tuning on successful trajectories. However, task success does not guarantee high-quality supervision. Successful trajectories may still contain ineffective, redundant, or risky steps. Directly using such trajectories for SFT can introduce noisy supervision and encourage models to imitate undesirable problem-solving behaviors.
Introducing SWE-Prime
To address these issues, researchers propose SWE-Prime, a multi-granularity, two-stage SFT data selection method that progressively filters training data at the trajectory and segment levels. The first stage performs trajectory-level screening based on process quality, result quality, and data representativeness. This step selects a high-quality and representative subset of successful trajectories.
The second stage performs segment-level selection by grouping consecutive steps into semantic segments. Each segment is assessed based on its contribution to the final solution, learnability, and potential risks. During SFT, all segments remain in the sequence to preserve context, while only selected segments contribute to the loss computation.
Experimental Results
Experiments on SWE-Bench Pro and SWE-Bench Verified show that training on the 10% trajectory subset selected by SWE-Prime outperforms training on the full resolved dataset. This approach yields relative performance gains of up to 12.2% and 24.2%, respectively.
Practitioner note
Developers should implement multi-stage data selection to filter out ineffective steps before fine-tuning. They must ensure that only segments contributing positively to the solution are used for loss computation while preserving full context.