Quality, Not Just Outcome: A Structural Scoring Framework for Selecting Coding-Agent Trajectories for Supervised Fine-Tuning
Sida Li, Yuanxin Liu, Shicheng Li, Linli Yao, Xu Sun, Haoli Bai, Xiaohui Li
Abstract
Open coding agents are commonly trained through supervised fine-tuning on interaction trajectories whose final patches pass the benchmark test suite. However, this outcome-level filtering criterion ignores process quality: trajectories that eventually succeed may still contain inefficient interaction patterns such as repetitive file inspection, unstable tool usage, or delayed modification behavior, all of which become part of the imitation target. We propose TQS (Trajectory Quality Score), a structural scoring framework for coding-agent trajectories that operates directly on trajectory structure, requires no LLM judge, and runs in linear time. TQS characterizes trajectory quality through structural signals organized around structured convergence: information focus, intent--action alignment, and policy dynamics. Using 155,144 successful trajectories from a public open-license corpus, we rank trajectories by TQS and fine-tune coding agents on filtered subsets. Models trained on top-ranked trajectories consistently outperform those trained on random or bottom-ranked subsets on SWE-Bench-Verified. Our results suggest that process-level trajectory quality is an important factor in coding-agent supervision and that structural trajectory filtering provides an effective and scalable alternative to LLM-based data selection.
Create a lesson
Related papers
SWE-Critix: Post-Training Generalist Verifiers for Assessing Coding-Agent Trajectories
Shared title terminologycs.AIJiajun Hu, Chun Yong Chong
Overcoming Prior Barriers: Supervised Fine-Tuning under Long-Tail Distribution
Shared title terminologycs.AIHaohui Wang, Jiahao Xu, Wangzhi Zhan et al.
Learning Adaptive Defense Strategies: Fine-Tuned LLMs for Network Security Games under Network Mobility
Shared title terminologycs.AIMd Abu Sayed, Asif Rahman, Ahmed Ryen et al.
Beyond Outcome Feedback: Trajectory-Quality-Guided Experience-based Learning
Shared title terminologycs.AIBingjie Zhang, Yibo Yang, Qiantong Liu et al.
OnTrack: Real-Time Monitoring and Intervention in LLM Agent Trajectories via Streaming Structure-Aware Optimal Transport
Shared title terminologycs.AIBabak Barazandeh, Connor Swanson, Chinmay Kulkarni et al.
Layer-Level Control of Language Model Execution in Agent Frameworks
Shared title terminologycs.AIRan Guan, Yiqi Lin, Xiangxi Tian et al.