SAP: State-Guided Data Synthesis with Argument Provenance for Multi-Turn Tool Use

arXiv cs.AI Papers

Summary

The paper proposes State-Guided Data Synthesis with Argument Provenance (SAP) to improve the synthesis of multi-turn tool-use data for training agentic models, and introduces SAP-4B, which performs competitively with larger models.

arXiv:2609.06124v1 Announce Type: new Abstract: High-quality multi-turn tool-use data is essential for training agentic models, yet existing data synthesis methods often underrepresent the argument-level dependencies that are critical to long-horizon tool use. As a result, even when a model selects the correct tool, task execution may still fail because the model fills tool arguments with fabricated, stale, or weakly grounded values. To address this problem, we propose \textbf{State-Guided Data Synthesis with Argument Provenance (SAP)}. SAP combines state guidance, tool-argument provenance constraints, and turn-level validation to efficiently construct tool-use trajectories with long-range dependencies and high accuracy. Using data generated by SAP, we build SAP-4B, which is highly competitive even when compared with much larger models across multiple benchmarks. Source code, synthesized data, and trained weights are available at https://github.com/Zichen1024/SAP.
Original Article
View Cached Full Text

Cached at: 09/10/26, 08:46 AM

# State-Guided Data Synthesis with Argument Provenance for Multi-Turn Tool Use
Source: [https://arxiv.org/html/2609.06124](https://arxiv.org/html/2609.06124)
Jinpeng Chen††thanks:Project leadAffiliation:Independent ResearcherEmail:[jinpeng\.chen@my\.cityu\.edu\.hk](mailto:)Cheng GongAffiliation:Huawei ResearchEmail:[liu\.rui2@huawei\.com](mailto:)Suiyun ZhangAffiliation:Huawei ResearchRui Liu††thanks:Corresponding author\.Affiliation:Huawei Research

###### Abstract

High\-quality multi\-turn tool\-use data is essential for training agentic models, yet existing data synthesis methods often underrepresent the argument\-level dependencies that are critical to long\-horizon tool use\. As a result, even when a model selects the correct tool, task execution may still fail because the model fills tool arguments with fabricated, stale, or weakly grounded values\. To address this problem, we proposeState\-Guided Data Synthesis with Argument Provenance \(SAP\)\.SAPcombines state guidance, tool\-argument provenance constraints, and turn\-level validation to efficiently construct tool\-use trajectories with long\-range dependencies and high accuracy\. Using data generated bySAP, we buildSAP\-4B, which is highly competitive even when compared with much larger models across multiple benchmarks\. Source code, synthesized data, and trained weights are available at[https://github\.com/Zichen1024/SAP](https://github.com/Zichen1024/SAP)\.

## 1Introduction

Tool use is the primary interface through which large language models \(LLMs\) interact with the real world\([Patil et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib2);[Yao et al\., 2024](https://arxiv.org/html/2609.06124#bib.bib3);[Barres et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib4)\)\. As LLMs are deployed in long\-horizon agentic systems, multi\-turn tool use becomes a key axis of agent capability; yet the complexity of state evolution, tool feedback, and cross\-turn dependencies makes high\-quality multi\-turn trajectories scarce, a major bottleneck for training agentic models\([Rabinovich and Anaby\-Tavor, 2025](https://arxiv.org/html/2609.06124#bib.bib5);[Zhang et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib16);[Prabhakar et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib6)\)\.

Figure 1:Argument\-dependency statistics on representative open\-source multi\-turn tool\-use training sets and ours\.*Mean Chain Len\.*and*Max Chain Len\.*denote the mean and maximum lengths of argument\-value propagation chains across turns;*Dep\. Args \(%\)*denotes the proportion of arguments involved in cross\-turn dependencies\.In practice, many multi\-turn failures arise not from choosing the wrong tool, but from incorrectly specified tool arguments\([Rabinovich and Anaby\-Tavor, 2025](https://arxiv.org/html/2609.06124#bib.bib5)\)\. Yet existing data\-synthesis work mostly focuses on tool\-selection dependencies: MAGNET\([Yin et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib9)\)and FunReason\-MT\([Xu et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib7)\), for example, use pre\-built tool dependency graphs to ensure tool\-sequence validity, while cross\-turn dependencies among tool arguments are largely overlooked\. Such dependencies are ubiquitous; arguments typically come from the initial environment state, prior tool\-call returns, or earlier user messages, and when underrepresented in training data, the resulting models fabricate upstream references, reuse stale user inputs, or hallucinate substitutes when an upstream call fails\. To quantify this gap, we measure the length of cross\-turn argument\-value propagation chains and the proportion of arguments involved in such dependencies, and find that existing open\-source training datasets\([Liu et al\., 2024](https://arxiv.org/html/2609.06124#bib.bib13);[Prabhakar et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib6)\)are consistently shallow on both,111Sample sizes for the statistics in Figure[1](https://arxiv.org/html/2609.06124#S1.F1): ToolACE 11k, APIGen\-MT 5k,SAP\(Ours\) 9k\.leaving models prone to errors in complex multi\-turn tasks\([Rabinovich and Anaby\-Tavor, 2025](https://arxiv.org/html/2609.06124#bib.bib5)\)\.

Beyond provenance, existing methods also face a hard trade\-off between trajectory accuracy and generation cost\. Two paradigms currently dominate\.Intent\-Firstmethods\([Qin et al\., 2024](https://arxiv.org/html/2609.06124#bib.bib12);[Prabhakar et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib6);[Xu et al\., 2025b](https://arxiv.org/html/2609.06124#bib.bib10);[Zeng et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib14);[Chen et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib36);[Xu et al\., 2026b](https://arxiv.org/html/2609.06124#bib.bib11)\)draft user intents first and expand dialogues and tool calls post hoc; their validation typically combines rule\-based blueprint checks \(schema, types, executability\) with LLM committee review\. Owing to the limited reliability of the underlying LLMs, this validation cannot fully guarantee accuracy, and a single failed check often discards the entire trajectory even when it contains locally correct sub\-sequences\.Trace\-Firstmethods\([Yin et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib9);[Xu et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib7);[Hao et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib8)\)sample executable trajectories over a tool\-dependency graph and derive user\-side queries from those traces; this gives strong executability guarantees but couples the graph to the source tool ecosystem, making migration to new domains costly\.

To address these issues, we proposeState\-Guided Data Synthesis with Argument Provenance \(SAP\)\. Given a toolset and its documentation,SAPdynamically constructs a Finite State Machine \(FSM\) whose edges already carry per\-argument provenance tags; it then samples state\-transition trajectories from the FSM and fills tool arguments turn by turn\. Arguments that depend on prior context are validated against the executed history, and each tool call is executed immediately after generation\. If a call fails, only the offending call is retried rather than discarding the trajectory\. Once the call sequence is fixed and verified, the framework generates the corresponding natural\-language user and assistant messages\. By combining state\-transition guidance, parameter\-provenance awareness, and immediate tool\-call validation,SAPjointly supports executability, causal consistency of arguments, and cross\-domain scalability, achieving both high quality and efficiency\.

Using data synthesized bySAP, we trainSAP\-4B, which achieves competitive results on both BFCL v4 multi\-turn\([Patil et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib2)\)andτ2\\tau^\{2\}\-bench Retail/Airline\([Barres et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib4)\)\. To support future research, the synthesis code, synthesized data, and trained weights are publicly available at[https://github\.com/Zichen1024/SAP](https://github.com/Zichen1024/SAP)\. Our main contributions are as follows:

- •We introduce argument\-provenance diagnostics for multi\-turn tool\-use data, showing that existing open\-source data contain shallow dependency chains and few arguments that depend on previous turns, limiting their support for learning long\-range argument tracking\.
- •We proposeSAP, a state\-guided synthesis framework that dynamically builds an FSM from tool documentation, treats argument provenance as an explicit constraint, and validates tool calls turn by turn, enabling the efficient construction of multi\-turn tool\-use data with strong causal dependencies and high correctness\.
- •We show thatSAP\-4B achieves competitive results on both BFCL v4 multi\-turn andτ2\\tau^\{2\}\-bench; ablation studies further confirm the importance of each component\.

## 2Related Work

#### Multi\-turn tool\-use data synthesis\.

High\-quality multi\-turn trajectory synthesis is a principal bottleneck for tool\-augmented LLMs\([Patil et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib2);[Yao et al\., 2024](https://arxiv.org/html/2609.06124#bib.bib3);[Barres et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib4);[Prabhakar et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib6);[Xu et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib7);[Guan et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib37);[Hao et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib8);[Li et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib21);[Xu et al\., 2026a](https://arxiv.org/html/2609.06124#bib.bib22);[Chai et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib38);[Su et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib20)\)\. Theintent\-firstparadigm starts from user intent and expands tool invocations post hoc, instantiated as DFS planning over a large API pool\([Qin et al\., 2024](https://arxiv.org/html/2609.06124#bib.bib12)\), structured blueprints validated by rule\-based checks and LLM committees\([Prabhakar et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib6)\), non\-autoregressive skeletons with mask\-and\-fill refinement\([Zeng et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib14)\), graph\-sampled planned generation for dialogue coherence\([Wang et al\., 2025b](https://arxiv.org/html/2609.06124#bib.bib31)\), user\-side intent modeling at scale\([Cho et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib35)\), scaling tool\-use synthesis from real\-world MCP environments\([Xu et al\., 2025b](https://arxiv.org/html/2609.06124#bib.bib10)\), or distillation of implicit tool\-use intents from raw text\([Xu et al\., 2026b](https://arxiv.org/html/2609.06124#bib.bib11)\)\. Thetrace\-firstparadigm samples executable traces over a tool dependency graph \(hand\-curated, signature\-derived, or execution\-evolved\) and derives user queries conditioned on those traces\([Yin et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib9);[Xu et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib7);[Hao et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib8);[Tian et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib33)\)\. A recent line of*provenance\-aware planning*, exemplified by ToolWeave\([Khandelwal et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib15)\), constructs tools with built\-in dependencies and tracks parameter provenance at plan time to reduce argument hallucination\.

In contrast,SAPextends the type system to five categories \(PiP\_\{i\},PoP\_\{o\},PcP\_\{c\},PuP\_\{u\}, plus the runtime\-onlyPfP\_\{f\}\) and requires every declared source to be resolved against the executor state prior to binding, with no pre\-built or evolved dependency graph, enforcing argument\-level causal consistency at synthesis time rather than post hoc\. Along a similar line, ToolMind\([Yang et al\., 2025b](https://arxiv.org/html/2609.06124#bib.bib29)\)applies per\-turn filtering after generation to catch errors that propagate across turns, whereasSAPlifts the check from a post\-hoc filter into a synthesis\-time constraint\. InfTool\([Li et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib21)\)co\-evolves synthesized data and the trained model via outer\-loop GRPO, whereasSAPkeeps the executor loop within a single synthesis pass and produces fixed SFT data\.

#### Multi\-turn tool\-use benchmarks\.

Several benchmarks target multi\-turn tool use\. BFCL v4\([Patil et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib2)\)is among the most widely adopted; its multi\-turn track is partitioned into base, long\-context, miss\-param, and miss\-func subsets that probe distinct capabilities\. Theτ\\tau\-bench family\([Yao et al\., 2024](https://arxiv.org/html/2609.06124#bib.bib3);[Barres et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib4)\)constructs state\-aware Retail/Airline dialogues, requiring the agent to maintain a coherent world state under an LLM\-simulated user over long horizons\. ToolDial\([Shim et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib32)\)and DialogTool\([Wang et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib34)\)provide complementary multi\-turn / stateful tool\-use datasets\.[Rabinovich and Anaby\-Tavor \(2025\)](https://arxiv.org/html/2609.06124#bib.bib5)expose the fragility of function calling under distribution shift, and[Zhang et al\. \(2025\)](https://arxiv.org/html/2609.06124#bib.bib16)survey multi\-turn LLM interactions more broadly\.

![Refer to caption](https://arxiv.org/html/2609.06124v1/image/main.png)Figure 2:Overview of theSAPpipeline\. From left to right,𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}constructs an FSM from tool documentation and sampled initial states, and the pipeline samples a state trajectory from it\.𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}fills the tagged callsTool⁡\(tag\)\\mathrm\{Tool\}\(\\mathrm\{tag\}\)with concrete parameters, yieldingTool⁡\(p\)\\mathrm\{Tool\}\(p\), and executes them withε\\varepsilon, using environment rollback and local retry on failure\. Finally,𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}synthesizes the messages for the validated trajectory, which is filtered into the final data\. Each argument is assigned a provenance source from\{Pi,Po,Pc,Pu,Pf\}\\\{P\_\{i\},P\_\{o\},P\_\{c\},P\_\{u\},P\_\{f\}\\\}\.

## 3Preliminaries

### 3\.1Task Definition

We formalize multi\-turn tool\-use data synthesis as aPartially Observable Markov Decision Process \(POMDP\), defined by the tupleℳ=\(S,A,O,T\)\\mathcal\{M\}=\(S,A,O,T\), whereSSis the latent environment state space \(the world state of the tool\-execution environment, e\.g\., database contents or session context\);A=Atool∪ArespA=A\_\{\\text\{tool\}\}\\cup A\_\{\\text\{resp\}\}is the action space, withAtoolA\_\{\\text\{tool\}\}covering tool invocations andArespA\_\{\\text\{resp\}\}covering natural\-language responses;OOis the observation space, comprising tool returnsr∈ℛr\\in\\mathcal\{R\}and user messagesuu; andT⁡\(st\+1∣st,at\)T\(s\_\{t\+1\}\\mid s\_\{t\},a\_\{t\}\)is the stochastic transition function, realized by a grounded executorε\\varepsilon\. A trajectoryτ=\[\(o1,a1\),…,\(oT,aT\)\]\\tau=\[\(o\_\{1\},a\_\{1\}\),\\ldots,\(o\_\{T\},a\_\{T\}\)\]records the full sequence of observation\-action pairs\. Because the agent cannot directly read the latent environment statess, it must ground arguments onc0c\_\{0\}\(accessed indirectly through read\-only tool returns or values relayed via user messages\), prior tool\-call returnsrr, or earlier user messagesuu\. The synthesis goal is to produce a dataset𝒟=\{\(c0\(i\),U\(i\),G​T\(i\)\)\}i\\mathcal\{D\}=\\\{\(c\_\{0\}^\{\(i\)\},U^\{\(i\)\},GT^\{\(i\)\}\)\\\}\_\{i\}, whereU\(i\)=\(uk\(i\)\)kU^\{\(i\)\}=\(u\_\{k\}^\{\(i\)\}\)\_\{k\}is the per\-turn user\-message sequence, such that every argument valuevvcarries an explicitly declared, executor\-verifiable causal source\.

### 3\.2FSM Definition

While the POMDP above captures the full environment dynamics \(tool\-execution state, returns, user messages\), the FSM abstracts over it at the dialogue\-phase level: each FSM state represents a recognizable phase of the interaction rather than a concrete environment configuration\.SAPmodels this high\-level dialogue structure as aFinite State Machine \(FSM\):

ℱ=\(Σ,σ0,Σf,Δ\),\\mathcal\{F\}=\(\\Sigma,\\sigma\_\{0\},\\Sigma\_\{f\},\\Delta\),\(1\)whereΣ\\Sigmais a set of*dialogue\-phase*states, each instantiating one type of a predefined, domain\-agnostic state\-type taxonomy \(Appendix[A\.1](https://arxiv.org/html/2609.06124#A1.SS1)\),σ0∈Σ\\sigma\_\{0\}\\in\\Sigmathe initial state,Σf⊆Σ\\Sigma\_\{f\}\\subseteq\\Sigmathe set of accepting terminal states, andΔ\\Deltathe set of directed transition edges\. The taxonomy is fixed across domains, while the concrete states and edges ofℱ\\mathcal\{F\}are generated per toolset at synthesis time\.

#### States\.

Eachσ∈Σ\\sigma\\in\\Sigmadescribes a*phase*of the user–agent interaction, rather than a tool\-level execution dependency\. For instance,Σ\\Sigmaincludes:σinit\\sigma\_\{\\text\{init\}\}\(session opened\),σlogged\_in\\sigma\_\{\\text\{logged\\\_in\}\}\(user authenticated\) andσsearch\_done\\sigma\_\{\\text\{search\\\_done\}\}\(search results retrieved\)\.

#### Edges\.

Each edgeδ=\(σ,𝒞δ,σ′,𝒯δ\)∈Δ\\delta=\(\\sigma,\\mathcal\{C\}\_\{\\delta\},\\sigma^\{\\prime\},\\mathcal\{T\}\_\{\\delta\}\)\\in\\Deltaencodes one dialogue turn:𝒞δ=\[t1,…,tm\]\\mathcal\{C\}\_\{\\delta\}=\[t\_\{1\},\\dots,t\_\{m\}\]is the ordered tool list, and𝒯δ\\mathcal\{T\}\_\{\\delta\}is a Provenance Tag map that assigns to every argument a declared causal source from the type system of §[3\.3](https://arxiv.org/html/2609.06124#S3.SS3)\. The first edgeδ0\\delta\_\{0\}\(fromσ0\\sigma\_\{0\}\) may only declarePiP\_\{i\}orPcP\_\{c\}sources, since no prior turns exist to reference\.

#### Extensibility\.

Unlike trace\-first methods that rely on a hand\-curated or signature\-derived tool\-dependency graph, the FSM here is constructed by𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}at synthesis time by matching each tool in the documentation to the predefined dialogue\-phase state types it transitions between, without manually specifying pairwise tool dependencies; a new toolset simply triggers automatic rebuilding from its updated documentation\.

### 3\.3Provenance Tag Type System

For every argumentppin a tool call, its causal source satisfies:

src⁡\(p\)∈\{Pi,Po​\(k′,j′,f′\),Pc,Pu​\(k′′\),Pf​\(s0\)\}\.\\mathrm\{src\}\(p\)\\in\\\\ \\quad\\\{P\_\{i\},\\;P\_\{o\}\(k^\{\\prime\},j^\{\\prime\},f^\{\\prime\}\),\\;P\_\{c\},\\;P\_\{u\}\(k^\{\\prime\\prime\}\),\\;P\_\{f\}\(s\_\{0\}\)\\\}\.\(2\)Table[1](https://arxiv.org/html/2609.06124#S3.T1)summarizes the semantics\. The four design\-time types form𝒮decl=\{Pi,Po,Pc,Pu\}\\mathcal\{S\}\_\{\\text\{decl\}\}=\\\{P\_\{i\},\\;P\_\{o\},\\;P\_\{c\},\\;P\_\{u\}\\\}, which𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}declares for each turn;PfP\_\{f\}is excluded from𝒮decl\\mathcal\{S\}\_\{\\text\{decl\}\}and is produced only by𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}at runtime when a declared sources0∈\{Pi,Po,Pu\}s\_\{0\}\\in\\\{P\_\{i\},P\_\{o\},P\_\{u\}\\\}turns out to be unusable\. The planner then recovers the argument from another available initial\-state value \(PiP\_\{i\}\) or a newly introduced user\-side value \(PcP\_\{c\}\) when permitted\. The resulting call is executor\-validated after binding\. In all cases, the original declared sources0s\_\{0\}is preserved infallback\_from\. ThePfP\_\{f\}rate probes how faithfully𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}honors the declared sources; see App\.[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)\.

Table 1:Provenance Tag categories\.PiP\_\{i\}throughPuP\_\{u\}are declarable by𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}at design time;PfP\_\{f\}is produced only by𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}at runtime\. Parametrized forms \(Po​\(k′,j′,f′\)P\_\{o\}\(k^\{\\prime\},j^\{\\prime\},f^\{\\prime\}\),Pu​\(k′′\)P\_\{u\}\(k^\{\\prime\\prime\}\),Pf​\(s0\)P\_\{f\}\(s\_\{0\}\)\) are used only in the definition of §[3\.3](https://arxiv.org/html/2609.06124#S3.SS3)\.
### 3\.4Argument Dependency Graph

Given a trajectory, we build a directed graph𝒢=\(V,E\)\\mathcal\{G\}=\(V,E\)over its tool\-call arguments\. Each nodev∈Vv\\in Vis one argument\-slot binding, a parameter consumed by some tool call at some turn\. An edge\(u,v\)∈E\(u,v\)\\in Emeans thatvv’s bound value is reused from an earlier occurrenceuuof the*same*value instance, whereuuis the upstream source of that value \(which may be a field of a prior tool\-call return, or a value the user first supplied in an earlier user message\)\.

For each argumentv∈Vv\\in V, letturn⁡\(v\)\\mathrm\{turn\}\(v\)be the turn in whichvvis consumed andorigin⁡\(v\)\\mathrm\{origin\}\(v\)be the turn in which the value carried byvvfirst entered the dialogue \(via a user message or an earlier tool return\)\. Initial\-state values enter the dialogue in the turn that consumes them, so for themorigin⁡\(v\)=turn⁡\(v\)\\mathrm\{origin\}\(v\)=\\mathrm\{turn\}\(v\)\. The chain length ofvv, the mean chain length, and the longest chain over the trajectory are

L⁡\(v\)=turn⁡\(v\)−origin⁡\(v\),L¯=1\|V\|∑v∈VL\(v\),L⋆=maxv∈VL\(v\),\\begin\{gathered\}L\(v\)=\\mathrm\{turn\}\(v\)\-\\mathrm\{origin\}\(v\),\\\\ \\bar\{L\}=\\tfrac\{1\}\{\|V\|\}\\sum\_\{v\\in V\}L\(v\),\\quad L^\{\\star\}=\\max\_\{v\\in V\}L\(v\),\\end\{gathered\}\(3\)i\.e\.,L⁡\(v\)L\(v\)counts how many turn boundaries the value crosses before reaching its consumption point\. For example, an argument consumed at turn 3 whose value was first introduced at turn 1 hasL=2L=2\. We callvva*dependent argument*whenL⁡\(v\)≥1L\(v\)\\geq 1; in provenance\-tag terms \(§[3\.3](https://arxiv.org/html/2609.06124#S3.SS3)\), arguments withPiP\_\{i\},PcP\_\{c\}, orPfP\_\{f\}sources always haveL⁡\(v\)=0L\(v\)=0\(their value is introduced in the consuming turn itself\), whilePoP\_\{o\}andPuP\_\{u\}are the two sources of cross\-turn dependencies\. The fraction of dependent arguments inVVis a breadth\-style measure of cross\-turn grounding, complementary to chain length\.

## 4Method

### 4\.1Overview

SAPcasts multi\-turn tool\-use data synthesis as a closed loop in which three specialized LLM agents cooperate with one executor \(Figure[2](https://arxiv.org/html/2609.06124#S2.F2)\)\.𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}synthesizes a provenance\-annotated FSM tool\-call skeleton from the raw tool documentation\.𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}then fills, for each call, the executor\-bound arguments𝜽exec\\boldsymbol\{\\theta\}^\{\\text\{exec\}\}and per\-argument provenance metadata𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}, dispatches the call toε\\varepsilon, and groups same\-turn calls into parallel step groups\. After the call sequence is verified,𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}synthesizes the trajectory’s textual messages\. The pipeline enforces aProvenance Invariant: before any argument valuevvis committed, its causal sourcesrc⁡\(v\)\\mathrm\{src\}\(v\)must be explicitly declared, and for the three upstream\-grounded types \(PiP\_\{i\},PoP\_\{o\},PuP\_\{u\}\) the referenced upstream must exist or be pre\-registered at synthesis time\. The two ungrounded types \(PcP\_\{c\},PfP\_\{f\}\) are still logged in𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}so every value remains evaluable\. This shifts cross\-turn argument dependencies from a passively emerging side\-effect into an explicitly planned property validated turn by turn\.

### 4\.2𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}: FSM Skeleton Synthesis

𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}synthesizes the FSMℱ\\mathcal\{F\}of §[3\.2](https://arxiv.org/html/2609.06124#S3.SS2)from the summarized tool documentation𝒯~\\widetilde\{\\mathcal\{T\}\}for the tool set𝒯\\mathcal\{T\}and the initial\-state summaryc~0\\widetilde\{c\}\_\{0\}\. For each edgeδ\\delta, it commits an ordered tool list𝒞δ=\[t1,…,tm\]\\mathcal\{C\}\_\{\\delta\}=\[t\_\{1\},\\dots,t\_\{m\}\]for the corresponding turn and a Provenance Tag map𝒯δ\\mathcal\{T\}\_\{\\delta\}assigning every required argument a tag from𝒮decl\\mathcal\{S\}\_\{\\text\{decl\}\}\(Table[1](https://arxiv.org/html/2609.06124#S3.T1)\)\. A lightweight verifier𝒱spec\\mathcal\{V\}\_\{\\text\{spec\}\}runs structural checks on the output and triggers regeneration \(Appendix[A\.2](https://arxiv.org/html/2609.06124#A1.SS2)\)\.

### 4\.3𝒜plan\+ε\\mathcal\{A\}\_\{\\text\{plan\}\}\+\\varepsilon: Tool\-Call Planning and Execution

𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}takes the skeletonℱ\\mathcal\{F\}and a sampled pathπ=\(δ0,…,δN−1\)\\pi=\(\\delta\_\{0\},\\dots,\\delta\_\{N\-1\}\), obtained by a weighted random walk overℱ\\mathcal\{F\}fromσ0\\sigma\_\{0\}to someσf∈Σf\\sigma\_\{f\}\\in\\Sigma\_\{f\}\(transition weights and long\-tail emphasis detailed in Appendices[A\.1](https://arxiv.org/html/2609.06124#A1.SS1),[A\.2](https://arxiv.org/html/2609.06124#A1.SS2)\), and converts it into an executable call sequence carried out byε\\varepsilon\. For each turn,𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}inspects the executed historyℋ<k\\mathcal\{H\}\_\{<k\}and the declared tags, binds a value for each call, and groups intra\-turn calls into parallel step groups \(no intra\-groupPoP\_\{o\}edges\)\.ε\\varepsilonthen executes group by group; on failure, only the offending call is regenerated and retried \(Appendices[A\.3](https://arxiv.org/html/2609.06124#A1.SS3)and[A\.4](https://arxiv.org/html/2609.06124#A1.SS4)\)\.

Two tag types require runtime binding\. ForPoP\_\{o\},𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}only declares that*some*prior return is reused;𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}binds the specific field at runtime against the actual return ofε\\varepsilon\. If no declared upstream satisfies the binding, it recordsPfP\_\{f\}and recovers the argument from another availablePiP\_\{i\}value or from a newPcP\_\{c\}value when permitted; a declaredPiP\_\{i\}source that cannot be located inc0c\_\{0\}falls back the same way\. The executor validates the resulting call after the recovery value is bound \(see App\.[A\.3](https://arxiv.org/html/2609.06124#A1.SS3)\)\. This both surfaces the mismatch as a diagnostic signal in𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\(§[6](https://arxiv.org/html/2609.06124#S6)\) and prevents a single binding failure from invalidating an entire trajectory\. ForPuP\_\{u\}, the value must appear in an earlier user message that𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}has yet to generate; we break this cycle by fixing the value at planning time \(via a temporaryPcP\_\{c\}remap\) and registering it together with a scheduled anchor turnk⋆k^\{\\star\}in a virtual historyΔv\\Delta\_\{v\}, which𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}later renders intouk⋆u\_\{k^\{\\star\}\}\(Appendix[A\.5](https://arxiv.org/html/2609.06124#A1.SS5)\)\.

### 4\.4𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}: Post\-hoc Synthesis of Dialogue Text Messages

Once all\(ti,𝜽iexec,ri\)\(t\_\{i\},\\boldsymbol\{\\theta\}^\{\\text\{exec\}\}\_\{i\},r\_\{i\}\),𝜽iprov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\_\{i\}andΔv\\Delta\_\{v\}are frozen,𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}synthesizes the user messageuku\_\{k\}for every turn and an assistant natural\-language response when𝒞k=∅\\mathcal\{C\}\_\{k\}=\\varnothing\. Because messages are written only after the ground truth is fixed, every message is grounded against actual returns\. The user messageuku\_\{k\}is driven by a must\-mention list derived from𝜽iprov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\_\{i\}andΔv​\[k\]\\Delta\_\{v\}\[k\], with two regimes:*newly introduced*values \(PcP\_\{c\},PfP\_\{f\}, the anchor side of a futurePuP\_\{u\}consumer, andPiP\_\{i\}values that must be passed verbatim to a tool\) appear as explicit literals inuku\_\{k\};*referenced*values \(PoP\_\{o\}and the consumer side ofPuP\_\{u\}\) appear via vague referents whose unambiguity is verified by the validator\. Full marker semantics and prompt\-level constraints are in Appendix[A\.6](https://arxiv.org/html/2609.06124#A1.SS6)\.

### 4\.5Challenge Scenario Injection and Multi\-Layer Validation

For each validated base trajectory, two rewrite operators synthesize hard variants targeting common deployment failure modes\.Ψparam\\Psi\_\{\\text\{param\}\}\(MissParam\) samples a fewPcP\_\{c\}arguments from an originating turnk∗k^\{\*\}, replaces their literals inuk∗u\_\{k^\{\*\}\}with vague references, and clears the turn\-k∗k^\{\*\}ground truth so that the assistant emits a clarification; an inserted reveal turn then re\-supplies the missing values and re\-binds the call\.Ψfunc\\Psi\_\{\\text\{func\}\}\(MissFunc\) temporarily removes a tool that the base actually invokes and re\-exposes it at the next turn via a user\-side handoff message\. Both operators are guarded by an executor replay that requires the rewritten outcome to match the original base \(Appendix[A\.7](https://arxiv.org/html/2609.06124#A1.SS7)\)\.

Before being persisted, every trajectory passes through two complementary checks: a code\-side deterministic check \(legal provenance references, closedΔv\\Delta\_\{v\}, minimum length\), and an agent\-side LLM judge checking intent alignment and rewrite\-scenario structural compliance\. Rejection by either check triggers immediate discard\.

## 5Experiments

### 5\.1Setup

#### Backbone and baselines\.

We SFT on Qwen3\-4B\-Instruct\-2507\([Yang et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib1)\)\. The directly comparable open\-source BFCL v4 multi\-turn baselines at the 4B / 8B scale include AWM\([Wang et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib24)\), CM2\([Zhang et al\., 2026a](https://arxiv.org/html/2609.06124#bib.bib19)\), ToolACE\-2 and BitAgent\([Zhang et al\., 2026b](https://arxiv.org/html/2609.06124#bib.bib18)\), and TOUCAN\([Xu et al\., 2025b](https://arxiv.org/html/2609.06124#bib.bib10)\); we additionally report BFCL v3 multi\-turn numbers for MAGNET\([Yin et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib9)\), ToolWeave\([Khandelwal et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib15)\), and MUA\-RL\([Zhao et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib17)\)as reference \(listed in a separate row group in Table[2](https://arxiv.org/html/2609.06124#S5.T2); not directly comparable due to benchmark version drift\)\.

#### Synthesis pipeline\.

The three agents are instantiated as𝒜FSM=\\mathcal\{A\}\_\{\\text\{FSM\}\}=Gemini\-3\.1 Pro\([Google DeepMind, 2026](https://arxiv.org/html/2609.06124#bib.bib27)\),𝒜plan=\\mathcal\{A\}\_\{\\text\{plan\}\}=Gemini\-3 Pro\([Google DeepMind, 2025](https://arxiv.org/html/2609.06124#bib.bib26)\), and𝒜msg=\\mathcal\{A\}\_\{\\text\{msg\}\}=Qwen3\-235B\-A22B\-Instruct\-2507\([Yang et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib1)\), chosen to balance FSM\-source compliance and dialogue\-style diversity \(see App\.[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)\)\. Gemini\-3\.1 Pro attains the lowest fallback rate as the planner \(2\.02% vs\. 2\.76%, App\.[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)\), but its endpoint was less stable under high request concurrency; since a single FSM skeleton is amortized over several sampled trajectories while𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}accounts for the bulk of the pipeline’s request volume, we assign Gemini\-3\.1 Pro to the low\-throughput FSM stage and Gemini\-3 Pro to the high\-throughput planning stage\. The executorε\\varepsilonwraps the original BFCL v4 multi\-turn andτ2\\tau^\{2\}\-bench backends without modification, so every synthesized trajectory is grounded against the same simulator used at evaluation\. The initial configurations consumed at synthesis time are self\-generated \(following the released schemas\) rather than taken from the benchmark test data, which is used only for evaluation\. A single pipeline configuration is used across all source domains: only the tool documentation and the executor backend are swapped per domain, while𝒜FSM,𝒜plan,𝒜msg\\mathcal\{A\}\_\{\\text\{FSM\}\},\\mathcal\{A\}\_\{\\text\{plan\}\},\\mathcal\{A\}\_\{\\text\{msg\}\}, the FSM state\-type taxonomy, and the Provenance Tag system remain identical\. The released SFT mix contains≈9\\approx 9k trajectories\.

#### Training\.

We train with the verl framework\([Sheng et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib30)\)on a single node equipped with eight 80GB GPUs\. All experiments use full\-parameter SFT with AdamW: learning rate×10−61\\\!\\times\\\!10^\{\-6\}, global batch size128128, and1010epochs\.

#### Benchmarks and metrics\.

BFCL v4 multi\-turn \(Base / MissFunc / MissParam / LongCtx\) is scored with the official BFCL harness under the official environments and test data; we report the harness’s multi\-turn accuracy, which combines state\-based checks on the executed environment with response\-based checks on the emitted call sequence\.τ2\\tau^\{2\}\-bench Retail / Airline\([Barres et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib4)\)is evaluated under the official harness with the think tool disabled; we report pass1only\. The argument\-value chain\-length diagnosticsL¯\\bar\{L\}andL⋆L^\{\\star\}\(§[3](https://arxiv.org/html/2609.06124#S3)\) are reported as a synthesis\-side measurement in Fig\.[1](https://arxiv.org/html/2609.06124#S1.F1)\.

### 5\.2Main Results

BFCL v4 Multi\-Turnτ2\\tau^\{2\}\-bench \(pass1\)ModelSizeAvgBaseMFnMPmLCtxRetailAirlineAvg*Closed\-source / large\-scale reference \(BFCL v4\)*GPT\-5\.2\-High–48\.5––––81\.662\.572\.1Claude Sonnet 4\.5–61\.469\.065\.052\.559\.086\.270\.178\.2Gemini\-3 Pro–60\.864\.560\.054\.564\.085\.372\.779\.0DeepSeek\-V3\.2\-Exp685B37\.441\.539\.533\.535\.0–––Qwen3\-235B\-A22B235B45\.4––––71\.945\.658\.8*BFCL v3 MT \(reference\)*ToolWeave\-8B8B21\.128\.018\.018\.520\.0–––MAGNET\-7B\-SFT7B26\.535\.524\.027\.519\.0–––MAGNET\-7B\-mDPO7B27\.839\.024\.026\.022\.0–––MAGNET\-14B\-SFT14B33\.447\.032\.032\.022\.5–––MAGNET\-14B\-mDPO14B37\.952\.036\.035\.528\.0–––MUA\-RL\-8B8B14\.621\.011\.515\.011\.049\.819\.034\.4MUA\-RL\-14B14B25\.340\.514\.025\.021\.566\.038\.052\.0MUA\-RL\-32B32B28\.442\.020\.030\.021\.567\.345\.456\.4*BFCL v4 MT \(directly comparable\)*CM2\-8B\-RL8B36\.544\.532\.035\.034\.536\.427\.031\.7CM2\-8B\-SFT8B26\.830\.027\.524\.525\.019\.523\.521\.5ToolACE\-2\-8B8B37\.047\.031\.028\.042\.08\.226\.717\.5BitAgent\-8B8B37\.846\.537\.524\.043\.06\.137\.321\.7TOUCAN\-7B7B24\.030\.021\.024\.021\.022\.820\.021\.4AWM\-4B4B30\.337\.535\.528\.519\.530\.319\.024\.7AWM\-8B8B40\.149\.548\.036\.027\.041\.233\.537\.4Qwen3\-4B\-Instruct\-25074B22\.126\.521\.015\.525\.540\.424\.032\.2SAP\-4B SFT \(ours\)4B30\.438\.023\.024\.536\.042\.128\.035\.1Δ\\Delta\(Ours−\-backbone\)\+8\.3\+11\.5\+2\.0\+9\.0\+10\.5\+1\.7\+4\.0\+2\.9

Table 2:Main results on BFCL v4 Multi\-Turn andτ2\\tau^\{2\}\-bench\. MFn, MPm, and LCtx denote MissFunc, MissParam, and LongCtx, respectively; Retail and Airline are the twoτ2\\tau^\{2\}\-bench domains\. Row groups separate BFCL v4 \(directly comparable\) from BFCL v3 \(reference\)\.Sources:GPT\-5\.2\([OpenAI, 2025](https://arxiv.org/html/2609.06124#bib.bib28)\), Claude Sonnet 4\.5\([Anthropic, 2025](https://arxiv.org/html/2609.06124#bib.bib25)\), Gemini\-3 Pro\([Google DeepMind, 2025](https://arxiv.org/html/2609.06124#bib.bib26)\), DeepSeek\-V3\.2\-Exp\([DeepSeek\-AI et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib23)\), Qwen3\-235B\-A22B and backbone\([Yang et al\., 2025a](https://arxiv.org/html/2609.06124#bib.bib1)\); ToolWeave\([Khandelwal et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib15)\), MAGNET\([Yin et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib9)\), MUA\-RL\([Zhao et al\., 2025](https://arxiv.org/html/2609.06124#bib.bib17)\); ToolACE\-2 / BitAgent results from\([Zhang et al\., 2026b](https://arxiv.org/html/2609.06124#bib.bib18)\), CM2\([Zhang et al\., 2026a](https://arxiv.org/html/2609.06124#bib.bib19)\), TOUCAN\([Xu et al\., 2025b](https://arxiv.org/html/2609.06124#bib.bib10)\), AWM\([Wang et al\., 2026](https://arxiv.org/html/2609.06124#bib.bib24)\)\.Over the Qwen3\-4B\-Instruct backbone,SAP\-4B SFT improves BFCL v4 multi\-turn Avg by \+8\.3 \(22\.1→\\to30\.4\) andτ2\\tau^\{2\}\-bench Avg by \+2\.9 \(32\.2→\\to35\.1\) without any RL\. On BFCL v4 the gains concentrate on Base \(\+11\.5\), LongCtx \(\+10\.5\), and MissParam \(\+9\.0\), while MissFunc shows a smaller lift \(\+2\.0\)\. Theτ2\\tau^\{2\}\-bench improvement \(Retail \+1\.7 / Airline \+4\.0\) is more modest, consistent with the benchmark’s long\-horizon state\-tracking demands;SAP\-4B’s competitiveτ2\\tau^\{2\}result under a 4B SFT\-only setup indicates that argument\-level provenance provides a meaningful signal even at this small scale\. As a complementary out\-of\-distribution probe, we evaluateSAP\-4B on the BFCL v4 single\-turn track \(Appendix[B\.4](https://arxiv.org/html/2609.06124#A2.SS4)\): multi\-turn\-only training does not regress single\-turn performance and yields a small consistent lift on both Non\-live and Live splits\.

Among methods evaluated on the same BFCL v4 MT release,SAP\-4B is on par with same\-parameter\-scale baselines on BFCL v4 MT Avg \(30\.4 vs\. AWM\-4B 30\.3\) while substantially outperforming them onτ2\\tau^\{2\}\-bench \(35\.1 vs\. AWM\-4B 24\.7\), where long\-horizon state\-tracking is the bottleneck\.SAP\-4B still trails 8B baselines on BFCL v4, but onτ2\\tau^\{2\}it matches or exceeds most of them \(CM2\-8B\-RL 31\.7, ToolACE\-2\-8B 17\.5, BitAgent\-8B 21\.7\) despite using only SFT on a 4B backbone with 9k trajectories\. We attribute the BFCL v4 gap primarily to scale rather than data quality\.

The closed\-source frontier \(Claude Sonnet 4\.5, Gemini\-3 Pro\) reaches BFCL v4 MT Avg in the 60s andτ2\\tau^\{2\}Avg in the 70s, indicating that the open\-source 4B regime still has substantial headroom on BFCL v4 multi\-turn\. Notably, GPT\-5\.2\-High shows a wider gap to the Claude/Gemini frontier on BFCL v4 MT \(48\.5 vs\.∼\\sim60\) than onτ2\\tau^\{2\}\(72\.1 vs\.∼\\sim78\), suggesting the two benchmarks exercise partly orthogonal capabilities\.

### 5\.3Ablations

Table 3:Ablation on BFCL v4 Multi\-Turn at matched data scale\. A1 removes per\-argument Provenance Tag declarations; A2 removes both rewrite operatorsΨparam,Ψfunc\\Psi\_\{\\text\{param\}\},\\Psi\_\{\\text\{func\}\}\.#### Note on𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}and pipeline\-level ablations\.

We do not include an𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}ablation row in Table[3](https://arxiv.org/html/2609.06124#S5.T3): removing the FSM skeleton \(i\.e\., reverting to free\-form turn\-by\-turn generation by𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}\) cuts the pipeline’s data pass\-rate from89%89\\%to50%50\\%\(see Appendix[B\.3](https://arxiv.org/html/2609.06124#A2.SS3)\), and the surviving trajectories are too few and too biased to support a fair SFT comparison\. Similarly, disabling per\-call retry \(the “noRetry” variant\) drops the pass\-rate to54%54\\%\. Removing Provenance Tags while keeping the FSM \(“FSM\+noTag”\) yields a high pass\-rate \(92%92\\%\) but produces zeroPoP\_\{o\}arguments, confirming that the tag declarations are the primary mechanism driving cross\-turn dependency generation\. We treat𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}as a non\-optional structural component and report only the two downstream ablations below\.

#### A1: Provenance Tag declarations\.

Removing the per\-argument Provenance Tag declarations that𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}commits in𝒯δ\\mathcal\{T\}\_\{\\delta\}\(§[4\.2](https://arxiv.org/html/2609.06124#S4.SS2)\) and letting𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}choose argument sources freely causes a substantial drop across all four subsets \(Avg30\.4→24\.030\.4\\to 24\.0,−6\.4\-6\.4\)\. The hit is sharpest on LongCtx \(−10\.5\-10\.5\) and Base \(−8\.5\-8\.5\), with MissFunc \(−3\.5\-3\.5\) and MissParam \(−3\.0\-3\.0\) showing moderate declines, confirming that the tag declarations act as a structural prior that constrains𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}to ground each argument in a verifiable upstream, most useful precisely where long\-horizon argument tracking matters\. App\.[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)reports a complementary backbone\-level study where thePfP\_\{f\}rate correlates with these declaration\-compliance failures\.

#### A2: Rewrite operatorsΨparam,Ψfunc\\Psi\_\{\\text\{param\}\},\\Psi\_\{\\text\{func\}\}\.

Removing the rewrite operatorsΨparam\\Psi\_\{\\text\{param\}\}andΨfunc\\Psi\_\{\\text\{func\}\}\(§[4\.5](https://arxiv.org/html/2609.06124#S4.SS5)\) at matched data scale lowers Avg to28\.828\.8\(−1\.6\-1\.6\)\. The effect is modest but consistent across MissFunc \(−2\.0\-2\.0\), MissParam \(−2\.0\-2\.0\), Base \(−1\.0\-1\.0\), and LongCtx \(−1\.5\-1\.5\), matching the expectation that the operators specifically target deployment failure modes while leaving standard multi\-turn performance largely intact\. The smaller magnitude relative to A1 also indicates that the bulk of the gain comes from the structural Provenance Tag constraint, not from the hard\-scenario rewrites alone\.

### 5\.4Case Study

Figure[3](https://arxiv.org/html/2609.06124#S5.F3)provides qualitative evidence forSAP’s provenance constraints and execution\-in\-the\-loop validation\. In \(a\), fullSAPresolves thecpsourceroutes\.jsasPoP\_\{o\}from the earlierlsreturn; validation confirms the copy, so the backup can be read on the next turn\. Without turn\-level validation, a one\-character error \(route\.js\) causes the copy and the subsequentcatcall to fail\. In \(b\), when the initial search provides no usable recipient,SAPrecordsPfP\_\{f\}, recoversUSR005from the initial state, and validates the send successfully\. Disabling fallback leavesUSR009ungrounded and nonexistent, causing both message delivery and subsequent verification to fail\.

![Refer to caption](https://arxiv.org/html/2609.06124v1/image/error.png)Figure 3:Case study ofSAP’s error localization and hybrid validation\. \(a\) Turn\-level execution validation prevents an incorrect file binding from cascading to a later call\. \(b\) Parameter fallback recovers a valid recipient and is checked by the executor, whereas disabling it causes message delivery to fail\.

## 6Discussion

SAPdoes not fully prevent argument hallucinations at newly created values \(PcP\_\{c\}\) or at fallback recoveries that must introduce a new value\. When a declared upstream is unavailable,PfP\_\{f\}instead records the recovery event and its original source, whether the recovered binding selects another available value or introduces a new one; the resulting call is then checked by the executor\. This localizes unresolved argument quality to a single call and makes every recovery auditable in𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\. Hallucinations cannot propagate alongPoP\_\{o\}\(blocked by real execution\) orPuP\_\{u\}\(blocked by the §[4\.4](https://arxiv.org/html/2609.06124#S4.SS4)consistency check\)\. This contrasts with committee\-style validators that reduce hallucination probability without bounding its propagation scope\.

We train on≈\\approx9k trajectories with SFT only, no RL, a deliberately compact setup imposed by the per\-trajectory live\-executor cost \(§[Limitations](https://arxiv.org/html/2609.06124#Sx1)\) and our compute budget\. Under this small\-model, small\-data, SFT\-only setting,SAP\-4B still matches or exceeds several 8B RL\-trained methods onτ2\\tau^\{2\}\-bench, particularly where long\-horizon state\-tracking aligns with our provenance design\. That this holds*without*scale or RL confounders gives a clean lower\-bound estimate of the method’s intrinsic data\-quality contribution\.

Most open\-source 4B baselines \(e\.g\., AWM\-4B\) are think\-mode RL\-trained models with long deliberation chains before each tool call\.SAP\-4B trains from a non\-think backbone \(Qwen3\-4B\-Instruct\-2507\) with SFT only, so its per\-turn inference cost is substantially lower at comparable or betterτ2\\tau^\{2\}\-bench accuracy\.

## 7Conclusion

We presentedSAP, a state\-guided pipeline for multi\-turn tool\-use trajectory synthesis that promotes argument provenance from a post\-hoc annotation to a synthesis\-time active constraint\. In addition,SAPis domain\-agnostic: rebuilding the FSM from updated tool documentation and swapping the executor backend is sufficient to support new toolsets, with no manual rule engineering\. The mechanism rests on two components: \(i\) the Provenance Tag type system, which explicitly declares the causal source of every argument; and \(ii\) FSM\-driven structure\-first generation, which dynamically builds a provenance\-annotated skeleton from tool documentation and enforces per\-turn executability via execution\-in\-the\-loop validation\. Experiments and ablations on BFCL v4 multi\-turn andτ2\\tau^\{2\}\-bench validate the design\.

The framework opens two directions\.*\(i\)SAPas a compiler for agentic RL\.*Provenance Tag serves as a process\-reward interface: successfulPoP\_\{o\}retrievals are positive signals, and argument\-binding mismatches localize provenance errors, supporting an SFT cold\-start→\\toRL with process rewards curriculum without extra annotation, since the signals are written into𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}at synthesis time\.*\(ii\) Scaling and pipeline extensions\.*Data scaling, larger backbones, RL,*execution\-conditioned FSMs*that revise the skeleton when turns fail, and*depth\-guided synthesis*that uses the dependency\-graph diagnostic as an optimization objective\.

## Limitations

We trainSAPonly on a 4B backbone; the 8B\-and\-larger numbers in Table[2](https://arxiv.org/html/2609.06124#S5.T2)are quoted from the original papers, as most concurrent data\-synthesis works \(FunReason\-MT, MAGNET, ToolWeave\) release no full pipeline\. Methodologically,𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}drafts the skeleton in one pass, so dependencies that surface only after partial execution \(e\.g\., return\-code\-conditioned branches\) are downgraded toPfP\_\{f\}at runtime instead of a groundedPoP\_\{o\}edge; Provenance Tag covers tool\-call arguments only, not entity anaphora in free text; and all runs use English documentation in single\-agent settings\.

Following standard practice, the data\-synthesis pipeline reuses the BFCL andτ2\\tau^\{2\}\-bench schemas and executor backends as its environment, though initial states, user messages, and call sequences are sampled independently rather than copied from the test split\. Two costs remain: live\-executor validation is expensive in wall\-clock and API terms \(App\.[B\.1](https://arxiv.org/html/2609.06124#A2.SS1)\), and we do not report human\-agreement statistics for the single LLM judge of §[4\.5](https://arxiv.org/html/2609.06124#S4.SS5)\.

## AI Use Statement

In line with the ACL Policy on AI Writing Assistance, large language models were used as writing aids for grammar polishing, paragraph restructuring, and literature search, and for code completion when implementing the synthesis pipeline\. All experimental design, methodological contributions, hypothesis formulations, error analyses, and final claims are the authors’ work; no content was generated end\-to\-end by AI without subsequent verification and editing\.

## References

- Anthropic \(2025\)AnthropicIntroducing Claude Sonnet 4\.5\.Note:Anthropic news releaseExternal Links:[Link](https://www.anthropic.com/news/claude-sonnet-4-5)Cited by:[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Barreset al\.\(2025\)V\. Barres, H\. Dong, S\. Ray, X\. Si, and K\. Narasimhanτ2\\tau^\{2\}\-Bench: evaluating conversational agents in a dual\-control environment\.External Links:2506\.07982,[Link](https://arxiv.org/abs/2506.07982)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p1.1),[§1](https://arxiv.org/html/2609.06124#S1.p5.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1),[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px4.p1.1)\.
- Chaiet al\.\(2026\)Y\. Chai, H\. Xiao, X\. Fu, J\. Chen, R\. Liu, and H\. LiUI\-KOBE: knowledge\-oriented behavior exploration for lightweight graph\-guided gui agents\.External Links:2605\.29534,[Link](https://arxiv.org/abs/2605.29534)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Chenet al\.\(2026\)J\. Chen, C\. Gong, H\. Li, Z\. Liu, Z\. Tian, X\. Fu, S\. Wu, C\. Zhang, W\. Zhang, S\. Zhang, D\. Tu, and R\. LiuCoVe: training interactive tool\-use agents via constraint\-guided verification\.External Links:2603\.01940,[Link](https://arxiv.org/abs/2603.01940)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p3.1)\.
- Choet al\.\(2026\)J\. Cho, M\. Jeong, and S\. ParkUser\-oriented multi\-turn dialogue generation with tool use at scale\.External Links:2601\.08225,[Link](https://arxiv.org/abs/2601.08225)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- DeepSeek\-AIet al\.\(2025\)DeepSeek\-AI, A\. Liu, A\. Mei, B\. Lin, B\. Xue, B\. Wang, B\. Xu, B\. Wu, B\. Zhang, C\. Lin, C\. Dong, C\. Lu, C\. Zhao, C\. Deng, C\. Xu, C\. Ruan, D\. Dai, D\. Guo, D\. Yang, D\. Chen, E\. Li, F\. Zhou, F\. Lin, F\. Dai, G\. Hao, G\. Chen, G\. Li, H\. Zhang, H\. Xu, H\. Li, H\. Liang, H\. Wei, H\. Zhang, H\. Luo, H\. Ji, H\. Ding, H\. Tang, H\. Cao, H\. Gao, H\. Qu, H\. Zeng, J\. Huang, J\. Li, J\. Xu, J\. Hu, J\. Chen, J\. Xiang, J\. Yuan, J\. Cheng, J\. Zhu, J\. Ran, J\. Jiang, J\. Qiu, J\. Li, J\. Song, K\. Dong, K\. Gao, K\. Guan, K\. Huang, K\. Zhou, K\. Huang, K\. Yu, L\. Wang, L\. Zhang, L\. Wang, L\. Zhao, L\. Yin, L\. Guo, L\. Luo, L\. Ma, L\. Wang, L\. Zhang, M\. S\. Di, M\. Y\. Xu, M\. Zhang, M\. Zhang, M\. Tang, M\. Zhou, P\. Huang, P\. Cong, P\. Wang, Q\. Wang, Q\. Zhu, Q\. Li, Q\. Chen, Q\. Du, R\. Xu, R\. Ge, R\. Zhang, R\. Pan, R\. Wang, R\. Yin, R\. Xu, R\. Shen, R\. Zhang, S\. H\. Liu, S\. Lu, S\. Zhou, S\. Chen, S\. Cai, S\. Chen, S\. Hu, S\. Liu, S\. Hu, S\. Ma, S\. Wang, S\. Yu, S\. Zhou, S\. Pan, S\. Zhou, T\. Ni, T\. Yun, T\. Pei, T\. Ye, T\. Yue, W\. Zeng, W\. Liu, W\. Liang, W\. Pang, W\. Luo, W\. Gao, W\. Zhang, X\. Gao, X\. Wang, X\. Bi, X\. Liu, X\. Wang, X\. Chen, X\. Zhang, X\. Nie, X\. Cheng, X\. Liu, X\. Xie, X\. Liu, X\. Yu, X\. Li, X\. Yang, X\. Li, X\. Chen, X\. Su, X\. Pan, X\. Lin, X\. Fu, Y\. Q\. Wang, Y\. Zhang, Y\. Xu, Y\. Ma, Y\. Li, Y\. Li, Y\. Zhao, Y\. Sun, Y\. Wang, Y\. Qian, Y\. Yu, Y\. Zhang, Y\. Ding, Y\. Shi, Y\. Xiong, Y\. He, Y\. Zhou, Y\. Zhong, Y\. Piao, Y\. Wang, Y\. Chen, Y\. Tan, Y\. Wei, Y\. Ma, Y\. Liu, Y\. Yang, Y\. Guo, Y\. Wu, Y\. Wu, Y\. Cheng, Y\. Ou, Y\. Xu, Y\. Wang, Y\. Gong, Y\. Wu, Y\. Zou, Y\. Li, Y\. Xiong, Y\. Luo, Y\. You, Y\. Liu, Y\. Zhou, Z\. F\. Wu, Z\. Z\. Ren, Z\. Zhao, Z\. Ren, Z\. Sha, Z\. Fu, Z\. Xu, Z\. Xie, Z\. Zhang, Z\. Hao, Z\. Gou, Z\. Ma, Z\. Yan, Z\. Shao, Z\. Huang, Z\. Wu, Z\. Li, Z\. Zhang, Z\. Xu, Z\. Wang, Z\. Gu, Z\. Zhu, Z\. Li, Z\. Zhang, Z\. Xie, Z\. Gao, Z\. Pan, Z\. Yao, B\. Feng, H\. Li, J\. L\. Cai, J\. Ni, L\. Xu, M\. Li, N\. Tian, R\. J\. Chen, R\. L\. Jin, S\. S\. Li, S\. Zhou, T\. Sun, X\. Q\. Li, X\. Jin, X\. Shen, X\. Chen, X\. Song, X\. Zhou, Y\. X\. Zhu, Y\. Huang, Y\. Li, Y\. Zheng, Y\. Zhu, Y\. Ma, Z\. Huang, Z\. Xu, Z\. Zhang, D\. Ji, J\. Liang, J\. Guo, J\. Chen, L\. Xia, M\. Wang, M\. Li, P\. Zhang, R\. Chen, S\. Sun, S\. Wu, S\. Ye, T\. Wang, W\. L\. Xiao, W\. An, X\. Wang, X\. Sun, X\. Wang, Y\. Tang, Y\. Zha, Z\. Zhang, Z\. Ju, Z\. Zhang, and Z\. QuDeepSeek\-V3\.2: pushing the frontier of open large language models\.External Links:2512\.02556,[Link](https://arxiv.org/abs/2512.02556)Cited by:[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Google DeepMind \(2025\)Google DeepMindGemini 3 Pro\.Note:Google DeepMind model pageExternal Links:[Link](https://deepmind.google/models/gemini/pro/)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px2.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Google DeepMind \(2026\)Google DeepMindGemini 3\.1 Pro model card\.Note:Google DeepMind model cardExternal Links:[Link](https://deepmind.google/models/model-cards/gemini-3-1-pro/)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px2.p1.1)\.
- Guanet al\.\(2025\)Z\. Guan, J\. C\. L\. Li, Z\. Hou, P\. Zhang, D\. Xu, Y\. Zhao, M\. Wu, J\. Chen, T\. Nguyen, P\. Xian, W\. Ma, S\. Qin, G\. Chesi, and N\. WongKG\-RAG: enhancing gui agent decision\-making via knowledge graph\-driven retrieval\-augmented generation\.External Links:2509\.00366,[Link](https://arxiv.org/abs/2509.00366)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Haoet al\.\(2026\)B\. Hao, Z\. Xu, Y\. Wen, X\. Xu, Y\. Liu, T\. Zhao, M\. Wang, L\. Chen, D\. Wang, Y\. Chen, C\. Peng, X\. Zhao, C\. Zhuang, and J\. ZhangFrom failure to mastery: generating hard samples for tool\-use agents\.External Links:2601\.01498,[Link](https://arxiv.org/abs/2601.01498)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Khandelwalet al\.\(2026\)D\. Khandelwal, G\. P\. Punnavajhala, G\. P\. S\. Bhargav, G\. Pandey, S\. Joshi, H\. Karanam, and D\. RaghuToolWeave: structured synthesis of complex multi\-turn tool\-calling dialogues\.External Links:2605\.12521,[Link](https://arxiv.org/abs/2605.12521)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Liet al\.\(2025\)Y\. Li, W\. Zhang, Z\. Huang, M\. Yang, J\. Wu, S\. Guo, H\. Hu, L\. Sun, J\. Yang, M\. Tang, and B\. DaiClose the loop: synthesizing infinite tool\-use data via multi\-agent role\-playing\.External Links:2512\.23611,[Link](https://arxiv.org/abs/2512.23611)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p2.1)\.
- Liuet al\.\(2024\)W\. Liu, X\. Huang, X\. Zeng, X\. Hao, S\. Yu, D\. Li, S\. Wang, W\. Gan, Z\. Liu, Y\. Yu, Z\. Wang, Y\. Wang, W\. Ning, Y\. Hou, B\. Wang, C\. Wu, X\. Wang, Y\. Liu, Y\. Wang, D\. Tang, D\. Tu, L\. Shang, X\. Jiang, R\. Tang, D\. Lian, Q\. Liu, and E\. ChenToolACE: winning the points of LLM function calling\.External Links:2409\.00920,[Link](https://arxiv.org/abs/2409.00920)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p2.1)\.
- OpenAI \(2025\)OpenAIOpenAI Update to GPT\-5 System Card: GPT\-5\.2\.Note:OpenAI system card updateExternal Links:[Link](https://cdn.openai.com/pdf/3a4153c8-c748-4b71-8e31-aecbde944f8d/oai_5_2_system-card.pdf)Cited by:[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Patilet al\.\(2025\)S\. G\. Patil, H\. Mao, F\. Yan, C\. C\. Ji, V\. Suresh, I\. Stoica, and J\. E\. GonzalezThe Berkeley Function Calling Leaderboard \(BFCL\): from tool use to agentic evaluation of large language models\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 48371–48392\.Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p1.1),[§1](https://arxiv.org/html/2609.06124#S1.p5.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1)\.
- Prabhakaret al\.\(2025\)A\. Prabhakar, Z\. Liu, M\. Zhu, J\. Zhang, T\. Awalgaonkar, S\. Wang, Z\. Liu, H\. Chen, T\. Hoang, J\. C\. Niebles, S\. Heinecke, W\. Yao, H\. Wang, S\. Savarese, and C\. XiongAPIGen\-MT: agentic pipeline for multi\-turn data generation via simulated agent\-human interplay\.External Links:2504\.03601,[Link](https://arxiv.org/abs/2504.03601)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p1.1),[§1](https://arxiv.org/html/2609.06124#S1.p2.1),[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Qinet al\.\(2024\)Y\. Qin, S\. Liang, Y\. Ye, K\. Zhu, L\. Yan, Y\. Lu, Y\. Lin, X\. Cong, X\. Tang, B\. Qian, S\. Zhao, L\. Hong, R\. Tian, R\. Xie, J\. Zhou, M\. Gerstein, D\. Li, Z\. Liu, and M\. SunToolLLM: facilitating large language models to master 16000\+ real\-world APIs\.InProceedings of the 12th International Conference on Learning Representations \(ICLR\),Note:Spotlight; arXiv:2307\.16789External Links:[Link](https://arxiv.org/abs/2307.16789)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Rabinovich and Anaby\-Tavor \(2025\)E\. Rabinovich and A\. Anaby\-TavorOn the robustness of agentic function calling\.InProceedings of the 5th Workshop on Trustworthy NLP \(TrustNLP 2025\),pp\. 298–304\.Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p1.1),[§1](https://arxiv.org/html/2609.06124#S1.p2.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1)\.
- Shenget al\.\(2025\)G\. Sheng, C\. Zhang, Z\. Ye, X\. Wu, W\. Zhang, R\. Zhang, Y\. Peng, H\. Lin, and C\. WuHybridFlow: a flexible and efficient RLHF framework\.InProceedings of the Twentieth European Conference on Computer Systems \(EuroSys\),External Links:2409\.19256,[Link](https://arxiv.org/abs/2409.19256)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px3.p1.1)\.
- Shimet al\.\(2025\)J\. Shim, G\. Seo, C\. Lim, and Y\. JoToolDial: multi\-turn dialogue generation method for tool\-augmented language models\.InProceedings of the Thirteenth International Conference on Learning Representations \(ICLR\),External Links:2503\.00564,[Link](https://arxiv.org/abs/2503.00564)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1)\.
- Suet al\.\(2026\)J\. Su, Y\. Wan, J\. Yang, H\. Shi, T\. Han, Y\. Qiu, and J\. LuoFailure makes the agent stronger: enhancing accuracy through structured reflection for reliable tool interactions\.InFindings of the Association for Computational Linguistics: ACL 2026,San Diego, California, United States,pp\. 12712–12734\.External Links:[Link](https://aclanthology.org/2026.findings-acl.618/)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Tianet al\.\(2026\)X\. Tian, H\. Wang, S\. Chen, H\. Zhou, K\. Yu, Y\. Zhang, J\. Ouyang, J\. Yin, J\. Chen, B\. Guo, L\. Zhang, J\. Tao, Y\. Song, M\. Cui, and C\. LiuASTRA: automated synthesis of agentic trajectories and reinforcement arenas\.External Links:2601\.21558,[Link](https://arxiv.org/abs/2601.21558)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Wanget al\.\(2025a\)H\. Wang, W\. Huang, Y\. Wang, Y\. Xi, J\. Lu, H\. Zhang, N\. Hu, Z\. Liu, J\. Z\. Pan, and K\. WongRethinking stateful tool use in multi\-turn dialogues: benchmarks and challenges\.InFindings of the Association for Computational Linguistics: ACL 2025,External Links:[Link](https://aclanthology.org/2025.findings-acl.284/)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1)\.
- Wanget al\.\(2025b\)Z\. Wang, X\. Zeng, W\. Liu, L\. Li, Y\. Wang, L\. Shang, X\. Jiang, Q\. Liu, and K\. WongToolFlow: boosting LLM tool\-calling through natural and coherent dialogue synthesis\.InProceedings of the 2025 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies \(NAACL\),External Links:2410\.18447,[Link](https://arxiv.org/abs/2410.18447)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Wanget al\.\(2026\)Z\. Wang, C\. Xu, B\. Liu, Y\. Wang, S\. Han, Z\. Yao, H\. Yao, and Y\. HeAgent World Model: infinity synthetic environments for agentic reinforcement learning\.InProceedings of the 43rd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.306\.External Links:[Link](https://arxiv.org/abs/2602.10090)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Xuet al\.\(2026a\)S\. Xu, S\. Li, X\. Liu, T\. Liu, Y\. Li, Z\. Shi, Z\. Zhang, Z\. Wang, Q\. Yin, J\. Chen, T\. Zhao, and B\. YinControllable and verifiable tool\-use data synthesis for agentic reinforcement learning\.External Links:2604\.09813,[Link](https://arxiv.org/abs/2604.09813)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Xuet al\.\(2025a\)Z\. Xu, B\. Hao, Z\. Wang, Y\. Wen, X\. Xu, Y\. Liu, L\. Chen, D\. Wang, M\. Wang, T\. Zhao, Y\. Chen, C\. Peng, J\. Gu, L\. Gan, X\. Zhao, C\. Zhuang, and S\. GuFunReason\-MT technical report: advanced data synthesis solution for real\-world multi\-turn tool\-use\.External Links:2510\.24645,[Link](https://arxiv.org/abs/2510.24645)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p2.1),[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Xuet al\.\(2025b\)Z\. Xu, A\. M\. Soria, S\. Tan, A\. Roy, A\. S\. Agrawal, R\. Poovendran, and R\. PandaTOUCAN: synthesizing 1\.5M tool\-agentic data from real\-world MCP environments\.External Links:2510\.01179,[Link](https://arxiv.org/abs/2510.01179)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Xuet al\.\(2026b\)Z\. Xu, R\. Li, J\. Li, R\. Weng, J\. Wang, X\. Cai, and X\. WangUnlocking implicit experience: synthesizing tool\-use trajectories from text\.Note:Method name: GEMExternal Links:2601\.10355,[Link](https://arxiv.org/abs/2601.10355)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Yanget al\.\(2025a\)A\. Yang, A\. Li, B\. Yang, B\. Zhang, B\. Hui, B\. Zheng, B\. Yu, C\. Gao, C\. Huang, C\. Lv, C\. Zheng, D\. Liu, F\. Zhou, F\. Huang, F\. Hu, H\. Ge, H\. Wei, H\. Lin, J\. Tang, J\. Yang, J\. Tu, J\. Zhang, J\. Yang, J\. Yang, J\. Zhou, J\. Zhou, J\. Lin, K\. Dang, K\. Bao, K\. Yang, L\. Yu, L\. Deng, M\. Li, M\. Xue, M\. Li, P\. Zhang, P\. Wang, Q\. Zhu, R\. Men, R\. Gao, S\. Liu, S\. Luo, T\. Li, T\. Tang, W\. Yin, X\. Ren, X\. Wang, X\. Zhang, X\. Ren, Y\. Fan, Y\. Su, Y\. Zhang, Y\. Zhang, Y\. Wan, Y\. Liu, Z\. Wang, Z\. Cui, Z\. Zhang, Z\. Zhou, and Z\. QiuQwen3 technical report\.External Links:2505\.09388,[Link](https://arxiv.org/abs/2505.09388)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px2.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Yanget al\.\(2025b\)C\. Yang, R\. Le, Y\. Xing, Z\. An, Z\. Chen, W\. X\. Zhao, Y\. Song, and T\. ZhangToolMind technical report: a large\-scale, reasoning\-enhanced tool\-use dataset\.External Links:2511\.15718,[Link](https://arxiv.org/abs/2511.15718)Cited by:[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p2.1)\.
- Yaoet al\.\(2024\)S\. Yao, N\. Shinn, P\. Razavi, and K\. Narasimhanτ\\tau\-bench: a benchmark for Tool\-Agent\-User interaction in real\-world domains\.External Links:2406\.12045,[Link](https://arxiv.org/abs/2406.12045)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p1.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1)\.
- Yinet al\.\(2025\)F\. Yin, Z\. Wang, I\. Hsu, J\. Yan, K\. Jiang, Y\. Chen, J\. Gu, L\. T\. Le, K\. Chang, C\. Lee, H\. Palangi, and T\. PfisterMagnet: multi\-turn tool\-use data synthesis and distillation via graph translation\.InProceedings of the 63rd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 32600–32616\.Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p2.1),[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Zenget al\.\(2026\)X\. Zeng, W\. Liu, L\. Wang, L\. Li, F\. Mi, Y\. Wang, L\. Shang, X\. Jiang, and Q\. LiuToolACE\-MT: non\-autoregressive generation for agentic multi\-turn interaction\.InProceedings of the 14th International Conference on Learning Representations \(ICLR\),Note:arXiv:2508\.12685External Links:[Link](https://arxiv.org/abs/2508.12685)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p3.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px1.p1.1)\.
- Zhanget al\.\(2025\)C\. Zhang, X\. Dai, Y\. Wu, Q\. Yang, Y\. Wang, R\. Tang, and Y\. LiuBeyond single\-turn: a survey on multi\-turn interactions with large language models\.External Links:2501\.09959,[Link](https://arxiv.org/abs/2501.09959)Cited by:[§1](https://arxiv.org/html/2609.06124#S1.p1.1),[§2](https://arxiv.org/html/2609.06124#S2.SS0.SSS0.Px2.p1.1)\.
- Zhanget al\.\(2026a\)Z\. Zhang, K\. Song, X\. Wang, Y\. Hu, W\. Yan, C\. Zhao, H\. P\. Zou, H\. Deng, S\. R\. Indurthi, S\. Liu, S\. Ma, X\. Wang, X\. E\. Wang, and S\. WangCM2: reinforcement learning with checklist rewards for multi\-turn and multi\-step agentic tool use\.External Links:2602\.12268,[Link](https://arxiv.org/abs/2602.12268)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Zhanget al\.\(2026b\)Z\. Zhang, F\. Zhao, R\. Wang, Z\. Wang, B\. Liang, J\. Wang, Y\. Hu, S\. Cao, and K\. WongRobust tool use via Fission\-GRPO: learning to recover from execution errors\.External Links:2601\.15625,[Link](https://arxiv.org/abs/2601.15625)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.
- Zhaoet al\.\(2025\)W\. Zhao, X\. Wang, C\. Ma, L\. Kong, Z\. Yang, M\. Tuo, X\. Shi, Y\. Zhai, and X\. CaiMUA\-RL: multi\-turn user\-interacting agent reinforcement learning for agentic tool use\.External Links:2508\.18669,[Link](https://arxiv.org/abs/2508.18669)Cited by:[§5\.1](https://arxiv.org/html/2609.06124#S5.SS1.SSS0.Px1.p1.1),[Table 2](https://arxiv.org/html/2609.06124#S5.T2)\.

## Appendix

## Appendix ASAPPipeline Details

This appendix expands the design choices behind the three agents and the rewrite operators of §[4](https://arxiv.org/html/2609.06124#S4)\.

### A\.1Detailed FSM Specification

The FSM of §[3\.2](https://arxiv.org/html/2609.06124#S3.SS2)is realized by mapping each domain’s tool documentation to a shared, domain\-agnostic*state\-type taxonomy*that lists which dialogue phases may appear in any tool\-use scenario\. New domains reuse the same taxonomy and downstream protocol; supplying updated tool documentation is sufficient to regenerate the corresponding states and transitions, without manually rewriting rule code\.

#### State\-type taxonomy \(Σ\\Sigma\)\.

We use 13 abstract types reused across all domains:INITIAL\(session start\);AUTH\_REQUIRED/AUTH\_COMPLETED\(authentication phases\);INFO\_GATHERING\(waiting for user\-supplied arguments\);SEARCHING\(read\-only lookup in progress\);FOUND/UNAVAILABLE\(lookup outcomes\);ACTION\_REQUIRED\(irreversible action pending user confirmation\);ACTION\_COMPLETED\(action persisted by the executor\);ERROR\(recoverable executor error\);REJECTION\(out\-of\-scope or invalid request\);COMPLETED\(terminal success\); andNORMAL\(catch\-all for domain\-specific intermediate phases\)\. Eachσ∈Σ\\sigma\\in\\Sigmainstantiates exactly one of these types\.

#### Transition record \(δ∈Δ\\delta\\in\\Delta\)\.

Each transition carries six fields beyond the source/target states:

- •action: the tool \(or composite tool list𝒞δ\\mathcal\{C\}\_\{\\delta\}\) whose invocation realizes the transition\.
- •condition: a natural\-language guard \(𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}uses this in\-context\)\.
- •probability: base sampling probability used by the weighted random walk overℱ\\mathcal\{F\}\.
- •weight: long\-tail emphasis weight \(see §[A\.2](https://arxiv.org/html/2609.06124#A1.SS2)\)\.
- •is\_critical: marks rare but high\-value paths \(e\.g\., authentication failure, payment\-error branches\) that the long\-tail emphasis subsetℰ\\mathcal\{E\}preferentially covers\.
- •provenance\_tag: realizes𝒯δ\\mathcal\{T\}\_\{\\delta\}at the engineering level, encoded as a nested map\{tool:\{arg: tag\}\}wheretag∈\\in\{initial\_state, prev\_output, self\_create, prev\_user\_msg\}\(the four design\-time entries of𝒮decl\\mathcal\{S\}\_\{\\text\{decl\}\};PfP\_\{f\}is reserved for runtime and never appears here\)\.

#### Cross\-domain reuse\.

Our implementation provides concrete FSMs for theτ2\\tau^\{2\}\-bench Retail and Airline domains and for the BFCL v4 multi\-turn domains \(e\.g\., Twitter, file system\), all instantiating the taxonomy above\. The Retail FSM, for example, defines\|Σ\|=25\|\\Sigma\|\\\!=\\\!25states \(including domain\-specific instances such asauth\_email\_prompt,info\_gathering\_order\_id,search\_order,order\_found,action\_confirm\_cancel,cancel\_success\) and\|Δ\|=35\|\\Delta\|\\\!=\\\!35transitions; the Airline and BFCL multi\-turn FSMs reach comparable scale\. A representative transition record:

\{"from\_state": "info\_gathering\_order\_id","to\_state": "search\_order","action": "search\_order","condition": "user supplies order ID","probability": 1\.0, "weight": 1\.0,"is\_critical": false,"provenance\_tag": \{"search\_order": \{"order\_id": "prev\_user\_msg"\}\}\}Adding a new domain therefore requires only supplying its tool documentation for this mapping; no change to𝒮decl\\mathcal\{S\}\_\{\\text\{decl\}\}, the executor protocol, or downstream agents is needed\.

### A\.2𝒱spec\\mathcal\{V\}\_\{\\text\{spec\}\}: Structural Constraints and Long\-Tail Coverage

The verifier𝒱spec\\mathcal\{V\}\_\{\\text\{spec\}\}rejects an FSMℱ\\mathcal\{F\}produced by𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}on three routine sanity checks \(topological legality ofΣ,Δ\\Sigma,\\Delta; existence of at least one length\-NNpath fromσ0\\sigma\_\{0\}; argument completeness of𝒯δ\\mathcal\{T\}\_\{\\delta\}for every required argument\) and triggers regeneration\. A more substantive constraint forbidsPoP\_\{o\}andPuP\_\{u\}on the first edge \(outgoing fromσ0\\sigma\_\{0\}\)\. This is the most frequent failure mode we observed in𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}’s raw output: because the FSM is drafted in one pass, the very first turn is often declared to reuse a prior return or an earlier user message even though no prior turn exists\. Rejecting such skeletons at the verifier removes this “first\-turn reference to non\-existent context” error before any planning cost is incurred\.

#### Long\-tail coverage via inverse\-frequency emphasis\.

Pure unconstrained sampling lets head tools dominateℱ\\mathcal\{F\}and starves rare tools of training signal\. We maintain a flat call\-frequency histogramH:𝒯→ℕH:\\mathcal\{T\}\\to\\mathbb\{N\}across all synthesized trajectories and, for each new FSM, sample an emphasis subsetℰ⊆𝒯\\mathcal\{E\}\\subseteq\\mathcal\{T\}under inverse\-frequency weighting;𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}must commit at least one turn whose call list intersectsℰ\\mathcal\{E\}\.HHencodes only tool frequencies, not inter\-tool dependencies, so the resulting bias does not leak any graph structure back intoℱ\\mathcal\{F\}\.

### A\.3𝒜plan\+ε\\mathcal\{A\}\_\{\\text\{plan\}\}\+\\varepsilon: Filling Protocol

𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}fills each calltit\_\{i\}in turnδk\\delta\_\{k\}in a refill\-on\-failure loop\. Two design choices are worth highlighting\.

#### Two parallel outputs\.

The planner emits two parallel objects per call:

\(𝜽iexec,𝜽iprov\)∼𝒜plan​\(ti,𝒯δ​\[ti\],ℋ<k,c0,ℓlast\),\(\\boldsymbol\{\\theta\}^\{\\text\{exec\}\}\_\{i\},\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\_\{i\}\)\\sim\\mathcal\{A\}\_\{\\text\{plan\}\}\\\!\\left\(t\_\{i\},\\mathcal\{T\}\_\{\\delta\}\[t\_\{i\}\],\\mathcal\{H\}\_\{<k\},c\_\{0\},\\ell\_\{\\text\{last\}\}\\right\),\(4\)where𝜽iexec\\boldsymbol\{\\theta\}^\{\\text\{exec\}\}\_\{i\}holds the executor\-bound argument values and𝜽iprov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\_\{i\}holds the per\-argument Provenance Tag and \(if applicable\) the upstream reference\. Decoupling the two tracks lets the executor proceed with𝜽iexec\\boldsymbol\{\\theta\}^\{\\text\{exec\}\}\_\{i\}while every fallback escalation or upstream rebinding is logged into𝜽iprov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\_\{i\}without disturbing dispatch\.

#### Error feedback as in\-context signal\.

On a failed call, the executor errorℓlast\\ell\_\{\\text\{last\}\}is fed back into the next prompt rather than discarded\. This converts the executor into an in\-context critic for the planner LLM, which empirically removes most repeated schema/type errors within a couple of refills\. If a call still fails after the cap, the trajectory is truncated at the current turn, and trajectories left too short are dropped to avoid degenerate samples\.

### A\.4𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}: Intra\-Turn Parallelization Grouping

Many tool\-set backends admit multiple parallel calls within a single turn \(e\.g\., independent lookups\)\. After all calls of a turn are bound \(i\.e\., arguments filled and validated\),𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}partitions them into ordered groups\(G1,…,Gp\)\(G\_\{1\},\\dots,G\_\{p\}\)such that noPoP\_\{o\}edge lies within a group \(at execution time, intra\-group returns become visible only after the entire group completes\), with groups ordered by minimum call index\.

### A\.5𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}: Resolving thePuP\_\{u\}Dependency Cycle

ThePuP\_\{u\}type is the only source whose dialogue rendering lies outside𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}’s purview, since user messages are synthesized later by𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}\. We resolve the cycle through a remap\-bind\-restore protocol mediated by a virtual historyΔv\\Delta\_\{v\}\.

#### Virtual historyΔv\\Delta\_\{v\}\.

Δv\\Delta\_\{v\}is a per\-turn list of*pending introductions*:Δv​\[k\]=\{\(p1,v1\),\(p2,v2\),…\}\\Delta\_\{v\}\[k\]=\\\{\(p\_\{1\},v\_\{1\}\),\(p\_\{2\},v\_\{2\}\),\\dots\\\}, meaning “uku\_\{k\}must explicitly introduce valuesv1,v2,…v\_\{1\},v\_\{2\},\\dotsfor downstream consumption\.”𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}populatesΔv\\Delta\_\{v\}during planning;𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}later consumes it in turn order\.

#### Remap\-bind\-restore\.

For each argumentppwithsrc⁡\(p\)=Pu\\mathrm\{src\}\(p\)=P\_\{u\}at turnkk, the planner first samples an anchor turnk⋆<kk^\{\\star\}<k, avoiding turns that already anchor an unrelated value of the same surface form \(otherwise the later disambiguator could not tell two homonymous anchors apart\)\. It then*temporarily*setssrc⁡\(p\)←Pc\\mathrm\{src\}\(p\)\\leftarrow P\_\{c\}and invokes the filling protocol of Appendix[A\.3](https://arxiv.org/html/2609.06124#A1.SS3)to obtain a concrete valuevvthat passes executor validation\. Finally, it restores the tag toPuP\_\{u\}\(recordingk⋆k^\{\\star\}as the anchor turn\) and appends\(p,v\)\(p,v\)toΔv​\[k⋆\]\\Delta\_\{v\}\[k^\{\\star\}\]\.

#### Closure check\.

After all turns are planned, a closure check verifies that everyPuP\_\{u\}argument with anchork⋆k^\{\\star\}has a matching pair inΔv​\[k⋆\]\\Delta\_\{v\}\[k^\{\\star\}\]and that𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}later emitsvvas an explicit literal inuk⋆u\_\{k^\{\\star\}\}under normalized \(case\- and whitespace\-insensitive\) matching\. Closure failures roll back the trajectory\. Conceptually, the trick is thatPcP\_\{c\}depends on no upstream, so reassigning the tag yields a value that is both executor\-valid and free to appear anywhere earlier in the dialogue;Δv\\Delta\_\{v\}is the bridge that turns this freedom into a contract honored by𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}\.

### A\.6𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}: Must\-Mention Dispatch and Per\-Call Synthesis

𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}synthesizesuku\_\{k\}under a per\-turn must\-mention listℳk\\mathcal\{M\}\_\{k\}derived from𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}andΔv​\[k\]\\Delta\_\{v\}\[k\]\. Four markers cover all surface behaviors of values inuku\_\{k\}\(Table[4](https://arxiv.org/html/2609.06124#A1.T4)\)\.PiP\_\{i\}values that the assistant can discover via auxiliary read\-only calls \(e\.g\., listing the current directory\) are dropped fromℳk\\mathcal\{M\}\_\{k\}; only those that must be passed verbatim into a tool argument \(IDs, credentials, token\-like fields\) are marked\[FROM\_CONFIG\]\.

Table 4:Must\-mention markers dispatched by the orchestrator to𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}for user\-message synthesis\.#### Per\-call decomposition\.

A naive prompt would hand𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}the entireℳk\\mathcal\{M\}\_\{k\}and ask foruku\_\{k\}in one shot; in practice this causes the LLM to overload the front ofuku\_\{k\}with literals and skip later constraints\. We instead sliceℳk\\mathcal\{M\}\_\{k\}per call,

ℳk=⨆i=1nℳk\(i\),\\mathcal\{M\}\_\{k\}=\\bigsqcup\_\{i=1\}^\{n\}\\mathcal\{M\}\_\{k\}^\{\(i\)\},\(5\)whereℳk\(i\)\\mathcal\{M\}\_\{k\}^\{\(i\)\}contains only the slots thatcic\_\{i\}actually consumes, generate an intent fragmentϕi\\phi\_\{i\}for eachcic\_\{i\}under its slice, and concatenate the fragments with sequencing connectives:

uk=Compose⁡\(ϕ1,…,ϕn\),u\_\{k\}=\\mathrm\{Compose\}\(\\phi\_\{1\},\\dots,\\phi\_\{n\}\),\(6\)ϕi=𝒜msg​\(ci∣ℋ<k,ℳk\(i\)\)\.\\phi\_\{i\}=\\mathcal\{A\}\_\{\\text\{msg\}\}\(c\_\{i\}\\mid\\mathcal\{H\}\_\{<k\},\\mathcal\{M\}\_\{k\}^\{\(i\)\}\)\.\(7\)The per\-call decomposition yields by construction the property that every ground\-truth call has a corresponding semantic expression inuku\_\{k\}, which removes the need for an additional “call coverage” post\-check\.

#### Four prompt\-level constraints\.

On top ofℳk\(i\)\\mathcal\{M\}\_\{k\}^\{\(i\)\}, the fragment prompt enforces four semantic constraints that empirically suppress the most common degenerations: \(i\)uku\_\{k\}is the sole signal driving the assistant on tool\-call turns, so it cannot rely on assistant clarification; \(ii\) every entry inℳk\(i\)\\mathcal\{M\}\_\{k\}^\{\(i\)\}must be matched by an expression inϕi\\phi\_\{i\}; \(iii\) the semantic direction ofϕi\\phi\_\{i\}must agree withcic\_\{i\}’s actual operation \(whencic\_\{i\}isunfollow,ϕi\\phi\_\{i\}must not express “follow”\); \(iv\) whenuku\_\{k\}belongs to a different intent family from prior turns \(e\.g\., search→\\todelete\), the shift must be expressed explicitly\. These collectively prevent silently mis\-aligned user messages from passing the downstream LLM judge\.

#### Assistant text responses\.

On turns with𝒞k=∅\\mathcal\{C\}\_\{k\}=\\varnothing,𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}uses a dedicated prompt \(e\.g\.,ASSIST\_CLARIFY\_PROMPTfor MissParam\) and is required to \(i\) address the immediately preceding user intent \(e\.g\., request the missing argument\), \(ii\) introduce no new tool call or capability promise, and \(iii\) not disclose information that the real tool returns have not exposed\. The prior context visible to𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}is the real executed history \(calls, arguments, returns, descriptions\), so both user and assistant text are grounded against actual returns rather than speculative ones\.

### A\.7Challenge\-Scenario Rewrite Operators

Both rewrite operators take a validated base trajectory and produce a hard variant; the salient trick they share is an executor\-replay check: the rewritten trajectory is re\-executed throughε\\varepsilonand accepted only when its execution outcome matches the original base\. Without this check, vague\-reference rewrites or toolkit removals can silently produce unsolvable trajectories\.

#### Ψparam\\Psi\_\{\\text\{param\}\}\(MissParam\)\.

The operator samples one or more arguments withsrc⁡\(p\)=Pc\\mathrm\{src\}\(p\)=P\_\{c\}from the base, replaces the corresponding literals inuk∗u\_\{k^\{\*\}\}with vague references \(“report\.pdf”→\\to“that file”\), and empties turnk∗k^\{\*\}’s ground\-truth call list\. The assistant therefore emits a clarification request synthesized by𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}in place of a tool call\. A new reveal turn is inserted at positionk∗\+1k^\{\*\}\+1in which𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}generates a natural user message surfacing the missing values, and the original call is rebound at this turn\. Multiple missing arguments may be revealed in a single turn or spread across several reveal turns; the operator is agnostic to the dataset’s exact clarification format \(free text, arequest\_for\_infoslot, etc\.\)\.

#### Ψfunc\\Psi\_\{\\text\{func\}\}\(MissFunc\)\.

The operator removes a toolt∗t^\{\*\}that the base actually invokes from the visible toolkit at turnk∗k^\{\*\}, so the assistant cannot proceed\. A user\-side handoff message is injected whose semantic event is “new tools have been registered into the visible toolkit,” re\-exposing𝒯\\mathcal\{T\}; the assistant then invokest∗t^\{\*\}atk∗\+1k^\{\*\}\+1\. Both the validator and the training objective are driven by this semantic event, not the surface wording, so alternative carriers \(a system\-side marker, an external tool\-registry event\) are interchangeable; this keepsΨfunc\\Psi\_\{\\text\{func\}\}compatible with future handoff paraphrase strategies\.

## Appendix BAdditional Ablation Studies

This appendix complements the main\-paper ablations of §[5\.3](https://arxiv.org/html/2609.06124#S5.SS3)with three pipeline\-side studies: a synthesis\-cost estimate \(§[B\.1](https://arxiv.org/html/2609.06124#A2.SS1)\), a cross\-backbone fallback\-rate analysis \(§[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)\), and a pipeline\-component ablation on data\-generation success rate \(§[B\.3](https://arxiv.org/html/2609.06124#A2.SS3)\)\.

### B\.1Synthesis Cost

We reran the same synthesis pipeline while recording API usage for 500 validated multi\-turn trajectories\. The measured average cost was $0\.49 per trajectory\. Extrapolating this cost under the same pipeline configuration and trajectory mix gives an estimated cost of approximately $4,410 for the released set of about 9k trajectories\. This estimate covers synthesis\-time API usage and excludes SFT training and downstream evaluation\. Because comparable trajectory\-level billing logs are unavailable for existing methods, we do not make a direct numerical cost comparison; local retry is expected to avoid some recomputation by refilling only failed calls rather than regenerating complete trajectories\.

### B\.2Plan\-Agent Fallback Rate Across Backbones

To assess how faithfully different backbones honor the FSM\-declared sources, we run𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}on the same 500 FSM skeletons with four backbones and measure thePfP\_\{f\}rate, defined as the fraction of filled arguments for which the declareds0∈\{Pi,Po,Pu\}s\_\{0\}\\in\\\{P\_\{i\},P\_\{o\},P\_\{u\}\\\}cannot be used directly and the planner records a recovery binding\. A recovery uses aPiP\_\{i\}orPcP\_\{c\}value when permitted; the resulting call is executor\-validated after binding, and the originals0s\_\{0\}remains infallback\_from\. This is an*argument\-level*fallback \(thePfP\_\{f\}Provenance Tag of §[3\.3](https://arxiv.org/html/2609.06124#S3.SS3)\)\. We also report the distribution of declared sources actually consumed \(PiP\_\{i\}/PoP\_\{o\}/PcP\_\{c\}\)\.PuP\_\{u\}arguments are counted underPcP\_\{c\}in this distribution, because the remap\-bind\-restore protocol of Appendix[A\.5](https://arxiv.org/html/2609.06124#A1.SS5)binds their values through thePcP\_\{c\}path at fill time and only restores the tag afterwards; the three source columns and Fb\.% therefore sum to 100 up to rounding\. Lower fallback indicates stricter adherence to the Provenance Invariant\. This study is a separate synthesis run from the pipeline ablation of Appendix[B\.3](https://arxiv.org/html/2609.06124#A2.SS3), using its own sampled skeletons and initial configs, so the absolute proportions are not directly comparable across the two tables\.

Table 5:Cross\-backbonePfP\_\{f\}study on identical FSM skeletons\. Traj is the number of trajectories and Args the total number of filled arguments across them; Fb\.% is the runtime fallback rate; the remaining columns show the distribution of declared sources actually consumed by𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}\.#### Observations\.

\(i\) Gemini\-3\.1 Pro achieves the lowest fallback \(2\.02%\) and the highestPiP\_\{i\}utilization \(42\.7%\), indicating the strongest adherence to declared sources\. \(ii\) Qwen3\.5\-Plus shows the highest fallback \(4\.82%\) with heterogeneousfallback\_fromlabels \(default,user\_request,user\_intent\), suggesting weaker compliance with the FSM\-imposed source constraint\. \(iii\) DeepSeek\-V4\-Flash exhibits an atypical distribution:PoP\_\{o\}drops to 9\.2% whilePcP\_\{c\}climbs to 59\.4%, and the total argument count is the lowest \(3,253 vs\. 4,348 for Gemini\-3 Pro on the same skeletons\)\. The backbone tends to fabricate literals rather than reference prior tool returns, producing shorter trajectories\. \(iv\) Gemini\-3 Pro sits in the middle \(2\.76%\) with all fallbacks routed throughPcP\_\{c\}, giving the most predictable failure mode\. Our main pipeline therefore stays within the Gemini family: Gemini\-3\.1 Pro drives𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}, whose cost is amortized because one skeleton yields several sampled trajectories, while𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}uses Gemini\-3 Pro, whose endpoint remained stable at the request throughput a full synthesis run requires\.

### B\.3Pipeline\-Level Ablation

Table[6](https://arxiv.org/html/2609.06124#A2.T6)reports the effect of turning off individual pipeline components on data generation success rate and argument\-source distribution\. All variants use Gemini\-3 Pro as the backbone and share the same toolset and initial\-config pool\. This is an independent synthesis run from the cross\-backbone study of Appendix[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)\(different sampled FSM skeletons and initial configs\), so the absolute source proportions differ from Table[5](https://arxiv.org/html/2609.06124#A2.T5); only within\-table comparisons across variants are meaningful\. We generate 500 trajectories per variant and measure the executor pass\-rate \(Succ\) and the fraction of arguments assigned to each source type \(including the argument\-level fallback ratePfP\_\{f\}\), withPuP\_\{u\}again counted underPcP\_\{c\}as in Appendix[B\.2](https://arxiv.org/html/2609.06124#A2.SS2)\. In the Full, FSM\+noTag, and noRetry variants, the FSM samples up to 3 paths per trajectory and each call can be refilled up to 3 times on executor failure\. In the noFSM variants, only a single path is generated \(no FSM path sampling\), but the per\-call 3\-retry refill budget remains\.

Table 6:Pipeline\-level ablation\. FSM = structure\-first skeleton; Tag = Provenance Tag declarations; Succ = trajectories that pass executor validation;PfP\_\{f\}= argument\-level fallback rate; remaining columns show the fraction of arguments assigned to each source type \(PuP\_\{u\}counted underPcP\_\{c\}\)\.Several patterns stand out\. \(i\) Removing the FSM skeleton \(noFSM\+Tag\) nearly halves the success rate \(89%→\\to50%\) and drastically increases the argument\-level fallback rate to 15\.75%\. This confirms that the FSM’s structure\-first prior is the primary guarantor of causal chain existence: without the FSM’s macro\-level path planning,𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}degenerates into free\-form turn\-by\-turn generation\. Although the historical context is preserved, the generated tool\-call sequences misalign with the Tag\-declared causal dependencies \(i\.e\., a Tag declares a need forPoP\_\{o\}, but the preceding tools fail to produce that specific return\)\. Consequently, a massive number of declaredPoP\_\{o\}sources cannot be matched in the history, forcing the planner to fall back toPcP\_\{c\}\. \(ii\) Removing only the Provenance Tags \(FSM\+noTag\) actually yields a slightly higher pass\-rate \(92%\) and zero fallback, but produces zeroPoP\_\{o\}arguments; the pipeline reverts to generating only local \(PiP\_\{i\}andPcP\_\{c\}\) sources, losing all cross\-turn dependency structure\. \(iii\) Disabling per\-call retry \(noRetry\) cuts the success rate to 54%, highlighting the importance of the executor\-in\-the\-loop refill mechanism\. \(iv\) The noFSM\+noTag variant confirms that the FSM and Tag components are complementary: without either, the pipeline produces only local arguments at a moderate pass\-rate\. Together, these results complement the training\-level ablations of Table[3](https://arxiv.org/html/2609.06124#S5.T3)by showing that FSM, Tag, and Retry each contribute a distinct and necessary function at the data\-generation stage\.

### B\.4Out\-of\-Distribution Generalization on BFCL Single\-Turn

SAP\-4B is trained exclusively on multi\-turn trajectories synthesized by the pipeline of §[4](https://arxiv.org/html/2609.06124#S4)\. To probe whether this multi\-turn\-focused training transfers to settings that differ in both interaction structure and task distribution, we evaluateSAP\-4B on the BFCL v4 single\-turn track \(Table[7](https://arxiv.org/html/2609.06124#A2.T7)\), which is split into two complementary subsets:

- •Non\-live\(simple, parallel, multiple, parallel\_multiple, irrelevance\): static, BFCL\-authored benchmark tasks\. The distribution is controlled and reproducible; performance here primarily reflects basic function\-calling capability \(tool selection, argument filling, intra\-turn parallelism\)\.
- •Live\(live\_simple, live\_parallel, live\_multiple, live\_parallel\_multiple, live\_relevance, live\_irrelevance\): real\-world user\-contributed queries with noisier phrasing and broader intent coverage\. Performance here is more sensitive to generalization and robustness\.

Table 7:BFCL v4 single\-turn results \(accuracy, %\)\. Backbone is Qwen3\-4B\-Instruct\-2507;SAP\-4B is the same backbone after SFT onSAPdata\. Multi\-turn\-only training neither degrades single\-turn performance nor regresses on the noisier Live split, and yields small consistent gains on both subsets\.Two takeaways\. First, multi\-turn\-only training does not regress on single\-turn tasks: Non\-live accuracy edges up by\+0\.52\+0\.52, indicating that the multi\-turn argument\-provenance prior does not interfere with single\-step tool selection or argument filling\. Second, Live accuracy improves by a comparable\+0\.54\+0\.54; since Live queries are out\-of\-distribution with respect to both the synthesis\-time tool schemas and the multi\-turn structure, this constitutes a mild but consistent OOD generalization signal\. The overall lift \(\+0\.53\+0\.53\) is modest in absolute magnitude but uniformly positive, suggesting that the structural prior induced by Provenance Tag constraints transfers as auxiliary signal even when the trajectory collapses to a single turn\.

## Appendix CCase Study: Local vs\. Cross\-Turn Argument Grounding

To illustrate howSAP’s provenance constraints shape trajectory structure, we present two simplified trajectories \(Figures[4](https://arxiv.org/html/2609.06124#A3.F4)and[5](https://arxiv.org/html/2609.06124#A3.F5)\)\. Trajectory A uses only local sources; Trajectory B contains a cross\-turnPoP\_\{o\}dependency\. Table[8](https://arxiv.org/html/2609.06124#A3.T8)summarizes their dependency profiles\.

Table 8:Source distribution and max dependency span for the two case\-study trajectories\.Trajectory A: Local Grounding Only \(Travel domain\)Turn 1
User:“Show me all the credit cards saved on my travel account\.”
Assistant:<tool\_call\>\[get\_all\_credit\_cards\(\)\]</tool\_call\><tool\_response\>\[\{"credit\_card\_list": \{"CARD001": \{\.\.\.\},"CARD002": \{\.\.\.\}\}\}\]</tool\_response\>Turn 2
User:“Now calculate how much 1\.0 USD is in EUR\.”
Assistant:<tool\_call\>\[compute\_exchange\_rate\(base\_currency="USD",target\_currency="EUR", value=1\.0\)\]</tool\_call\><tool\_response\>\[\{"exchanged\_value": 0\.91\}\]</tool\_response\>⊳\\vartrianglerightbase\_currency,target\_currency,value:PcP\_\{c\}Figure 4:Trajectory A with only local sources\. The three argument slots ofcompute\_exchange\_rateare user\-supplied literals \(PcP\_\{c\}\); the preceding zero\-argument call contributes no argument slot, and no argument depends on a prior turn \(L=0L\{=\}0\)\.Trajectory B: Cross\-TurnPoP\_\{o\}Dependency \(Twitter domain\)Turn 1
User:“First check whether I’m logged in, then show me a list of all the accounts I’m currently following\.”
Assistant:<tool\_call\>\[posting\_get\_login\_status\(\), list\_all\_following\(\)\]</tool\_call\><tool\_response\>\[\{"login\_status": true\}, \{"following\_list": \["dev\_tips","popular\_science", "movie\_reviews", "ai\_updates", "nature\_news"\]\}\]</tool\_response\>Turn 2
User:“Now post a tweet with the text ‘Trying to tweet more intentionally…’\.”
Assistant:<tool\_call\>\[post\_tweet\(content="Trying to tweet more intentionally\.\.\."\)\]</tool\_call\><tool\_response\>\[\{"id": 16, \.\.\.\}\]</tool\_response\>Turn 3
User:“Now mention all the accounts I follow in that tweet\.”
Assistant:<tool\_call\>\[mention\(tweet\_id=16, mentioned\_usernames=\["dev\_tips","popular\_science", "movie\_reviews", "ai\_updates","nature\_news"\]\)\]</tool\_call\><tool\_response\>\[\{"mention\_status": "success"\}\]</tool\_response\>⊳\\vartrianglerightcontent:PcP\_\{c\}\(Turn 2\);tweet\_id:PoP\_\{o\}\(k′=2,j′=1,id\)\(k^\{\\prime\}\{=\}2,j^\{\\prime\}\{=\}1,\\texttt\{id\}\);mentioned\_usernames:PoP\_\{o\}\(k′=1,j′=2,following\_list\)\(k^\{\\prime\}\{=\}1,j^\{\\prime\}\{=\}2,\\texttt\{following\\\_list\}\)Figure 5:Trajectory B with cross\-turnPoP\_\{o\}dependencies: Turn 3’smentionconsumestweet\_idfrom Turn 2’spost\_tweetreturn andmentioned\_usernamesfrom Turn 1’slist\_all\_followingreturn \(maximum spanL⋆=2L^\{\\star\}\{=\}2\)\.In Trajectory A, every argument is a literal that the user supplies in the same turn that consumes it \(PcP\_\{c\}\); no cross\-turn propagation occurs, and all arguments haveL=0L=0\. In Trajectory B, by contrast, thementioncall consumes two cross\-turn values:tweet\_idfrom Turn 2’spost\_tweetreturn \(L=1L=1\) andmentioned\_usernamesfrom Turn 1’slist\_all\_followingreturn \(L=2L=2\)\.SAPproduces these dependencies by design: the FSM skeleton declares thePoP\_\{o\}edges at plan time, and𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}resolves them against the real executor state before binding\. Both trajectories are valid multi\-turn dialogues, butSAP’s provenance constraints make Trajectory B the representative case, directly addressing the dependency\-gap diagnostic of §[3](https://arxiv.org/html/2609.06124#S3)\.

## Appendix DPrompt Templates

This appendix lists condensed English templates of the four core prompts used by the three agents and the rewrite operators \(Figures[6](https://arxiv.org/html/2609.06124#A4.F6)–[10](https://arxiv.org/html/2609.06124#A4.F10)\)\. Boilerplate \(login etiquette, path conventions, output\-format reminders\) and few\-shot examples are omitted; the released code carries the full prompts\. Cyan placeholders such as\{N\}are filled at synthesis time\.

𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}: FSM Skeleton Synthesis<task\>
You are an FSM designer\. Build executable, logically sound, diverse FSM skeletons for multi\-turn tool\-calling dialogs over a target toolset\.
</task\>
<structural\_constraints\>
\- Exactly one state withtype="initial"; at least one terminal state\.
\- Each turn carries fieldsfrom / to / action / function\_calls / prov\_tag\.
\-function\_callshas length 1–10; names must come exactly from the provided tool list\.
</structural\_constraints\>
<design\_constraints\>
\- DAG\-structured \(no cycles\); depth≥\\geq\{N\}fromσ0\\sigma\_\{0\}\.
\- Call\-count distribution:∼\\sim40% turns with 2–4 calls,∼\\sim45% with 5–7,∼\\sim15% with one\. Each combination must reflect a realistic single\-step user intent\.
\- Cross\-turn dependencies: later turns may reference earlier returns or user\-supplied values\.
\- Order: login first; search before result\-dependent actions; status\-check tools only in “check” intents\.
\- Long\-tail coverage: at least one turn must use a tool from the emphasis subset\{emphasis\_set\}\.
</design\_constraints\>
<provenance\_tag\_declaration\>
For every required argument, declareprov\_tag\[tool\]\[param\]from one of:
\-initial\_state: value pre\-exists in the initial\-state summary \(IDs, filenames, credentials\)\.
\-prev\_output: value read from a prior tool’s return\.
\-self\_create: new user\-supplied value \(new filename, tweet text, search keyword\)\.
\-prev\_user\_msg: value already provided in an earlier user message\.
Rules: every required param must appear; the first turn out ofσ0\\sigma\_\{0\}may NOT useprev\_outputorprev\_user\_msg; login credentials must useinitial\_state\.
</provenance\_tag\_declaration\>
<inputs\>
Available tools:\{tool\_summaries\}
Initial\-config summary:\{initial\_state\}
</inputs\>
<output\>
Output ONLY<fsm\>JSON</fsm\>matching\{schema\_hint\}\. No explanatory text\.
</output\>Figure 6:Prompt template for𝒜FSM\\mathcal\{A\}\_\{\\text\{FSM\}\}\(FSM skeleton synthesis\)\.𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}: Per\-Call Argument Filling<task\>
You are filling parameters for a SINGLE tool call at turn\{turn\_idx\}\. Tool to call:\{func\_name\}\.
</task\>
<inputs\>
\- Tool signature: description, required params, properties:\{tool\_doc\}
\- Declared Provenance Tags from Phase 1 FSM:\{prov\_tag\}
\- Previous turns history \(executed calls and their returns\):\{history\}
\- Initial state \(starting state; may be modified by earlier turns\):\{initial\_state\}
\- Last attempt error \(if refill\):\{last\_error\}
</inputs\>
<output\_format\>
Output<result\>JSON</result\>with two keys:
\-args\_for\_exec: the actual parameter values for execution\.nullis only acceptable for OPTIONAL params whose documentation explicitly states thatnullmeans “no filter / default behavior”\.
\-args\_provenance: per\-argument provenance metadata\.srcMUST be one of:
•initial\_state: value from initial state \(also setconfig\_path\)
•prev\_output: value from a prior turn’s tool return \(also setref\_turnandref\_field\)
•self\_create: value you create in this turn
•prev\_user\_msg: value the user provided in an earlier turn \(also setintroduce\_in\_turn<<current turn\)
•fallback: declared upstream is unavailable and this binding uses a recovery value; the resulting call must then be validated by execution \(also setfallback\_fromto the original src\)
</output\_format\>
<rules\>
\- If the declared source is unavailable, recover the argument fromPiP\_\{i\}orPcP\_\{c\}when permitted\. Recordfallbackwhenever this recovery path replaces the declared source\. Bind the recovery value and let the executor validate the resulting call\.
\- NEVER fabricate existing entities or credentials: IDs, tokens, usernames, passwords, or existing resource paths must be grounded in an executor\-visible source\.
\- Forprev\_user\_msg,introduce\_in\_turnmust be strictly before the current turn\.
\- Forprev\_output,ref\_turn/ref\_fieldmust identify a real prior return field\.
</rules\>Figure 7:Prompt template for𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}\(per\-call argument filling\)\. The two\-track output\(𝜽exec,𝜽prov\)\(\\boldsymbol\{\\theta\}^\{\\text\{exec\}\},\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}\)corresponds toargs\_for\_execandargs\_provenance\.𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}: User\-Message Synthesis<task\>
You are a multi\-turn dialogue data generator\. Given a tool\-calling sequence \(GT\) for the current turn, generate the corresponding natural user message\.
</task\>
<inputs\>
\- Prior conversation history \(the user said what, the assistant called which tools, what they returned\):\{prior\_text\}
\- Current turn’s expected tool calls \(GT\):\{turn\_gt\}
\- Per\-argument source guide for this turn \(the must\-mention list\{must\_mention\}, marker semantics below\)\.
</inputs\>
<must\_mention\_markers\>
Express each parameter according to its source marker:
\-\[NEW\]: explicitly state the value \(e\.g\., filename, number, keyword\)\.
\-\[FROM\_HISTORY\]: use a vague reference \(“that file”, “the ID you found earlier”\); do NOT repeat the exact value, but the reference must be unambiguous\.
\-\[FROM\_CONFIG\]: explicitly state the exact value verbatim\. The assistant cannot read the initial state, so IDs, credentials, and token\-like fields must appear character\-for\-character\.
\-\[FALLBACK\_from\_…\\ldots\]: the original source was unavailable and a value was created; treat as\[NEW\]and state it explicitly\.
</must\_mention\_markers\>
<core\_constraints\>
1\.Assistant capability boundary: the assistant can ONLY call tools, not reply with text\. The user message is the only input driving its behavior; it must contain enough information for correct tool calls\.
2\.Parameter completeness: every parameter used this turn must be naturally expressed in the user message according to its marker\.
3\.Semantic alignment: the user message’s semantic direction must match what the tools actually do \(e\.g\.,unfollow≠\\neq“follow”,rm= “delete”\)\.
4\.Intent\-shift handling: if this turn’s intent differs from prior turns, explicitly state the transition\.
5\.History is fact: write the message conditioned on the provided history; do not modify history\.
6\.Full GT coverage: if the GT listsnntool calls, the user message must naturally cover*every*call \(chain them with “first …, then …, finally …” when needed\)\.
</core\_constraints\>
<style\>
60% conversational \+ 40% instructional; 1–3 sentences; named values quoted; never reference tool internals\.
</style\>
<output\>
<msg\>\{"turn\_idx":\{turn\_idx\}, "user\_msg": "…"\}</msg\>
</output\>Figure 8:Prompt template for𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}on user\-message synthesis\. The must\-mention list is pre\-rendered by the dispatcher of Appendix[A\.6](https://arxiv.org/html/2609.06124#A1.SS6)from𝜽prov\\boldsymbol\{\\theta\}^\{\\text\{prov\}\}andΔv\\Delta\_\{v\}, with each entry already tagged\[NEW\]/\[FROM\_HISTORY\]/\[FROM\_CONFIG\]/\[FALLBACK from…\\ldots\]\.𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}: Assistant Text Response \(on no\-tool\-call turn\)<task\>
You are the assistant in a multi\-turn tool\-calling conversation\. Write the NEXT assistant reply body when this turn has no further tool calls\.
</task\>
<requirements\>
1\. Output ONLY natural language, no tool calls, no JSON, no placeholders\.
2\. If tasks have been completed, briefly summarize and ask if anything else is needed\.
3\. If the task cannot continue \(missing tool, missing argument, permission\), explain why politely and suggest next steps\.
4\. Match the language of the user\.
5\. Report errors honestly: never claim success when prior tool returns containerror / fail / exception / empty / NULL\.
6\. NEVER answer the requested tool\-action from general knowledge, NEVER invent a result, NEVER claim the action was done unless prior tool messages prove it\.
7\. Blocking\-reply rule: if later turns may supply more tools or missing arguments, this current reply must state what is missing rather than pre\-computing the answer\.
</requirements\>Figure 9:Prompt template for𝒜msg\\mathcal\{A\}\_\{\\text\{msg\}\}on assistant text responses \(turns with𝒞k=∅\\mathcal\{C\}\_\{k\}=\\varnothing\)\.Rewrite\-Operator Hints \(Ψparam\\Psi\_\{\\text\{param\}\},Ψfunc\\Psi\_\{\\text\{func\}\}\)<MISS\_PARAM\_CLOSED\_LOOP\>
\(injected into𝒜plan\\mathcal\{A\}\_\{\\text\{plan\}\}at the recovery turnk∗\+1k^\{\*\}\+1\)
The previous turnk∗k^\{\*\}should have called\{tool\}but lacked required parameters\{missing\_params\}\. The current turn’s user message has supplied them\. Call\{tool\}now with all required parameters \(including the previously missing ones\), unless the user’s intent has clearly shifted, in which case call a more appropriate tool\. Logical alignment with the user takes priority over closing the loop\.
</MISS\_PARAM\_CLOSED\_LOOP\>
<TOOL\_INJECTION\>
\(injected at the recovery turnk∗\+1k^\{\*\}\+1\)
The current turn is a tool\-injection turn: the system has just registered new tools\{func\_names\}into the visible toolkit\. Prefer these newly registered tools when they match the user’s intent\. Even when\{question\_k\}is the empty list\[\], the ground truth must remain non\-empty: extract the required parameters from the prior turnk∗=k−1k^\{\*\}=k\-1, whose unmet request triggered the injection\.
</TOOL\_INJECTION\>
<MISSING\_FUNCTION\_REQUEST\>
\(injected at the request turnk∗k^\{\*\}, before the handoff message\)
The current turn is a request turn: the user asks for tools\{func\_names\}that are NOT yet in the visible function\-doc\. You MUST output\[\]for this turn, even if other tools are available; calling any tool here breaks the operator’s semantics\.
</MISSING\_FUNCTION\_REQUEST\>Figure 10:Hint templates injected by the rewrite operatorsΨparam\\Psi\_\{\\text\{param\}\}andΨfunc\\Psi\_\{\\text\{func\}\}\. Placeholders are filled at injection time\.

Similar Articles

SPADE: Self-Play in Adaptive Synthetic Executable Environments

Hugging Face Daily Papers

SPADE introduces a self-play reinforcement learning framework for language models that generates adaptive executable training environments to enhance reasoning and tool-use capabilities, demonstrating significant performance gains across multiple benchmarks.

RODS: Reward-Driven Online Data Synthesis for Multi-Turn Tool-Use Agents

arXiv cs.AI

This paper introduces RODS, a reward-driven online data synthesis method that addresses the depletion of informative samples in static datasets for multi-turn tool-use agent training. It achieves comparable performance to larger offline pipelines with significantly fewer trajectories.

@neural_avb: https://x.com/neural_avb/status/2072294078805684613

X AI KOLs Timeline

This paper introduces Autodata, a method that uses an agentic 'data scientist' AI to automate the creation of high-quality synthetic datasets through iterative generation, verification, and refinement, specifically optimized for reinforcement learning (GRPO) to improve reasoning in language models.

Agents That Build Better Training Data (25 minute read)

TLDR AI

Autodata introduces an agentic data scientist that iteratively generates and refines synthetic training data, with meta-optimization to further improve data quality, achieving better results on computer science and legal reasoning tasks.

SKT: Skill-Use Training at Scale via Verified Synthetic Data Generation

Hugging Face Daily Papers

Introduces SKT, a verified data synthesis pipeline for skill-use training of language model agents, producing 4,000 task packages and 27,164 verified trajectories from 2,000 public skills. Supervised fine-tuning on SKT-generated trajectories consistently improves skill-use performance across models and agent harnesses.