Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Chen, Mingyang, Sun, Haoze, Li, Tianpeng, Yang, Fan, Liang, Hao, Lu, Keer, Cui, Bin, Zhang, Wentao, Zhou, Zenan, Chen, Weipeng
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866917941884223488
author Chen, Mingyang
Sun, Haoze
Li, Tianpeng
Yang, Fan
Liang, Hao
Lu, Keer
Cui, Bin
Zhang, Wentao
Zhou, Zenan
Chen, Weipeng
author_facet Chen, Mingyang
Sun, Haoze
Li, Tianpeng
Yang, Fan
Liang, Hao
Lu, Keer
Cui, Bin
Zhang, Wentao
Zhou, Zenan
Chen, Weipeng
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_12952
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning
Chen, Mingyang
Sun, Haoze
Li, Tianpeng
Yang, Fan
Liang, Hao
Lu, Keer
Cui, Bin
Zhang, Wentao
Zhou, Zenan
Chen, Weipeng
Computation and Language
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.
title Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning
topic Computation and Language
url https://arxiv.org/abs/2410.12952