Trajectory Data Quality Impacts Code Agent Fine-Tuning
Summary
This study systematically evaluates how the quality and quantity of expert agent trajectories affect LoRA fine-tuning of open-weight LLMs for code agents. It proposes a two-axis quality scoring framework (Efficiency and Style) and finds a scale-dependent quality-quantity trade-off, with error-retry rate being a dominant quality dimension.
Why it matters
Professionals developing AI code assistants or automated software engineering tools can significantly improve model performance and efficiency by strategically curating their training data, focusing on quality over mere quantity, especially at larger scales.
How to implement this in your domain
- 1Develop a data curation pipeline that scores expert trajectories based on efficiency and style metrics.
- 2Prioritize filtering out low-quality trajectories, especially those with high error-retry rates, before fine-tuning.
- 3Experiment with different scales of high-quality data to find the optimal balance for LoRA fine-tuning.
- 4Adopt cross-entropy loss on held-out trajectories as a proxy metric for evaluating code agent performance in early development stages.
Who benefits
Key takeaways
- Trajectory data quality significantly impacts code agent fine-tuning performance.
- A two-axis framework (Efficiency and Style) can score trajectory quality.
- The quality-quantity trade-off is scale-dependent, favoring quality at larger scales.
- Minimizing error-retry rates in trajectories is crucial for better models.
Original post by Yunze Han
"arXiv:2607.17205v1 Announce Type: new Abstract: 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 tr…"
View on XOriginally posted by Yunze Han on X · view source
Want to go deeper?
Turn these trends into skills with Learnijoy's hands-on AI & tech courses.
Explore coursesMore in AI Engineering & DevTools

Claude Prompting Tips: Simplify for Better Fable Performance
New insights suggest that Claude, particularly Fable, performs better with simpler prompts, avoiding excessive examples or negative constraints. Claude Code's system prompt was recently reduced by 80%, indicating a shift towards more concise instructions.
Interview Reveals Claude Code Team Insights, Claude Tag's Impact
An interview with Cat Wu and Thariq from the Claude Code team is now available, featuring discussions on Claude Code, Fable, coding agent security, and tool design. Notably, Claude Tag, which integrates Claude Code via Slack, is reported to handle 65% of product engineering pull requests for the team.
PROWL AI Agents Explore Minecraft, Self-Correcting Failures
OdysseyML's PROWL system trains AI agents for Minecraft exploration, utilizing a world model to detect and rectify failures. This approach creates a dynamic learning curriculum, ensuring sustained performance and direct issue resolution within the game environment.