RefTool: Enhancing Model Reasoning with Reference-Guided Tool Creation

Xiao Liu, Da Yin, Zirui Wu, Yansong Feng
5/27/2025
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Tools enhance the reasoning capabilities of large language models (LLMs) in complex problem-solving tasks, but not all tasks have available tools. In the absence of predefined tools, prior works have explored instructing LLMs to generate tools on their own.

Show full abstract

However, such approaches rely heavily on the models' internal knowledge and would fail in domains beyond the LLMs' knowledge scope. To address this limitation, we propose RefTool, a reference-guided framework for automatic tool creation that leverages structured external materials such as textbooks. RefTool consists of two modules: (1) tool creation, where LLMs generate executable tools from reference content, validate them using illustrative examples, and organize them hierarchically into a toolbox; and (2) tool utilization, where LLMs navigate the toolbox structure to select and apply the appropriate tools to solve problems. Experiments on causality, physics, and chemistry benchmarks demonstrate that RefTool outperforms existing tool-creation and domain-specific reasoning methods by 11.3% on average accuracy, while being cost-efficient and broadly generalizable. Analyses reveal that grounding tool creation in references produces accurate and faithful tools, and that the hierarchical structure facilitates effective tool selection. RefTool enables LLMs to overcome knowledge limitations, demonstrating the value of grounding tool creation in external references for enhanced and generalizable reasoning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2025reftool,
  title  = {RefTool: Enhancing Model Reasoning with Reference-Guided Tool Creation},
  author = {Xiao Liu and Da Yin and Zirui Wu and Yansong Feng},
  year   = {2025},
  eprint = {2505.21413},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.21413v1}
}

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/2505.21413.svg)](https://codeofpaper.com/paper/2505.21413)

Discussion