Reverse Chain: A Generic-Rule for LLMs to Master Multi-API Planning

Yinger Zhang, Hui Cai, Xierui Song, Yicheng Chen, Rui Sun, Jing Zheng


Abstract
While enabling large language models to implement function calling (known as APIs) can greatly enhance the performance of Large Language Models (LLMs), function calling is still a challenging task due to the complicated relations between different APIs, especially in a context-learning setting without fine-tuning. This paper introduces “Reverse Chain”, a controllable, target-driven approach designed to empower LLMs with the capability to operate external APIs only via prompts. Recognizing that most LLMs have limited tool-use capabilities, Reverse Chain limits LLMs to executing simple tasks, e.g., API Selection and Argument Completion. Furthermore, to manage a controllable multi-function calling, Reverse Chain adopts a generic rule-based on a backward reasoning process. This rule determines when to do API selection or Argument completion. To evaluate the multi-tool-use capability of LLMs, we have released a compositional multi-tool task dataset, available at https://github.com/zhangyingerjelly/reverse-chain. Extensive numerical experiments validate the remarkable proficiency of Reverse Chain in managing multiple API calls.
Anthology ID:
2024.findings-naacl.22
Volume:
Findings of the Association for Computational Linguistics: NAACL 2024
Month:
June
Year:
2024
Address:
Mexico City, Mexico
Editors:
Kevin Duh, Helena Gomez, Steven Bethard
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
302–325
Language:
URL:
https://aclanthology.org/2024.findings-naacl.22
DOI:
10.18653/v1/2024.findings-naacl.22
Bibkey:
Cite (ACL):
Yinger Zhang, Hui Cai, Xierui Song, Yicheng Chen, Rui Sun, and Jing Zheng. 2024. Reverse Chain: A Generic-Rule for LLMs to Master Multi-API Planning. In Findings of the Association for Computational Linguistics: NAACL 2024, pages 302–325, Mexico City, Mexico. Association for Computational Linguistics.
Cite (Informal):
Reverse Chain: A Generic-Rule for LLMs to Master Multi-API Planning (Zhang et al., Findings 2024)
Copy Citation:
PDF:
https://preview.aclanthology.org/nschneid-patch-4/2024.findings-naacl.22.pdf