Back to AI Research

AI Research

MidTool: Mid-training Data Synthesis for Agentic To... | AI Research

Key Takeaways

  • MidTool: Mid-training Data Synthesis for Agentic Tool Use introduces a pipeline for training large language models (LLMs) to use external tools more effectiv...
  • Mid-training is increasingly recognized as a critical stage for shaping the capabilities of large language models.
  • Recent work has shown that targeted mid-training can strengthen reasoning-intensive abilities such as math and science, and can also improve agentic capabilities in software-engineering settings.
  • In this work, we study the parallel but less explored agentic capability: general tool use.
  • MidTool is designed to teach models how to recognize tool affordances, ground arguments from context, compose tool call workflow, and recover from incomplete information.
Paper AbstractExpand

Mid-training is increasingly recognized as a critical stage for shaping the capabilities of large language models. Recent work has shown that targeted mid-training can strengthen reasoning-intensive abilities such as math and science, and can also improve agentic capabilities in software-engineering settings. In this work, we study the parallel but less explored agentic capability: general tool use. We present MidTool, an open corpus construction pipeline for agentic tool-use mid-training that combines large-scale web, PDF, and code data with synthesized supervision from real-world tool APIs, MCP skills, and document-grounded workflows. MidTool is designed to teach models how to recognize tool affordances, ground arguments from context, compose tool call workflow, and recover from incomplete information. We mid-train Qwen3-4B-Base and Qwen3-8B-Base on MidTool-Mix, and then apply follow-up post-training with both supervised fine-tuning and reinforcement learning. Compared with baselines, MidTool-Mix consistently improves downstream performance under both SFT and RL on BFCL, tau2-Bench, and MCP Universe. These results suggest that general tool use, like other important LLM capabilities, benefits from dedicated mid-training rather than being left entirely to post-training.

MidTool: Mid-training Data Synthesis for Agentic Tool Use introduces a pipeline for training large language models (LLMs) to use external tools more effectively. The researchers, including teams from the University of Washington, Snowflake, and the University of North Carolina at Chapel Hill, argue that general tool-use capabilities—such as recognizing when to use a tool, grounding arguments, and recovering from errors—should be developed during a dedicated mid-training phase rather than relying solely on post-training fine-tuning.

The MidTool Pipeline

The researchers developed a 20.3B-token dataset called MidTool-Mix to bridge the gap between general pre-training and task-specific post-training. The pipeline collects data from four primary sources: web pages, PDFs, code repositories, and structured tool artifacts like APIs and Model Context Protocol (MCP) skills.
The pipeline processes this data through two main branches:

  • Context-grounded trajectory augmentation: This branch uses web, PDF, and code documents to teach models how to infer tool boundaries and parameter requirements from unstructured, real-world technical content.

  • Native agentic trajectory synthesis: This branch uses structured tool definitions to create executable trajectories, teaching the model how to plan multi-turn workflows, request missing information, and ensure tool-response consistency.

Performance and Results

The authors mid-trained Qwen3-4B-Base and Qwen3-8B-Base models on MidTool-Mix and followed this with supervised fine-tuning (SFT) and reinforcement learning (RL). When tested on benchmarks including BFCL, τ²-Bench, and MCP Universe, the models consistently outperformed baselines that relied only on post-training.
The results show that mid-training provides the most significant benefits in complex, multi-turn, and interactive settings. The authors note that while mid-training improves general tool-use capability, it does not replace the need for specialized data for deep exploratory tasks, suggesting that different agentic behaviors may require distinct mid-training targets.

Why This Matters

Current approaches to LLM agent development often place the entire burden of learning tool-use on post-training, which uses relatively narrow supervision. By introducing a dedicated mid-training stage, the researchers show that models can acquire a more stable foundation for tool use. This suggests that the knowledge required for effective tool interaction—which is often scattered across documentation, code, and APIs—can be systematically integrated into a model's core capabilities before it reaches the final fine-tuning stage.

Considerations

The researchers note that their work focuses on general tool-use capability. While MidTool-Mix improves performance across a broad range of tool-use tasks, the authors observed that specialized exploratory behaviors remain distinct. This indicates that while MidTool-Mix is effective for general tool-use, other specific agentic capabilities, such as deep research, likely require their own dedicated mid-training data. The authors also confirmed through an audit that there was no evidence of data leakage between their training mixture and the evaluation benchmarks used in the study.

Comments (0)

No comments yet

Be the first to share your thoughts!