SWE-Prime: Fewer Trajectories, Better Performance

To improve large language models'ability to resolve real-world software issues, prior work has focused on constructing large-scale agent trajectory datasets and performing supervised fine-tuning (SFT) 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. Therefore, we propose SWE-Prime, a multi-granularity, two-stage SFT data selection method that progressively filters training data at the trajectory and segment levels. Specifically, the first stage performs trajectory-level screening based on process quality, result quality, and data representativeness, selecting a high-quality and representative subset of successful trajectories. The second stage performs segment-level selection by grouping consecutive steps into semantic segments and assessing each segment 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. 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, yielding relative performance gains of up to 12.2% and 24.2%, respectively.

Link
https://www.semanticscholar.org/paper/7c02a0a629bf1b5b60cd1553fbdad5db90512689
Found by
Semantic Scholar
Authors
Dewu Zheng, Rui Ye, Yanlan Wang, Yang Ye, Hongyun Zhang, Ensheng Shi, Xi-Lin Liu, Yu-Chi Ma, Jian-Xing Yu, Zibin Zheng
Categories
dataset
Published
2026-08-27
Last seen by the radar
2026-08-29
Citations
0
Influential citations
0
Radar score
28.50 / 100 (how it is scored)
Why it scored so
Matched: dataset, training data; Primary record: Semantic Scholar
Related links
https://arxiv.org/abs/2608.27449
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Semantic Scholar