From Failure to Mastery: Generating Hard Samples for Tool-use Agents

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hao, Bingguang, Xu, Zengzhuang, Wen, Yuntao, Xu, Xinyi, Liu, Yang, Zhao, Tong, Wang, Maolin, Chen, Long, Wang, Dong, Chen, Yicheng, Peng, Cunyin, Zhao, Xiangyu, Zhuang, Chenyi, Zhang, Ji
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918271457951744
author Hao, Bingguang
Xu, Zengzhuang
Wen, Yuntao
Xu, Xinyi
Liu, Yang
Zhao, Tong
Wang, Maolin
Chen, Long
Wang, Dong
Chen, Yicheng
Peng, Cunyin
Zhao, Xiangyu
Zhuang, Chenyi
Zhang, Ji
author_facet Hao, Bingguang
Xu, Zengzhuang
Wen, Yuntao
Xu, Xinyi
Liu, Yang
Zhao, Tong
Wang, Maolin
Chen, Long
Wang, Dong
Chen, Yicheng
Peng, Cunyin
Zhao, Xiangyu
Zhuang, Chenyi
Zhang, Ji
contents The advancement of LLM agents with tool-use capabilities requires diverse and complex training corpora. Existing data generation methods, which predominantly follow a paradigm of random sampling and shallow generation, often yield simple and homogeneous trajectories that fail to capture complex, implicit logical dependencies. To bridge this gap, we introduce HardGen, an automatic agentic pipeline designed to generate hard tool-use training samples with verifiable reasoning. Firstly, HardGen establishes a dynamic API Graph built upon agent failure cases, from which it samples to synthesize hard traces. Secondly, these traces serve as conditional priors to guide the instantiation of modular, abstract advanced tools, which are subsequently leveraged to formulate hard queries. Finally, the advanced tools and hard queries enable the generation of verifiable complex Chain-of-Thought (CoT), with a closed-loop evaluation feedback steering the continuous refinement of the process. Extensive evaluations demonstrate that a 4B parameter model trained with our curated dataset achieves superior performance compared to several leading open-source and closed-source competitors (e.g., GPT-5.2, Gemini-3-Pro and Claude-Opus-4.5). Our code, models, and dataset will be open-sourced to facilitate future research.
format Preprint
id arxiv_https___arxiv_org_abs_2601_01498
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle From Failure to Mastery: Generating Hard Samples for Tool-use Agents
Hao, Bingguang
Xu, Zengzhuang
Wen, Yuntao
Xu, Xinyi
Liu, Yang
Zhao, Tong
Wang, Maolin
Chen, Long
Wang, Dong
Chen, Yicheng
Peng, Cunyin
Zhao, Xiangyu
Zhuang, Chenyi
Zhang, Ji
Computation and Language
The advancement of LLM agents with tool-use capabilities requires diverse and complex training corpora. Existing data generation methods, which predominantly follow a paradigm of random sampling and shallow generation, often yield simple and homogeneous trajectories that fail to capture complex, implicit logical dependencies. To bridge this gap, we introduce HardGen, an automatic agentic pipeline designed to generate hard tool-use training samples with verifiable reasoning. Firstly, HardGen establishes a dynamic API Graph built upon agent failure cases, from which it samples to synthesize hard traces. Secondly, these traces serve as conditional priors to guide the instantiation of modular, abstract advanced tools, which are subsequently leveraged to formulate hard queries. Finally, the advanced tools and hard queries enable the generation of verifiable complex Chain-of-Thought (CoT), with a closed-loop evaluation feedback steering the continuous refinement of the process. Extensive evaluations demonstrate that a 4B parameter model trained with our curated dataset achieves superior performance compared to several leading open-source and closed-source competitors (e.g., GPT-5.2, Gemini-3-Pro and Claude-Opus-4.5). Our code, models, and dataset will be open-sourced to facilitate future research.
title From Failure to Mastery: Generating Hard Samples for Tool-use Agents
topic Computation and Language
url https://arxiv.org/abs/2601.01498