Abstract
Large Language Models (LLMs) often struggle with factual hallucinations and complex arithmetic. While external tools can mitigate these issues, training models to use them typically requires labor-intensive, human-annotated "gold" demonstrations. This paper investigates a self-training approach where LLMs learn to use tools through trial and error. By generating their own tool-use traces and filtering them for correctness, models can be fine-tuned on synthetic data. Our results show that this method significantly improves performance on "long-tail" knowledge tasks, though it faces hurdles in areas where the model's internal knowledge is already sufficient or where reasoning errors precede tool calls.
Introduction: The "Gold Data" Bottleneck
Augmenting LLMs with tools like calculators or Wikipedia search engines is a proven strategy for improving accuracy. However, the standard training paradigm relies on high-quality demonstrations of API calls, which are difficult to scale. This research explores whether an LLM can bypass this bottleneck by teaching itself to use tools via a self-training loop.
Methodology
The proposed pipeline transitions from initial zero-shot capabilities to specialized fine-tuning through four main stages:
- Zero-shot Prompting: Using Llama-3 (8B and 70B) with system prompts describing tool functionality and a structured response format (Thought, Action, Rationale, Answer).
- Synthetic Data Generation: The model generates its own "traces"—sequences of reasoning and tool calls—to solve QA datasets.
- Filtering: Traces are retained only if the final answer is correct, serving as a proxy for high-quality tool-use.
- Model Training: The filtered data is used for Supervised Fine-Tuning (SFT) or Preference Fine-Tuning (DPO).
Experimental Setup
The study evaluates the self-training approach across four diverse datasets:
- TriviaQA: General knowledge.
- GSM8K: Grade school math (targeting the Calculator tool).
- NQ-Open: Real-world search queries.
- PopQA: "Long-tail" obscure facts where external search is critical.
Key Results and Analysis
The effectiveness of self-training varies significantly by task type and model scale.
The "Long-Tail" Advantage
The most notable success was observed in PopQA, where self-training led to a 3.7% improvement. For obscure facts where internal "parametric" knowledge is thin, the model successfully learned to rely on the Wikipedia search tool.
SFT vs. DPO
Supervised Fine-Tuning (SFT) on a mixture of tool and non-tool data generally yielded the most robust performance. While Direct Preference Optimization (DPO) showed potential, its success was highly sensitive to the granularity of the preference (conversation-level vs. response-level).
The "Internal Knowledge" Trap
On datasets like TriviaQA, tool-use occasionally decreased performance. If a model already "knows" an answer, forcing a tool call introduces unnecessary points of failure, such as misinterpreting search results or failing to parse outputs.
Discussion: Scale and Reasoning
- Model Scale: The 70B model was more inclined to use tools but also more sensitive to prompt formatting than the 8B version.
- Reasoning Errors: In math tasks (GSM8K), failures often occurred not during calculation, but during the initial reasoning phase where the model formulated the wrong equation.
Conclusion and Future Work
This work demonstrates that LLMs can learn tool-use through self-generation and filtering, reducing reliance on human-curated data. Future improvements could involve multi-iteration self-training, expanding the toolset beyond three basic tools, and enhancing the retrieval quality of search-based tools to minimize irrelevant noise.
Summary updated