Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning
Mingyang Chen, Haoze Sun, Tianpeng Li, Fan Yang, Hao Liang, Keer Lu, Bin Cui, Wentao Zhang, Zenan Zhou, Weipeng Chen
Abstract
Large Language Models (LLMs) have exhibited significant potential in performing diverse tasks, including the ability to call functions or use external tools to enhance their performance. While current research on function calling by LLMs primarily focuses on single-turn interactions, this paper addresses the overlooked necessity for LLMs to engage in multi-turn function calling-critical for handling compositional, real-world queries that require planning with functions but not only use functions. To facilitate this, we introduce an approach, BUTTON, which generates synthetic compositional instruction tuning data via bottom-up instruction construction and top-down trajectory generation. In the bottom-up phase, we generate simple atomic tasks based on real-world scenarios and build compositional tasks using heuristic strategies based on atomic tasks. Corresponding function definitions are then synthesized for these compositional tasks. The top-down phase features a multi-agent environment where interactions among simulated humans, assistants, and tools are utilized to gather multi-turn function calling trajectories. This approach ensures task compositionality and allows for effective function and trajectory generation by examining atomic tasks within compositional tasks. We produce a dataset BUTTONInstruct comprising 8k data points and demonstrate its effectiveness through extensive experiments across various LLMs 1 .
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.
Cited by top-tier papers11
- ReSearch: Learning to Reason with Search for LLMs via Reinforcement LearningMingyang Chen, Linzhuang Sun, Tianpeng Li, Haoze Sun et al.NeurIPS 2025 · 125 citations
- Magnet: Multi-turn Tool-use Data Synthesis and Distillation via Graph TranslationFan Yin, Zifeng Wang, I-Hung Hsu, Jun Yan et al.ACL 2025 · 23 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
- Imitation Learning for Multi-turn LM Agents via On-policy Expert CorrectionsNiklas Lauffer, Xiang Deng, Srivatsa Kundurthy, Brad Kenstler et al.ICML 2026 · 10 citations
Builds on12
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 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
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging FaceYongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li et al.NeurIPS 2023 · 1,778 citations
- Gorilla: Large Language Model Connected with Massive APIsShishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. GonzalezNeurIPS 2024 · 1,715 citations
- The Flan Collection: Designing Data and Methods for Effective Instruction TuningShayne Longpre, Le Hou, Tu Vu, Albert Webson et al.ICML 2023 · 908 citations
Related papers
- API-BLEND: A Comprehensive Corpora for Training and Benchmarking API LLMsKinjal Basu, Ibrahim Abdelaziz, Subhajit Chaudhury, Soham Dan et al.ACL 2024 · 6 citations
- GenesisFunc: Multi-Agent Data Generation for Accurate and Generalizable Function-CallingHao-Xiang Xu, Chong Deng, Jiaqing Liu, Wen Wang et al.ACL 2026
- ToolACE: Winning the Points of LLM Function CallingWeiwen Liu, Xu Huang, Xingshan Zeng, Xinlong Hao et al.ICLR 2025
- Trajectory2Task: Training Robust Tool-Calling Agents with Synthesized Yet Verifiable Data for Complex User IntentsZiyi Wang, Yuxuan Lu, Yimeng Zhang, Pei Chen et al.ACL 2026 · 9 citations
- AgentGen: Enhancing Planning Abilities for Large Language Model based Agent via Environment and Task GenerationMengkang Hu, Pu Zhao, Can Xu, Qingfeng Sun et al.KDD 2025 · 6 citations
