ToolSword: Unveiling Safety Issues of Large Language Models in Tool Learning Across Three Stages

Junjie Ye, Sixian Li, Guanyu Li, Caishuang Huang, Songyang Gao +4 more
2/16/2024
cs.CLcs.AI

Official code: Junjie-Ye/ToolSword (15 stars, Apache-2.0, last commit 2024-09-12).

Abstract

Tool learning is widely acknowledged as a foundational approach or deploying large language models (LLMs) in real-world scenarios. While current research primarily emphasizes leveraging tools to augment LLMs, it frequently neglects emerging safety considerations tied to their application. To fill this gap, we present *ToolSword*, a comprehensive framework dedicated to meticulously investigating safety issues linked to LLMs in tool learning. Specifically, ToolSword delineates six safety scenarios for LLMs in tool learning, encompassing **malicious queries** and **jailbreak attacks** in the input stage, **noisy misdirection** and **risky cues** in the execution stage, and **harmful feedback** and **error conflicts** in the output stage. Experiments conducted on 11 open-source and closed-source LLMs reveal enduring safety challenges in tool learning, such as handling harmful queries, employing risky tools, and delivering detrimental feedback, which even GPT-4 is susceptible to. Moreover, we conduct further studies with the aim of fostering research on tool learning safety. The data is released in https://github.com/Junjie-Ye/ToolSword.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ACL 2024] ToolSword: Unveiling Safety Issues of Large Language Models in Tool Learning Across Three Stages

150Feb 16, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{ye2024toolsword,
  title  = {ToolSword: Unveiling Safety Issues of Large Language Models in Tool Learning Across Three Stages},
  author = {Junjie Ye and Sixian Li and Guanyu Li and Caishuang Huang and Songyang Gao and Yilong Wu and Qi Zhang and Tao Gui and Xuanjing Huang},
  year   = {2024},
  eprint = {2402.10753},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.10753v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.10753.svg)](https://codeofpaper.com/paper/2402.10753)

Discussion