Turnslide: Scalable Multi-Turn Data Synthesis by Walking a Finite-State Machine
Aaron Fainman, Gabriela Kadlecov\'a, Maciej Gryka, Bartosz Kruszczy\'nski, Usman Zafar, C\'edric Archambeau, Aaron Klein, David Salinas,
Key points
From the paper's conclusion- We introduce a fully automated, lightweight synthesis framework that models each API as a finite-state machine, representing the system as abstract states that determine when each tool may be called, producing state-valid sequences of tools; sequences are translated into complete examples with a single LLM call.
Abstract
Small language models are inexpensive to serve and can run on private infrastructure, but base models are often not good enough at multi-turn tool calling, and fine-tuning them needs per-API data that rarely exists. Existing synthesis methods are too expensive for high-scale fine-tuning, as they often require mock operational environments for different domains and multiple LLM calls per generated conversation turn. We introduce a fully automated, lightweight synthesis framework that models each API as a finite-state machine, representing the system as abstract states that determine when each tool may be called, producing state-valid sequences of tools; sequences are translated into complete examples with a single LLM call. Rather than optimize diversity, we set a target distribution over the number of turns, the tool sequence and task complexity. We measure data quality by fine-tuning SLMs on generated trajectories, showing that our FSM-based generation significantly improves downstream accuracy over an unmutated baseline and, against existing works, reaches 70.7% full accuracy over 63.4% and 53.7% with 3.6-6.6$\times$ fewer tokens.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- ToolTurns: Benchmarking LLM Agents in Multi-Turn DialoguearXiv · 2026
- Scaling Laws for Tool-Use Agents via Controllable Environment SynthesisarXiv · 2026
- SchemaFill: Efficient LLM Tool Calling via Slot-Parallel Speculative DecodingarXiv · 2026
- TOUMAII: A 4.5M-Pair Tool-Calling Preference Dataset and Its Source-Agnostic GeneratorarXiv · 2026
- EnterpriseSynth: Zero-Execution SFT and Evaluation Data from OpenAPI SpecsarXiv · 2026
- Small agents should know what their tools doarXiv · 2026