TL;DR
This paper introduces ARTIST, a novel framework that unifies agentic reasoning, reinforcement learning (RL), and tool integration for Large Language Models (LLMs). ARTIST empowers LLMs to dynamically decide when, how, and which external tools to use within multi-turn reasoning chains, leading to significant improvements in complex problem-solving tasks like mathematical reasoning and function calling.
What Problem Does This Paper Address?
LLMs have made impressive strides in reasoning, but they are fundamentally limited by their static internal knowledge and text-only reasoning capabilities. This makes them struggle with real-world problems that require dynamic, multi-step reasoning, adaptive decision-making, and interaction with external tools and environments. Existing approaches often rely on hand-crafted prompts or supervised learning, which are brittle, labor-intensive, and don't generalize well. The paper addresses this gap by proposing a framework that allows LLMs to learn robust, adaptive tool-use strategies through outcome-based reinforcement learning.
Methods
The core of ARTIST is a unified framework that tightly couples agentic reasoning, reinforcement learning, and tool integration. Key aspects include:
- Agentic Reasoning: LLMs are trained to autonomously decide which tools to invoke, when, and how, within multi-turn reasoning chains. This involves interleaving text-based thinking, tool queries, and tool outputs.
- Reinforcement Learning (RL): ARTIST uses Group Relative Policy Optimization (GRPO), an RL algorithm that leverages outcome-based rewards without requiring step-level supervision. This allows the model to learn optimal strategies for tool use and environment interaction.
- Tool Integration: ARTIST treats tool usage as a first-class operation, enabling seamless interaction with arbitrary external tools and environments (e.g., Python interpreters, web browsers, APIs).
- Structured Rollouts: The framework uses a structured prompt template with distinct tags for reasoning (
<think>), tool queries (<tool_name>), and tool outputs (<output>), facilitating organized interaction. - Loss Masking: To prevent the model from simply imitating deterministic tool outputs, a loss masking strategy is employed to focus gradients on model-generated tokens.
Datasets
The paper evaluates ARTIST on two main domains:
- Complex Mathematical Reasoning:
- Training: A curated set of 20,000 math word problems sourced from NuminaMath.
- Evaluation: MATH-500, AIME, AMC, and Olympiad Bench.
- Multi-Turn Function Calling:
- Training: A subset of 100 annotated tasks from the BFCL v3 leaderboard.
- Evaluation: 7-bench (Airline and Retail domains) and BFCL v3 (Missing Function, Missing Parameters, and Long Context subsets).
Key Insights and Ideas
- RL is Crucial for Adaptive Tool Use: Simply providing LLMs with access to tools via prompting is insufficient. Agentic RL training is essential for learning when and how to effectively use tools in a dynamic, context-aware manner.
- Emergent Agentic Capabilities: ARTIST naturally fosters sophisticated behaviors like self-refinement, self-correction, and self-reflection, even without explicit supervision. This suggests that RL-driven tool integration is a powerful mechanism for developing more robust and interpretable AI agents.
- Complexity Drives Tool Use Benefits: The advantages of ARTIST are most pronounced on complex tasks (e.g., Olympiad math problems). For simpler problems, internal knowledge is often sufficient, highlighting the importance of dynamic tool use for tackling challenging, real-world scenarios.
- Interpretable Reasoning Traces: The agentic RL training leads to richer, more detailed reasoning traces, making the model's problem-solving process more interpretable.
Key Results
- Mathematical Reasoning: ARTIST achieved up to 22% absolute improvement over base models and significantly outperformed state-of-the-art baselines, including GPT-40, on challenging benchmarks like AMC, AIME, and Olympiad.
- Multi-Turn Function Calling: ARTIST more than doubled the accuracy of base and prompt-based models on T-bench and showed strong gains on difficult BFCL v3 subsets.
- Metrics Analysis: ARTIST demonstrated higher solution quality (reward score), more strategic tool utilization, and deeper reasoning (longer response lengths) compared to baselines.
Limitations and Future Work
- Limitations: The paper notes that for less complex problems, the benefit of agentic tool use is reduced, suggesting that internal knowledge is often sufficient.
- Future Work: The authors suggest exploring ARTIST in more diverse domains, integrating richer forms of feedback (including human preferences), and addressing safety and reliability in open-ended environments. They also mention that further enhancements could be achieved by incorporating techniques like teacher models or additional supervised alignment.
Summary updated