SuperAPI AI Directory

LoopTool - An Automated Data Evolution Framework Launched by SJTU and Xiaohongshu

Author: AI小集 · Original source: AI工具集

What Is LoopTool

LoopTool is an automated, model-aware, iterative data evolution framework launched by the Shanghai Jiao Tong University and Xiaohongshu teams, capable of improving the performance of large language models (LLMs) on tool-calling tasks. Through closed-loop optimization, the framework tightly integrates data generation, label correction, and model training to form a dynamic feedback mechanism. LoopTool includes two major stages: seed data construction and iterative optimization. The latter covers core modules such as Greedy Capability Probing, Judger-Guided Label Verification, and Error-Driven Data Expansion, and can dynamically adjust training data to precisely optimize the model's weak areas. Experiments show that LoopTool significantly improves model performance on tool-calling tasks and achieves the best results among open-source models on multiple public leaderboards.

LoopTool

LoopTool's Main Features

  • Automated Data Generation: Builds high-quality seed datasets and supports multi-agent dialogue generation to ensure data diversity and consistency.
  • Dynamic Data Optimization: Based on model performance, automatically identifies and optimizes the model's weak areas and generates more challenging training samples.
  • Label Verification and Correction: Compares predictions with labels through open-source models, corrects erroneous labels, and reduces the impact of noisy data on training.
  • Model Performance Improvement: Significantly improves the model's tool-calling capability in multiple benchmarks while also enhancing the model's generalized reasoning ability.

LoopTool's Technical Principles

  • Automated Tool-Augmented Data Construction (Seed Generation): Uses semantic trees and constraint trees to synthesize API definitions that conform to functional intent and structural specifications. Builds high-quality seed datasets through a multi-agent dialogue generation process (including Planner Agent, User Agent, Assistant Agent, and Tool Agent).
  • Closed-Loop Iteration-Based Model Training and Data Evolution:
    • GRPO Reinforcement Learning Training: Optimizes the model's tool-calling capability through a binary reward function.
    • Greedy Capability Probing (GCP): Identifies samples the model has mastered, failed, and borderline samples, and retains high-perplexity samples for the next round of training.
    • Judger-Guided Label Verification (JGLV): Uses open-source models to compare predictions with original labels and correct erroneous labels.
    • Error-Driven Data Expansion (EDDE): Generates new samples with similar structure but diverse contexts based on erroneous samples, enhancing the model's ability to learn difficult samples.
  • Closed-Loop Iterative Update: Each round of training data consists of high-perplexity samples, corrected erroneous 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 Library:https://huggingface.co/papers/2511.09148
  • arXiv Technical Paper:https://arxiv.org/pdf/2511.09148

LoopTool's Application Scenarios

  • API Calls: LoopTool is suitable for scenarios such as intelligent customer service and automated tasks, helping models efficiently complete queries and data interactions.
  • Multi-Turn Task Planning: LoopTool optimizes the model's task planning capability in multi-turn dialogues, enabling it to adapt to the step-by-step execution of complex tasks, such as multi-step task processing by intelligent assistants.
  • Knowledge Retrieval: Improve the accuracy and efficiency of information retrieval in question-answering systems, helping models better understand user needs.
  • Code Generation and Execution: Improve the accuracy of models generating code and invoking execution tools, suitable for programming assistance and educational platforms, reducing code errors.
  • Multimodal Tasks: Optimize the ability of models to invoke multimodal tools, enhancing the performance of multimodal data processing in scenarios such as intelligent security and image recognition.