HardGen: Generating Hard Samples for Tool-use Agents

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.
Anthology ID:
2026.emnlp-main.285
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
6520–6546
Language:
URL:
https://aclanthology.org/2026.emnlp-main.285/
DOI:
Bibkey:
Cite (ACL):
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, and Ji Zhang. 2026. HardGen: Generating Hard Samples for Tool-use Agents. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 6520–6546, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
HardGen: Generating Hard Samples for Tool-use Agents (Hao et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.285.pdf