Table of Contents
Fetching ...

LoopTool: Closing the Data-Training Loop for Robust LLM Tool Calls

Kangning Zhang, Wenxiang Jiao, Kounianhua Du, Yuan Lu, Weiwen Liu, Weinan Zhang, Yong Yu

TL;DR

LoopTool tackles the inefficiency of static, API-costly data pipelines for tool-augmented LLMs by introducing a fully automatic, model-aware data evolution framework that tightly couples data synthesis with iterative training through three synergistic modules: Greedy Capability Probing, Judgement-Guided Label Verification, and Error-Driven Data Expansion. It leverages an open-source backbone (Qwen3-32B) for both generation and judgment, enabling a cost-effective closed loop that continually targets model weaknesses and purifies labels. Empirically, an $8 m{B}$ LoopTool model achieves state-of-the-art results on BFCL-v3 and ACEBench, outperforming a $32 m{B}$ data generator and demonstrating substantial amplification from iterative data refinement. The study shows that model-aware, closed-loop data pipelines can significantly enhance tool-use capabilities and generalization while reducing reliance on expensive closed-source APIs, though it remains offline and serial in its current form. Future work will explore online and parallel co-evolution to accelerate data-model refinement.

Abstract

Augmenting Large Language Models (LLMs) with external tools enables them to execute complex, multi-step tasks. However, tool learning is hampered by the static synthetic data pipelines where data generation and model training are executed as two separate, non-interactive processes. This approach fails to adaptively focus on a model's specific weaknesses and allows noisy labels to persist, degrading training efficiency. We introduce LoopTool, a fully automated, model-aware data evolution framework that closes this loop by tightly integrating data synthesis and model training. LoopTool iteratively refines both the data and the model through three synergistic modules: (1) Greedy Capability Probing (GCP) diagnoses the model's mastered and failed capabilities; (2) Judgement-Guided Label Verification (JGLV) uses an open-source judge model to find and correct annotation errors, progressively purifying the dataset; and (3) Error-Driven Data Expansion (EDDE) generates new, challenging samples based on identified failures. This closed-loop process operates within a cost-effective, open-source ecosystem, eliminating dependence on expensive closed-source APIs. Experiments show that our 8B model trained with LoopTool significantly surpasses its 32B data generator and achieves new state-of-the-art results on the BFCL-v3 and ACEBench benchmarks for its scale. Our work demonstrates that closed-loop, self-refining data pipelines can dramatically enhance the tool-use capabilities of LLMs.

LoopTool: Closing the Data-Training Loop for Robust LLM Tool Calls

TL;DR

LoopTool tackles the inefficiency of static, API-costly data pipelines for tool-augmented LLMs by introducing a fully automatic, model-aware data evolution framework that tightly couples data synthesis with iterative training through three synergistic modules: Greedy Capability Probing, Judgement-Guided Label Verification, and Error-Driven Data Expansion. It leverages an open-source backbone (Qwen3-32B) for both generation and judgment, enabling a cost-effective closed loop that continually targets model weaknesses and purifies labels. Empirically, an LoopTool model achieves state-of-the-art results on BFCL-v3 and ACEBench, outperforming a data generator and demonstrating substantial amplification from iterative data refinement. The study shows that model-aware, closed-loop data pipelines can significantly enhance tool-use capabilities and generalization while reducing reliance on expensive closed-source APIs, though it remains offline and serial in its current form. Future work will explore online and parallel co-evolution to accelerate data-model refinement.

Abstract

Augmenting Large Language Models (LLMs) with external tools enables them to execute complex, multi-step tasks. However, tool learning is hampered by the static synthetic data pipelines where data generation and model training are executed as two separate, non-interactive processes. This approach fails to adaptively focus on a model's specific weaknesses and allows noisy labels to persist, degrading training efficiency. We introduce LoopTool, a fully automated, model-aware data evolution framework that closes this loop by tightly integrating data synthesis and model training. LoopTool iteratively refines both the data and the model through three synergistic modules: (1) Greedy Capability Probing (GCP) diagnoses the model's mastered and failed capabilities; (2) Judgement-Guided Label Verification (JGLV) uses an open-source judge model to find and correct annotation errors, progressively purifying the dataset; and (3) Error-Driven Data Expansion (EDDE) generates new, challenging samples based on identified failures. This closed-loop process operates within a cost-effective, open-source ecosystem, eliminating dependence on expensive closed-source APIs. Experiments show that our 8B model trained with LoopTool significantly surpasses its 32B data generator and achieves new state-of-the-art results on the BFCL-v3 and ACEBench benchmarks for its scale. Our work demonstrates that closed-loop, self-refining data pipelines can dramatically enhance the tool-use capabilities of LLMs.

Paper Structure

This paper contains 30 sections, 6 equations, 15 figures, 6 tables, 1 algorithm.

Figures (15)

  • Figure 1: The overall closed-loop automatic pipeline of LoopTool, which couples (a) GRPO optimization, (b) Greedy Capacity Probing, (c) Judgement-Guided Label Verification, and (d) Error-Driven Data Expansion for iterative tool-use enhancement.
  • Figure 2: The Iterative Performance across four iterations evaluated in BFCL-v3. The left y-axis represents Category Acc (bar chart), while the right y-axis denotes Overall Acc (line chart)."Overall w/o Iterations" refers to the result obtained under the same number of iteration steps, where we train solely on the initial seed dataset $\mathcal{D}_{\text{seed}}$.
  • Figure 3: The Prediction Accuracy of Error Seed across iterations.
  • Figure 4: Scaling performance with different model sizes.
  • Figure 5: The example subtree of Context Tree.
  • ...and 10 more figures