From Failure to Mastery: Generating Hard Samples for Tool-use Agents
On the map: LLM agents and tool use → Tool learning and function calling
Abstract (arXiv)
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.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 16 of its 25 references that are in the map. First posted on arXiv 4 Jan 2026.
Builds on
16 of 25 references.
Closest ancestors · 1
Same direction, newest first
- 2025TTPA: Token-level Tool-use Preference Alignment Training Framework with Fine-grained Evaluation26 May
Other references · 15
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 1,980
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
- 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,134
- 2025ToolRL: Reward is All Tool Learning Needscited by 342
- 2025APIGen-MT: Agentic Pipeline for Multi-Turn Data Generation via Simulated Agent-Human Interplaycited by 158
- 2025Nemotron-Research-Tool-N1: Exploring Tool-Using Language Models with Reinforced Reasoningcited by 67
- 2024Simulating Financial Market via Large Language Model based Agentscited by 25
- 2025Can a Single Model Master Both Multi-turn Conversations and Tool Use? CoALM: A Unified Conversational Agentic Language Modelcited by 20
- 2025LoopTool: Closing the Data-Training Loop for Robust LLM Tool Callscited by 16
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systemscited by 15
- 2025An Empirical Study of Agent Developer Practices in AI Agent Frameworkscited by 14
Built on by
Citing papers per year: 2026: 8.
8 papers.
- 2026EnvFactory: Scaling Tool-Use Agents via Executable Environments Synthesis and Robust RLcited by 11
- 2026SEAL: Synergistic Co-Evolution of Agents and Learning Environmentscited by 9
- 2026PACE: Prefix-Protected and Difficulty-Aware Compression for Efficient Reasoningcited by 2
- 2026Execution-First Synthetic Tool-Use Trace Generation for LLM Agentscited by 1
- 2026OctoLong: Mid-Training On Cross-Repository Code Contexts Enhances Long-Context Modelingcited by 1
- 2026Hybrid Inspection and Task-Based Access Control in Zero-Trust Agentic AIcited by 0
- 2026SAP: State-Guided Data Synthesis with Argument Provenance for Multi-Turn Tool Usecited by 0
- 2026V-Gym: Enhancing Agentic Visual Reasoning via Skill-Data Co-Evolutioncited by 0
- 2026V-Gym: Enhancing Agentic Visual Reasoning via Skill-Data Co-Evolution28 Sep 2026
- 2026SAP: State-Guided Data Synthesis with Argument Provenance for Multi-Turn Tool Use5 Sep 2026
- 2026OctoLong: Mid-Training On Cross-Repository Code Contexts Enhances Long-Context Modeling5 Aug 2026
- 2026Execution-First Synthetic Tool-Use Trace Generation for LLM Agents31 Jul 2026
- 2026SEAL: Synergistic Co-Evolution of Agents and Learning Environments23 May 2026
- 2026EnvFactory: Scaling Tool-Use Agents via Executable Environments Synthesis and Robust RL18 May 2026
- 2026Hybrid Inspection and Task-Based Access Control in Zero-Trust Agentic AI4 May 2026
- 2026PACE: Prefix-Protected and Difficulty-Aware Compression for Efficient Reasoning12 Feb 2026
Similar, not cited
Close in wording, no citation either way
- 2026AgentEscapeBench: Evaluating Out-of-Domain Tool-Grounded Reasoning in LLM Agents
- 2026AgentJudgeBench: A Multi-Difficulty Benchmark for Evaluating LLM Judges on Agentic Tool-Calling
- 2026TraceCompiler: Skill-Guided Mining and Compilation of LLM Agent Traces into Mostly Deterministic Workflows
- 2026EDGEGEN: Improving Tool-Calling Agents Beyond Happy Paths with Synthetic Edge Case Generation
- 2026AgentProcessBench: Diagnosing Step-Level Process Quality in Tool-Using Agents
- 2026Learning to Rewrite Tool Descriptions for Reliable LLM-Agent Tool Use
- 2026SkillGym: Training Skill-Use Agents with Automatic Verifiable Environment Generation
- 2025ToolFuzz -- Automated Agent Tool Testing