HeadlinesBriefing favicon HeadlinesBriefing.com

ToolGrad:高效的工具使用数据集生成

Google AI Blog •
×

AI agents require datasets of tool-use chains to learn real-world task automation. Prior methods used query-first approaches with depth-first search (DFS) agents to generate synthetic data, but this is inefficient due to complex exploration. In "ToolGrad: Efficient Tool-use Dataset Generation with Textual 'Gradients'", presented at ACL 2026, researchers introduce an answer-first paradigm: generate a ground-truth tool-use chain first, then annotate its corresponding user prompt.

This reduces ambiguity and requires only one LLM step per sample. ToolGrad adapts the concept of textual gradients—originally used in prompt engineering—to iteratively construct valid API workflows. The framework includes four modules: API Proposer (narrows candidates), API Executors (test APIs in parallel), API Selector (chooses best API via textual gradient feedback), and LLM Updater (refines synthetic query and response).

Experiments using Tool Bench's 16k+ real-world APIs show ToolGrad generates more complex, long-horizon tool-use data with higher pass rates and lower cost than DFS-based methods. LLMs trained on ToolGrad data outperform baseline-trained models and match proprietary LLMs on out-of-distribution (OOD) datasets with unseen tools, demonstrating superior generalization and efficiency in synthetic data generation for agentic AI.