A Systematic Evaluation of Trajectory Data Curation for LoRA Fine-Tuning of Code Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Supervised fine-tuning (SFT) of open-weight LLMs on expert agent trajectories has emerged as a prominent approach to building capable code agents without reliance on proprietary models. A central yet underexplored question is how trajectory quality and quantity jointly shape model performance. We present a systematic empirical study of trajectory data filtering for LoRA fine-tuning of Qwen2.5-Coder-7B-Instruct on the SWE-trajectory dataset (67,074 trajectories, of which 32,161 are resolved). We propose a two-axis quality scoring framework -- Efficiency and Style -- and evaluate it through 16 controlled experiments spanning strategy, scale, and ablation analyses. Since 7B-scale models attain near-zero SWE-bench resolve rates, we adopt cross-entropy (CE) loss on held-out trajectories as the primary metric, validated via first-action generation: CE loss and ROUGE-L are perfectly rank-correlated (Spearman ρ = -1.00), with limited-sample evidence supporting but not conclusively establishing this proxy. Our results reveal a scale-dependent quality-quantity trade-off: at small scales, doubling the dataset (500 to 1,000) yields ~12.7% CE-loss reduction whereas the TopQ-Random gap stays <1% (Mann-Whitney p > 0.10); at 2,000 trajectories this same gap widens to 3.6% (p = 0.016). Ablation further identifies error-retry rate as the dominant sub-dimension, performing comparably to the full composite (Delta < 0.2%). Together, these findings establish trajectory-level quality scoring as a viable but scale-sensitive lever for code-agent SFT and offer a proxy-validated evaluation protocol for the regime where end-to-end resolve rate is statistically infeasible.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 15 of its 18 references that are in the map. First posted on arXiv 19 Jul 2026.
Builds on
15 of 18 references.
Closest ancestors · 4
Same direction, newest first
- 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr
- 2024Training Software Engineering Agents and Verifiers with SWE-Gym30 Dec
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
Other references · 11
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2023What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuningcited by 354
- 2023From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuningcited by 301
- 2025Scaling Laws Are Unreliable for Downstream Tasks: A Reality Checkcited by 27
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Beyond Quantity: Trajectory Diversity Scaling for Code Agents
- 2026From Patches to Trajectories: Privileged Process Supervision for Software-Engineering Agents
- 2026DynSTEER: Dynamic Stage-wise Trajectory Evaluation and Execution-time Review for Agents
- 2026Trajectory-Aware Benchmark Subset Selection for Cost-Efficient Software Engineering Agent Regression Testing
- 2026TermiGen: High-Fidelity Environment and Robust Trajectory Synthesis for Terminal Agents
- 2026Coherence Collapse: Diagnosing Why Code Agents Fail After Reaching the Right Code
- 2026AgentLens: Production-Assessed Trajectory Reviews for Coding Agent Evaluation
- 2026The Handoff Tax: Continuing Non-Native Trajectories in LLM Agents