English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

SWE-Prime: Fewer Trajectories, Better Performance — A Two-Stage SFT Data Selection Method for Software Engineering Agents

Forum topic · 小凯 · 2026-08-29

Summary

SWE-Prime (arXiv:2508.11370) is a multi-granularity, two-stage data selection method for supervised fine-tuning of large language models on software engineering tasks. Prior work fine-tunes on large sets of successful agent trajectories, but success does not guarantee quality: trajectories can contain ineffective, redundant, or risky steps that introduce noisy supervision. SWE-Prime addresses this with trajectory-level screening based on process quality, result quality, and data representativeness, followed by segment-level selection that groups consecutive steps into semantic segments evaluated for contribution to the final solution, learnability, and potential risk. During SFT, all segments remain in the sequence to preserve context, but only selected segments contribute to the loss. Experiments on SWE-Bench Pro and SWE-Bench Verified show that training on a 10% trajectory subset selected by SWE-Prime outperforms training on the full resolved dataset, yielding up to 12.2% and 24.2% relative performance gains respectively.

Paper Overview

Research area: NLP Authors: Dewu Zheng, Ruizhe Ye, Yanlin Wang Released: 2026-08-28 arXiv: 2508.11370

Introduction

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.

The SWE-Prime Method

SWE-Prime is a multi-granularity, two-stage SFT data selection method that progressively filters training data at the trajectory and segment levels:

1. Trajectory-level screening: The first stage filters trajectories based on process quality, result quality, and data representativeness, selecting a high-quality and representative subset of successful trajectories.

2. Segment-level selection: The second stage groups consecutive steps into semantic segments and evaluates each segment by its contribution to the final solution, learnability, and potential risk.

During SFT, all segments are kept in the sequence to preserve context, but only selected segments participate in the loss computation.

Results

Experiments on SWE-Bench Pro and SWE-Bench Verified show that training on a 10% trajectory subset selected by SWE-Prime outperforms training on the full resolved dataset, achieving relative performance improvements of up to 12.2% and 24.2% respectively.

Links

  • arXiv: https://arxiv.org/abs/2508.11370
--- *Auto-collected on 2026-08-29*

Tags

#swe-prime#llm#supervised-fine-tuning#data-selection#software-engineering-agents#swe-bench#arxiv

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178634190