Skip to content

The implementation for ICLR 2025 Oral: From Exploration to Mastery: Enabling LLMs to Master Tools via Self-Driven Interactions.

Notifications You must be signed in to change notification settings

quchangle1/DRAFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️🤖 From Exploration to Mastery:
Enabling LLMs to Master Tools via Self-Driven Interactions

[Quick Start][Paper][Citation]

Repo for the paper "From Exploration to Mastery:Enabling LLMs to Master Tools via Self-Driven Interactions" [ICLR'25 Oral]

🔥 News

  • [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.

💡 Introduction

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.

🛠️ Setup

Environment Setup

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

API Key Setup

Get OpenAI key from OpenAI, RapidAPI key from RapidAPI or ToolBench key from ToolBench repo, TMDB key from TMDB, and Spotify key from Spotify.

Data Setup

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.

🚀 Quick Start

DRAFT

Run DRAFT to get revised tool documentation:

python DRAFT.py

Inference

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.

Evaluation

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.

☕️ Citation

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}
}

About

The implementation for ICLR 2025 Oral: From Exploration to Mastery: Enabling LLMs to Master Tools via Self-Driven Interactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages