Google Research has introduced ToolGrad, an answer-first framework designed to improve the generation of tool-use data for large language models. Unlike previous query-first methods like ToolBench or ToolACE, which rely on inefficient depth-first search agents, ToolGrad reverses the process by executing API chains first and then generating matching user queries.

This approach ensures that every generated sample includes a verified API workflow, significantly reducing computational waste. The framework requires only a single LLM call to annotate the chain. In testing, the system achieved a 99.8% pass rate, with failures occurring only when an agent could not obtain a successful response from selected APIs across all iterations.

The research team released the ToolGrad-500 dataset, created using Gemini 2.5 Flash-Lite, and utilized it to post-train Gemma-3 models with 1B, 4B, and 12B parameters. Evaluation was conducted on the Berkeley Function Calling Leaderboard, testing the models against unseen tools to verify performance in out-of-distribution scenarios.

The project is open-source under the Apache-2.0 license. Developers can access the models and dataset on Hugging Face, or utilize the available PyPI package. Reproduction scripts support BFCL V1 and V2, with inference verified on a single NVIDIA A100 40GB GPU within a vLLM Docker environment.