Sign InOpen Brain
arXivPaperNeeds Review

SWE-Prime: Fewer Trajectories, Better Performance

SWE-Prime finds that filtering coding-agent traces by process and segment quality can beat training on every resolved trajectory, reducing noisy imitation from redundant or risky steps.

arXiv · Aug 27, 2026
Open Source Open MarkdownOpen JSON
Source Summary

SWE-Prime filters successful coding-agent traces in **two stages**: whole trajectories are screened for process quality, result quality, and representativeness, then semantic segments are judged for contribution, learnability, and risk. Only selected segments contribute to the training loss.

Practical Implication

The reported **10% trajectory subset** beat training on the full resolved dataset, with relative gains up to **12.2% on SWE-Bench Pro** and **24.2% on SWE-Bench Verified**. Teams training coding models should evaluate how an issue was solved, not treat a passing outcome as clean supervision.

Agent-Ready Context
SWE-Prime filters successful coding-agent traces in **two stages**: whole trajectories are screened for process quality, result quality, and representativeness, then semantic segments are judged for contribution, learnability, and risk. Only selected segments contribute to the training loss.

The reported **10% trajectory subset** beat training on the full resolved dataset, with relative gains up to **12.2% on SWE-Bench Pro** and **24.2% on SWE-Bench Verified**. Teams training coding models should evaluate how an issue was solved, not treat a passing outcome as clean supervision.

All segments remain in the input sequence to preserve context, so this is selective loss computation rather than simply deleting weak steps. The material reports benchmark results but does not establish whether the selection criteria transfer to other repositories, agents, or training setups.
Connected Context · Feed7 Judgment

SWE-Prime shows that successful coding traces are not uniformly valuable supervision: filtering trajectories and masking low-value segments can outperform learning from every resolved example. This strengthens trajectory-quality arguments with benchmark results and adds a concrete implementation distinction—retain the full trace as context while applying loss only to selected segments. It does not resolve whether the underlying tasks or harnesses are valid.

Change2Task: From Repository Changes to Executable Coding Agent Tasks and EnvironmentsChange2Task can supply renewable PR-derived tasks, while SWE-Prime provides a complementary method for selecting useful supervision from the successful traces those tasks produce.State of Data — Sean Cai, Independent / State of DataSWE-Prime gives quantified support to the claim that process traces matter, while showing that even real successful trajectories require quality and contribution filtering before training.PAIChecker: Uncovering and Checking PR-Issue Misalignment in SWE-Bench-Like BenchmarksPAIChecker is an upstream prerequisite: selective trace training cannot repair supervision produced by a task whose issue, patch, and tests are misaligned.QuoteBench: How Matched Scores Can Hide Command-Path FailuresQuoteBench shows that harness serialization can introduce hidden failures, so SWE-Prime’s process-quality judgments should distinguish agent behavior from defects in the command path.
Context Map
benchmarkcodingdata#coding-agents#agent-evals#benchmark-integrity
Uncertainty
All segments remain in the input sequence to preserve context, so this is selective loss computation rather than simply deleting weak steps. The material reports benchmark results but does not establish whether the selection criteria transfer to other repositories, agents, or training setups.