[Quick Start] • [Paper] • [Citation]
Repo for the paper "From Exploration to Mastery:Enabling LLMs to Master Tools via Self-Driven Interactions" [ICLR'25 Oral]
- [2025/2/24] We release all the code for DRAFT.
- [2025/2/11] DRAFT is selected to be presented as an Oral (1.8%).
- [2025/1/23] DRAFT is accepted by ICLR 2025.
- [2024/10/10] Our paper and code is released.
Due to the inherent understanding gap between LLMs and humans, inefficiencies and inaccuracies within existing tool documentation hamper the effective utilization of tools by LLMs. Humans, acquire tool proficiency through repeated interactions and hands-on experiences, capable of maintaining an updated comprehension of these tools despite their evolving functionalities. In light of this, we propose DRAFT, conceptualized to automate the adjustment and optimization of tool documentation based on the feedback derived from the LLM's interaction with the tool.
DRAFT is designed to dynamically adjust and optimize tool documentation based on the interaction feedback between LLMs and external tools, which significantly bridges the gap between them by enabling the LLMs to better comprehend and utilize the tools at their disposal, thereby enhancing the overall tool-using capabilities of LLMs.
Our experimental environment is shown below:
openai version: 0.28.0
numpy version: 1.26.4
pandas version: 2.2.2
torch version: 2.3.1
Get OpenAI key from OpenAI, RapidAPI key from RapidAPI or ToolBench key from ToolBench repo, TMDB key from TMDB, and Spotify key from Spotify.
You can download ToolBench dataset from the Google Drive and RestBench dataset from RestBench repo, then extract all tool documentation. Alternatively, you can directly use our preprocessed tool documentation.
Run DRAFT
to get revised tool documentation:
python DRAFT.py
Run Inference_DFSDT
to perform inference using the tool documentation modified by DRAFT to examine the effectiveness of DRAFT.
python Inference_DFSDT -model_name gpt-4o-2024-08-06 -data_type G3 -method DRAFT
You can specify the model, dataset, and method by cmd line arguments.
Run Cal_path_rate
to calculate the path rate for evaluating the results.
python Cal_path_rate.py
We use the official code provided by ToolBench to calculate the win rate. You can find the calculation method in the ToolEval repo.
If you find our code or work useful for your research, please cite our work.
@inproceedings{
quexploration,
title={From Exploration to Mastery: Enabling LLMs to Master Tools via Self-Driven Interactions},
author={Qu, Changle and Dai, Sunhao and Wei, Xiaochi and Cai, Hengyi and Wang, Shuaiqiang and Yin, Dawei and Xu, Jun and Wen, Ji-Rong},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=QKBu1BOAwd}
}