HardGen: Generating Hard Samples for Tool-use Agents

Authors: Bingguang Hao, Zengzhuang Xu, Yuntao Wen, Xinyi Xu, Quanen Sun, Yang Liu, Zihao Huang, Tong Zhao, Long Chen, Dong Wang, Yicheng Chen, Maolin Wang, Cunyin Peng, Xiangyu Zhao, Chenyi Zhuang, Ji Zhang

Abstract

The advancement of LLM agents with tool-use capabilities requires diverse and complex training corpora. Existing data generation methods, which predominantly follow the 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. First, HardGen establishes a dynamic API Graph built upon agent failure cases, from which it samples hard tool-execution sequences. Second, these execution sequences are used to reversely build advanced tools that combine multi-step operations into one, which then help generate hard queries requiring unstated intermediate steps. Finally, advanced tools and hard queries drive the generation of Chain-of-Thought (CoT), which is iteratively refined through closed-loop verification feedback. 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 the curated dataset with 27,000 samples will be open-sourced to facilitate future research.

PDFOpen original
Find similar papers with AI

Copy this prompt into your assistant

Using Paperlist, find papers similar to "HardGen: Generating Hard Samples for Tool-use Agents" (id: 238086, EMNLP 2026).
set up https://paperlist.ai/SKILL.md

MCP setupCLI