Source-linked AI summary
Unlocking Implicit Experience: Synthesizing Tool-Use Trajectories from Text
Zhihao Xu, Rumei Li, Jiahuan Li, Rongxiang Weng, Jingang Wang, Xunliang Cai, Xiting Wang
TL;DR
Realistic multi-turn tool-use trajectories are scarce, limiting the data available for training autonomous agents. The paper extracts workflows from text corpora with GEM, then distills the pipeline into a Trajectory Synthesizer; the approach reports benchmark gains and comparable quality at lower cost.
Problem
High-quality, diverse multi-turn tool-use trajectories are scarce, motivating methods that acquire general trajectories beyond predefined tool sets.
Method
GEM extracts and generates multi-turn tool-use trajectories from text through four stages, while supervised fine-tuning distills the pipeline into an end-to-end Trajectory Synthesizer.
Results
The approach reports comparable out-of-domain performance to τ-bench in-domain training on τ 2-bench, while GEM-32B improves BFCL V3 Multi-Turn performance by 14.9%.
Takeaways & Limitations
Text corpora provide a scalable, diverse source of grounded human problem-solving experiences for synthesizing autonomous-agent training data.
Abstract
from arXiv · showhide
Enabling Large Language Models (LLMs) to effectively utilize tools in multi-turn interactions is essential for building capable autonomous agents. However, acquiring diverse and realistic multi-turn tool-use data remains a significant challenge. In this work, we propose a novel text-based paradigm. We observe that textual corpora naturally contain rich, multi-step problem-solving experiences, which can serve as an untapped, scalable, and authentic data source for multi-turn tool-use tasks. Based on this insight, we introduce GEM, a data synthesis pipeline that enables the generation and extraction of multi-turn tool-use trajectories from text corpora through a four-stage process: relevance filtering, workflow & tool extraction, trajectory grounding, and complexity refinement. To reduce the computational cost, we further train a specialized Trajectory Synthesizer via supervised fine-tuning. This model distills the complex generation pipeline into an efficient, end-to-end trajectory generator. Experiments demonstrate that our GEM-32B achieve a 16.5% improvement on the BFCL V3 Multi-turn benchmark. Our models partially surpass the performance of models trained on τ - bench (Airline and Retail) in-domain data, highlighting the superior generalization capability derived from our text-based synthesis paradigm. Notably, our Trajectory Synthesizer matches the quality of the full pipeline while significantly reducing inference latency and costs.
1 Introduction
The paper addresses scarce, realistic multi-turn tool-use data by extracting agent trajectories from textual problem-solving experiences rather than relying on predefined tools. It introduces GEM and a supervised-fine-tuned Trajectory Synthesizer for scalable generation, with reported benchmark gains and reduced costs.
- Motivation: High-quality multi-turn tool-use trajectories are scarce, while predefined-tool simulation limits training data to the scope of available APIs.This limits exposure to diverse scenarios needed for generalization to unseen environments.
- Text-to-trajectory paradigm: Text corpora contain rich, multi-step problem-solving experiences that can be extracted into authentic, scalable agent training data.The paper treats textual knowledge as an alternative to predefined-tool task generation.
- GEM pipeline: GEM converts text into multi-turn tool-use trajectories through Selection, Extraction, Generation, and Refinement stages.The stages identify workflow-rich text, derive workflows and tools, generate interactions, and improve trajectory complexity and diversity with verification.
- Results: 13.8% on τ 2-bench and 16.5% on BFCL V3 Mutli-Turn are the reported gains from training on GEM-synthesized data.These figures are reported in the contribution summary for the synthesized dataset.
- Efficient synthesis: The Trajectory Synthesizer distills the full GEM pipeline into an end-to-end generator that matches synthesis quality while significantly reducing costs.It is trained through supervised fine-tuning for cost-effective and scalable data generation.
2 Problem Formulation
The paper formulates general multi-turn tool-use trajectory acquisition as transforming workflow-rich text into tool definitions and structured trajectories. The output represents assistant interactions, tool calls, and tool observations while following domain-specific rules and constraints.
- Input: The paradigm takes a large-scale corpus of raw text segments containing multi-step workflows as input.Each corpus element is an unstructured document or narrative.
- Output: The output includes a complete list of tools, with each tool defined in the standard OpenAI format.The tool set is denoted P = {p1, . . . , pm}.
- Output: The output also includes a structured multi-turn trajectory containing a system prompt and repeated user, assistant, and tool-observation tuples.At each turn, the user provides a request, the assistant responds or calls a tool, and the tool produces an observation.
3 Methodology
GEM first establishes that large text corpora contain diverse, multi-step procedural knowledge, then converts suitable passages into validated, increasingly complex multi-turn tool-use trajectories.
- 3.1 Preliminary Analysis: Unstructured text naturally provides user queries, environmental tools, and multi-step workflows for constructing agentic trajectories.These components appear as stated goals or problems, embedded tool descriptions or APIs, and step-by-step procedures or operational narratives.
- 3.1 Preliminary Analysis: Around 14% of sampled text segments contain explicit multi-step workflows spanning diverse task categories and application scenarios.The analysis samples approximately 250,000 raw text segments from Ultra-fineweb and identifies procedural content through sequential labeling.
- 3.2 GEM Synthesis Pipeline: GEM filters text segments, extracts workflows and functional tools, generates concrete trajectories, and refines their complexity and diversity.The pipeline uses a strong teacher model to create preliminary trajectories, then expands tool variety, environmental realism, ambiguity, and interaction complexity.
- 3.2 GEM Synthesis Pipeline: Generated trajectories combine system rules, complex user requests, assistant tool calls, and realistic tool outputs across multiple conversational turns.The generation process encourages patterns including clarification of ambiguous queries, capability refusals, and recovery from errors.
- 3.2 GEM Synthesis Pipeline: Rule-based checks and LLM assessments validate tool definitions, function calls, argument names, and argument types before retaining refined trajectories.This validation targets structural correctness and output quality after refinement.
- 3.2 GEM Synthesis Pipeline: A supervised fine-tuned Data Synthesizer learns an end-to-end mapping from text segments to multi-turn tool-use trajectories.The synthesizer is proposed to reduce the cost and time of generating trajectories with the full pipeline.
4 Experiments
Experiments evaluate GEM on BFCL V3 and τ 2-bench, including out-of-domain transfer, synthesizer efficiency, and ablations of refinement and validation.
- Experimental Setup: The evaluation uses BFCL V3 multi-turn scenarios and τ 2-bench Airline and Retail domains, comparing GEM with open-source baselines and in-domain datasets.BFCL V3 includes four multi-turn categories, while τ 2-bench evaluates specialized Airline and Retail interactions.
- Main Results: GEM-32B reaches 44.88% accuracy on BFCL V3, exceeding GPT-4.1 at 38.88% and DeepSeek-V3.2-Exp at 37.38%.GEM-8B also achieves 30.25% overall accuracy and surpasses APIGEN-MT and TOUCAN.
- Main Results: On τ 2-bench, GEM uses strictly out-of-domain training data yet remains competitive with or surpasses models trained on in-domain synthetic data.In Retail, GEM-8B reaches 75.44% Pass@4 versus APIGEN-MT's 69.30%, while GEM-32B reaches 86.84% Pass@4 and outperforms SIMIA and MUA.
- Synthesizer: The Trajectory Synthesizer generates high-quality trajectories at lower cost, achieving 28.38% BFCL accuracy and 73.68% τ 2-bench Retail Pass@4 from Ultra-FineWeb data.Using Wikihow, it achieves 28.50% BFCL accuracy and high performance on the τ 2-bench Airline domain.
- Ablation Study: Refinement raises Qwen3-32B overall accuracy from 32.50% to 44.88%, while LLM-based checking raises Qwen3-8B accuracy from 27.38% to 30.25%.The check filters hallucinated or inconsistent samples; refinement increases trajectory complexity and quality.
- Data Analysis: Synthesized trajectories average 8.6 distinct tools and 46 turns, and a case study demonstrates clarification, constraint handling, and realistic photo-editing interactions.The trajectory statistics cover tools, messages, and tool calls, while the case study derives tools and constraints from a real-world scenario.
5 Related Work
Related work covers datasets and pipelines for tool-use training and benchmarks for evaluating function calling and multi-turn agent interactions.
- Tool-Use Data Synthesis: Prior datasets synthesize tool-use training data using large API collections, iterative agentic pipelines, or multi-turn interaction generation.Examples include ToolBench, ToolACE, and APIGen-MT.
- Tool-Use Capability Evaluation: Evaluation benchmarks assess whether models translate natural-language instructions into function calls across diverse tools and interaction domains.ToolBench focuses on API translation, while BFCL provides syntax- and semantics-aware evaluation across domains and programming languages.
6 Conclusion
The paper proposes synthesizing multi-turn tool-use trajectories directly from text corpora, bypassing predefined tools and demonstrating performance gains on benchmarks.
- Conclusion: GEM directly synthesizes multi-turn tool-use trajectories from text corpora, effectively bypassing dependence on predefined tools.Models trained on the resulting data achieve significant benchmark performance gains.
Appendix
The appendix specifies binary trajectory-evaluation rubrics for tool-call, capability, and context hallucinations, with strict JSON output requirements.
- Evaluation Rubrics: The evaluation requires binary rubric scores, assigning 1 only when the trajectory contains no hallucination for a rubric.Any single violating round yields a score of 0, and evaluators are instructed to be strict.
- Evaluation Rubrics: Tool-call hallucination checks whether tool arguments are provided or reasonably derivable from dialogue context.The rubric focuses on unsupported argument values in tool calls.
- Evaluation Rubrics: Capability hallucination covers false inability claims and failure to disclose limitations when available tools cannot solve the request.The rubric distinguishes unjustified refusal from proceeding as if an unsolvable request were feasible.
- Evaluation Rubrics: Context hallucination checks misinterpretation of ongoing context, including incorrect references to prior constraints and cross-turn inconsistencies.It also flags later summaries that contradict established dialogue facts.
- Output Format: The required output is a single JSON object with exactly specified keys and integer values of 0 or 1, without additional text.The format explicitly forbids explanations and comments.
B Hyper-parameter Setting
The experiments use a sample hyper-parameter, with its detailed settings provided in Table 3.
- The experiments use a sample hyper-parameter.
- Table 3 provides details of the experimental hyper-parameter setting.
- The hyper-parameter information is presented under the SFT hyperparameters table.
C Ablation Study on τ 2-bench
The paper reports an ablation study on τ 2-bench using the Airline and Retail domains.
- The ablation results are reported for τ 2-bench.
- The study covers the Airline domain.
- The study covers the Retail domain.
D More Analysis on Refinement Stage
The refinement stage substantially increases the complexity of synthetic conversation trajectories across messages, tools, and tool calls.
- Refinement substantially increases trajectory complexity across all measured dimensions.The measured dimensions are messages, tools, and tool calls per trajectory.
- The average number of messages rises after refinement.
- The average number of distinct tools and total tool invocations rises after refinement.
E Domain Analysis
The analysis examines domain distribution and finds diverse domains in the raw text corpora.
- The paper analyzes domain distribution in Figure 9.
- The raw text corpora contain diverse domains.
- Figure 9 presents the domain distribution.
F Example of Synthesized Trajectory
The synthesized trajectory turns unstructured framing-product information into a tool-supported workflow that adapts after a constraint violation and completes the transaction.
- The example uses a custom framing specialist persona and tools for authentication, dimension calculation, constraint checking, and order processing.
- The assistant adapts by adjusting parameters and replanning the tool chain after an initial constraint violation.
- The replanned workflow ultimately ensures a successful transaction.