Research

ToolGrad: Efficient Tool-use Dataset Generation with Textual “Gradients”

Generate the successful tool-use workflow first, then synthesize the user query around it.

Zhongyi Zhou, Kohei Uehara, Haoyu Zhang, Jingtao Zhou, Lin Gu, Ruofei Du, Zheng Xu, Tatsuya HaradaJun 17, 2026Findings of ACL 202610 min readGoogle; The University of Tokyo; RIKEN AIP; Tohoku University
TRENDINGAI AgentsIntermediate

Key takeaway

ToolGrad uses proposer, executor, selector, and updater modules to build verified API workflows; its ToolGrad-500 dataset reaches a 99.8% generation pass rate and trains compact Gemma-3 models that perform strongly on tool-use benchmarks.

Updated on Oct 2, 2026

01

Abstract

ToolGrad reverses the conventional tool-use data-generation direction: it first constructs a verified API workflow, then synthesizes a coherent user query and response around that executable artifact. This reduces wasted search and produces richer tool-use trajectories.

02

Introduction

Tool-use datasets are expensive because conventional generation starts with a query and must discover a valid API execution path. ToolGrad instead conditions query generation on a concrete successful workflow.

03

Problem

Query-first generation can fail while searching for executable API chains, waste tool calls, and favor short trajectories. The challenge is to generate diverse, valid, and coherent multi-step tool-use examples efficiently.

04

Background

ToolGrad connects synthetic data generation, API planning, executable workflow verification, and textual feedback. Its “textual gradient” terminology describes discrete selection from execution evidence rather than a numerical gradient.

05

Methodology

Each iteration proposes candidate APIs, executes them in parallel, selects the most valuable API and chain extension, and updates the workflow. Once the workflow is established, an LLM regenerates the query and response so the complete sample remains coherent.

Figure 1

ToolGrad answer-first generation

Official Google Research figure contrasting query-first tool search with ToolGrad API mini-batch construction.

Google Research ToolGrad official project article

Figure 2

ToolGrad workflow

Official figure showing proposer, executor, selector, and updater stages.

Google Research ToolGrad official project article

Figure 3

Generation efficiency comparison

Original result table comparing DFS and ToolGrad generation efficiency.

Google Research ToolGrad official project article

Formula notes

Mathematical details

ToolGrad dataset representation

Equation
D={(q,W,r)}\mathcal{D}=\{(q,\mathcal{W},r)\}

A training sample contains a user query q, an API workflow W, and a response r.

W
-API workflow composed of chains
q
-user query
r
-response conditioned on the workflow

API proposal

Equation
{(APIi,insti)}i=0i<m=LLMpr({API}bs;Wt)\{(\texttt{API}_i,\texttt{inst}_i)\}_{i=0}^{i<m}=\texttt{LLM}_{pr}(\{\texttt{API}\}^{bs};\mathcal{W}_t)

The proposer filters a random API mini-batch into at most m candidates for extending the current workflow.

m
-maximum number of API proposals
bs
-API mini-batch size
W_t
-current workflow

API selection

Equation
j=arg⁡max⁡iV({repi}m,Wt)j=\arg\max_i V(\{\mathrm{rep}_i\}^m,\mathcal{W}_t)

The selector chooses the API with the highest hypothetical value based on execution reports and the current workflow; in practice an LLM acts as the proxy for V.

V
-hypothetical value function
j
-selected API index
rep_i
-execution report for candidate i

06

Architecture

The generation loop contains API Proposer, parallel API Executors, API Selector, and Workflow Updater. The final artifact is a user query, verified API workflow, and response.

07

Dataset

The work generates tool-use data from a large API library and evaluates models fine-tuned on ToolGrad-500 against ToolBench and BFCL.

08

Training

ToolGrad is a data-generation method rather than a new foundation-model training algorithm. Generated ToolGrad data is subsequently used to fine-tune tool-using models.

09

Experiments

The authors compare ToolGrad against DFS-based ToolBench generation and evaluate ToolGrad-500 fine-tuned models on ToolBench and BFCL. Generation is assessed with pass rate, ground-truth tool uses, LLM cost, and tool cost.

10

Baselines

DFS-based ToolBench generation is the primary data-generation baseline, while ToolBench and BFCL provide evaluation baselines for tool-use quality.

11

Results

The reported findings indicate that reverse workflow construction can generate valid multi-step tool-use data more efficiently while retaining useful diversity and producing improvements on downstream tool-use evaluations.

12

Ablation

API proposal, parallel execution, API selection, and workflow updating are the principal components. Their roles can be separated by measuring generation success, cost, trajectory length, and downstream tool-use quality.

13

Limitations

Generated quality depends on the API library and execution environment. Synthetic workflows can inherit tool-coverage biases, and downstream gains depend on how representative generated tasks are of real tool use.

14

Conclusion

ToolGrad demonstrates a reverse-annotation strategy: build the executable tool workflow first, then generate the natural-language interaction around verified behavior.

Continue reading

Related research

Browse all research
Machinoai Logo
Machinoai

Your edge in the AI era. Deep dives into machine learning concepts, paper explainers, verified industry jobs, and developer tools.

© 2026 Machinoai. All rights reserved.