LoopTool - An automated data evolution framework launched by Shanghai Jiao Tong University and Xiaohongshu
LoopTool is an automated, model-aware, iterative data evolution framework developed by Shanghai Jiao Tong University and the Xiaohongshu team. It improves the performance of Large Language Models (LLMs) in tool invocation tasks. The framework utilizes closed-loop optimization...
What is LoopTool?
LoopTool, developed by Shanghai Jiao Tong University and the Xiaohongshu team, is an automated, model-aware, iterative data evolution framework that improves the performance of Large Language Models (LLMs) on tool-calling tasks. The framework uses closed-loop optimization to tightly integrate data generation, label correction, and model training, forming a dynamic feedback mechanism. LoopTool comprises two main stages: seed data construction and iterative optimization. The latter includes core modules such as greedy capability detection, discriminative guided label verification, and error-driven data expansion, enabling dynamic adjustment of training data and precise optimization of weak points in the model. Experiments show that LoopTool significantly improves model performance on tool-calling tasks, achieving the best results among open-source models on multiple public leaderboards.
LoopTool's main functions
-
Automated data generation: Construct high-quality seed datasets to support multi-agent dialogue generation and ensure data diversity and consistency.
-
Dynamic data optimizationBased on the model's performance, it automatically identifies and optimizes the model's weaknesses, generating more challenging training samples.
-
Tag verification and correctionBy comparing predictions with labels using open-source models, incorrect labels can be corrected, reducing the impact of noisy data on training.
-
Model performance improvementSignificantly improves the model's tool invocation capabilities across multiple benchmark tests, while also enhancing the model's generalization reasoning ability.
The technical principle of LoopTool
- Automated tools enhance data building (Seed Generation)API definitions that conform to functional intent and structural specifications are synthesized using semantic trees and constraint trees. A high-quality seed dataset is constructed through a multi-agent dialogue generation process (including Planner Agent, User Agent, Assistant Agent, and Tool Agent).
- Model training and data evolution based on closed-loop iteration:
- GRPO reinforcement learning training: The ability to call tools to optimize models through binary reward functions.
- Greedy Ability Detection (GCP)Identify samples that the model has mastered, failed, and boundary samples, and retain high-perplexity samples for the next round of training.
- Judgment of Guide Tag Verification (JGLV): Use an open-source model to compare the predictions with the original labels and correct incorrect labels.
- Error-Driven Data Extension (EDDE): Generate new samples with similar structures but diverse contexts based on erroneous samples, thereby enhancing the model's ability to learn from difficult samples.
- Closed-loop iterative updateEach round of training data consists of high-perplexity samples, corrected error samples, newly generated samples, and unused sub-samples, forming a complete closed loop of "training-evaluation-correction-expansion".
LoopTool's project address
- GitHub repository: https://github.com/Rednote-DeepExperience/LoopTool
- HuggingFace model libraryhttps://huggingface.co/papers/2511.09148
- arXiv technical paper: https://arxiv.org/pdf/2511.09148
Application scenarios of LoopTool
-
API callsLoopTool is suitable for scenarios such as intelligent customer service and automated tasks, helping models to efficiently complete queries and data interactions.
-
Multi-round task planningLoopTool optimizes the model's task planning capabilities in multi-turn dialogues, enabling it to adapt to the step-by-step execution of complex tasks, such as the multi-step task processing of intelligent assistants.
-
Knowledge RetrievalTo improve the accuracy and efficiency of information retrieval in question-answering systems and help models better understand user needs.
-
Code generation and executionImprove the accuracy of model-generated code and execution tools, applicable to programming assistance and education platforms, and reduce code errors.
-
Multimodal tasks: Optimize the model's ability to call multimodal tools and improve the performance of multimodal data processing in scenarios such as intelligent security and image recognition.