\newblock In Sanmi Koyejo, S.~Mohamed, A.~Agarwal, Danielle Belgrave, K.~Cho, and A.~Oh (eds.), \emph{Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022}, 2022.
Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Lauren Hong, Runchu Tian, Ruobing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun.
\newblock Toolllm: Facilitating large language models to master 16000+ real-world apis.
\newblock In \emph{The Twelfth International Conference on Learning Representations}, 2024.
\bibitem[Radford et~al.(2021)Radford, Kim, Hallacy, Ramesh, Goh, Agarwal, Sastry, Askell, Mishkin, Clark, Krueger, and Sutskever]{radford-etal:2021learning}
Alec Radford, Jong~Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever.
\newblock Learning transferable visual models from natural language supervision, 2021.
...
...
@@ -317,10 +332,10 @@ Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher~D. Manning, Stefano E
\newblock In Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (eds.), \emph{Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023}, 2023.
title = {Gorilla: Large Language Model Connected with Massive APIs},
author = {Patil, Shishir G. and Zhang, Tianjun and Wang, Xin and Gonzalez, Joseph E.},
booktitle = {Advances in Neural Information Processing Systems},
year = {2024}
}
@inproceedings{qin-etal:toolllm,
title = {ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs},
author = {Qin, Yujia and Liang, Shihao and Ye, Yining and Zhu, Kunlun and Yan, Lan and Lu, Yaxi and Lin, Yankai and Cong, Xin and Tang, Xiangru and Qian, Bill and Zhao, Sihan and Hong, Lauren and Tian, Runchu and Xie, Ruobing and Zhou, Jie and Gerstein, Mark and Li, Dahai and Liu, Zhiyuan and Sun, Maosong},
booktitle = {The Twelfth International Conference on Learning Representations},
year = {2024}
}
@inproceedings{li-etal:apibank,
title = {API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs},
author = {Li, Minghao and Zhao, Yingxiu and Yu, Bowen and Song, Feifan and Li, Hangyu and Yu, Haiyang and Li, Zhoujun and Huang, Fei and Li, Yongbin},
booktitle = {Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing},
year = {2023}
}
@inproceedings{schick-etal:toolformer,
title = {Toolformer: Language Models Can Teach Themselves to Use Tools},
author = {Schick, Timo and Dwivedi-Yu, Jane and Dess'i, Roberto and Raileanu, Roberta and Lomeli, Maria and Hambro, Eric and Zettlemoyer, Luke and Cancedda, Nicola and Scialom, Thomas},
booktitle = {Advances in Neural Information Processing Systems},
year = {2023}
}
@inproceedings{komeili-etal:Internet,
title={Internet-augmented dialogue generation},
author={Komeili, Mojtaba and Shuster, Kurt and Weston, Jason},
...
...
@@ -56,16 +85,6 @@
year={2026}
}
@article{schick-etal:toolformer,
title={Toolformer: Language models can teach themselves to use tools},
author={Schick, Timo and Dwivedi-Yu, Jane and Dess{\`\i}, Roberto and Raileanu, Roberta and Lomeli, Maria and Hambro, Eric and Zettlemoyer, Luke and Cancedda, Nicola and Scialom, Thomas},
journal={Advances in neural information processing systems},
volume={36},
pages={68539--68551},
year={2023}
}
@article{yao-etal:react,
title={React: Synergizing reasoning and acting in language models},
author={Yao, Shunyu and Zhao, Jeffrey and Yu, Dian and Du, Nan and Shafran, Izhak and Narasimhan, Karthik and Cao, Yuan},
@@ -194,7 +194,13 @@ To make tool use more reliable, we can further train LLMs on tool-use trajectori
$\mathbf{y}=$ Thought: compute the payment; Action: calculator(12 x 50 / 60); ...; Answer: Weng earned \$10.
\end{center}
With such data, SFT teaches the model to imitate the demonstrated tool-use pattern. The model can learn the format of tool invocation and the role of observations in later generation.
A common way to construct such data is to manually annotate tool-use trajectories. However, this requires annotators to know which tool should be used, how to write valid arguments, and how to judge whether the returned observation is useful. This process is costly and difficult to scale to many tools and tasks.
Toolformer addresses this data construction problem with a self-supervised approach \citep{schick-etal:toolformer}. Instead of relying on large-scale human annotations, it starts from only a few demonstrations for each API. It then lets the language model annotate a large text corpus with possible API calls. After executing these calls, Toolformer keeps only the API calls that help the model better predict future tokens. In this way, the model can automatically construct useful tool-use training data. The filtered data is then used to fine-tune the model. This process teaches the model to decide when to call a tool, what arguments to pass, and how to incorporate the tool result into later generation.
Beyond learning to use a small set of tools, later studies further scale tool-use training to larger and more realistic API spaces. API-Bank builds a benchmark and training set for tool-augmented LLMs, where models need to plan, retrieve, and call APIs in executable environments \citep{li-etal:apibank}. ToolLLM constructs ToolBench with more than 16,000 real-world APIs and uses automatically generated instruction-solution trajectories to train ToolLLaMA \citep{qin-etal:toolllm}. Gorilla focuses on API calling at scale and fine-tunes LLaMA-based models to generate accurate API calls. It also uses a document retriever to reduce API hallucination and adapt to changing API documents \citep{patil-etal:gorilla}.