Magnet: Multi-turn Tool-use Data Synthesis and Distillation via Graph Translation
Fan Yin, Zifeng Wang, I-Hung Hsu, Jun Yan, Ke Jiang, Yanfei Chen, Jindong Gu, Long T. Le, Kai-Wei Chang, Chen-Yu Lee, Hamid Palangi, Tomas Pfister
Abstract
Large language models (LLMs) have exhibited the ability to effectively utilize external tools to address user queries. However, their performance may be limited in complex, multi-turn interactions involving users and multiple tools. To address this, we propose Magnet, a principled framework for synthesizing high-quality training trajectories to enhance the function calling capability of large language model agents in multi-turn conversations with humans. The framework is based on automatic and iterative translations from a function signature path to a sequence of queries and executable function calls. We model the complicated function interactions in multi-turn cases with graph and design novel node operations to build reliable signature paths. Motivated by context distillation, when guiding the generation of positive and negative trajectories using a teacher model, we provide reference function call sequences as positive hints in context and contrastive, incorrect function calls as negative hints. Experiments show that training with the positive trajectories with supervised fine-tuning and preference optimization against negative trajectories, our 14B model, M agn e t-14B-mDPO, obtains 68.01 on BFCL-v3 and 73.30 on ToolQuery, surpassing the performance of the teacher model Gemini-1.5-pro-002 by a large margin in function calling.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext e33609dc-3a03-49c8-b61e-d41620df16edCited by top-tier papers12
- Nemotron-Research-Tool-N1: Exploring Tool-Using Language Models with Reinforced ReasoningShaokun Zhang, Yi Dong, Jieyu Zhang, Jan Kautz et al.ICLR 2026 · 61 citations
- LoopTool: Closing the Data-Training Loop for Robust LLM Tool CallsKangning Zhang, Weiwen Liu, Wenxiang Jiao, Kounianhua Du et al.ACL 2026 · 18 citations
- Unsafer in Many Turns: Benchmarking and Defending Multi-Turn Safety Risks in Tool-Using AgentsXu Li, Simon Yu, Minzhou Pan, Yiyou Sun et al.ICML 2026 · 16 citations
- Unlocking Implicit Experience: Synthesizing Tool-Use Trajectories from TextZhihao Xu, Rumei Li, Jiahuan Li, Rongxiang Weng et al.ACL 2026 · 14 citations
- Don't Just Fine-tune the Agent, Tune the EnvironmentSiyuan Lu, Zechuan Wang, Hongxuan Zhang, Qintong Wu et al.ICLR 2026 · 13 citations
Builds on10
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
- Gorilla: Large Language Model Connected with Massive APIsShishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. GonzalezNeurIPS 2024 · 1,715 citations
- Self-Alignment with Instruction BacktranslationXian Li, Ping Yu, Chunting Zhou, Timo Schick et al.ICLR 2024 · 174 citations
- Building Math Agents with Multi-Turn Iterative Preference LearningWei Xiong, Chengshuai Shi, Jiaming Shen, Aviv Rosenberg et al.ICLR 2025 · 1 citation
Related papers
- Improving Large Language Models Function Calling and Interpretability via Guided-Structured TemplatesHy Dang, Tianyi Liu, Zhuofeng Wu, Jingfeng Yang et al.EMNLP 2025
- Tool Learning in the Wild: Empowering Language Models as Automatic Tool AgentsZhengliang Shi, Shen Gao, Lingyong Yan, Yue Feng et al.WWW 2025 · 59 citations
- Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction TuningMingyang Chen, Haoze Sun, Tianpeng Li, Fan Yang et al.ICLR 2025
- Self-Evolutionary Reinforced Knowledge Distillation for Multi-Modal Tool-Use AgentsLei Shen, Chengyu Wang, Yuanjie Lyu, Yuanhao Yue et al.KDD 2026
- Distilling LLM Agent into Small Models with Retrieval and Code ToolsMinki Kang, Jongwon Jeong, Seanie Lee, Jaewoong Cho et al.NeurIPS 2025 · 51 citations
