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)
to join the discussion
No comments yet
Be the first to share your thoughts!