NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Factored Agents: Decoupling In-Context Learning and Memorization for Robust Tool Use

Nicholas Roth, Christopher Hidey, Lucas Spangher, William F. Arnold, Chang Ye, Nick Masiewicki, Jinoo Baek, Peter Grabowski, Eugene IearXiv 2025 · DOI

Abstract

As Large Language Models (LLMs) transition into autonomous agents, the reliability of tool-use becomes paramount. Current monolithic architectures often struggle to balance high-level reasoning with the strict requirements of API syntax, leading to frequent planning and parsing errors. We introduce the Factored Agent architecture, which decouples these responsibilities into two specialized components: a large-scale Planner for reasoning and a small-scale Tool Agent for API memorization. Our evaluation across retail and airline benchmarks demonstrates that this separation significantly reduces hallucinations and malformed data, outperforming monolithic baselines like GPT-4o.

Introduction

The move toward "Agentic AI"—systems capable of executing actions via APIs—has highlighted a critical bottleneck in model reliability. Monolithic models are currently tasked with both In-Context Learning (ICL), required for reasoning through user queries, and Memorization, required for recalling static API schemas. This dual burden often results in a "neural trade-off," where models either fail to plan correctly or hallucinate non-existent API parameters.

The Factored Agent Architecture

To address this trade-off, we propose partitioning the agent into two distinct modules. This "splitting of the brain" allows each component to specialize in its respective domain without interference.

The Factored Agent architecture decouples high-level planning from low-level tool execution.
  1. The Planner (LLM): A large, general-purpose model (e.g., GPT-4o) that interprets user intent and generates a natural language plan. It focuses entirely on reasoning and sequence logic.
  2. The Tool Agent (SLM): A Small Language Model (e.g., Gemma 3 4B or DeepSeek-Qwen 1.5B) fine-tuned specifically to translate natural language plans into structured JSON API calls.

By training the Tool Agent on a massive synthetic dataset generated from OpenAPI schemas, we create a "format specialist" that is highly disciplined in following strict syntax rules.

The ICL-Memorization Trade-off

A key finding of our research is the inverse relationship between tool-specific fine-tuning and general reasoning capability. As models are fine-tuned to memorize specific tool formats, their performance on general benchmarks like GSM8k (math) and BigBenchHard (BBH) often declines. This effect is particularly pronounced in larger models (7B+), suggesting that smaller models are actually better suited for the specialized role of a Tool Agent because they have less general knowledge to lose during the fine-tuning process.

Performance comparison showing the trade-off between base model reasoning and tool-specific fine-tuning (SFT) across different model sizes.

Experimental Results

The factored approach was evaluated using TauBench, focusing on multi-turn dialogues in retail and airline domains. The results indicate a clear advantage for the decoupled architecture:

  • Retail Domain: A factored agent utilizing a Gemma 3 4B Tool Agent achieved a 0.45 Pass^1 accuracy, notably higher than the 0.37 achieved by a monolithic GPT-4o baseline.
  • Airline Domain: The Gemma 3 12B variant reached 0.31 Pass^1, compared to the baseline's 0.29.
  • Error Resilience: The specialized Tool Agent showed significantly higher resilience to "malformed field" errors, adhering strictly to the provided API schemas and avoiding the parameter hallucinations common in general-purpose LLMs.

Conclusion and Future Work

Factored Agents provide a robust path forward for reliable tool-use by separating high-level reasoning from low-level execution. While the current implementation uses a unidirectional flow from Planner to Tool Agent, future work will explore bidirectional dialogues to handle more complex, multi-step tasks. Additionally, we aim to optimize inference-time latency and expand testing to a broader range of diverse APIs to further validate the scalability of this decoupled approach.

Summary updated

BibTeX
@misc{roth2025factored,
  author = {Nicholas Roth and Christopher Hidey and Lucas Spangher and William F. Arnold and Chang Ye and Nick Masiewicki and Jinoo Baek and Peter Grabowski and Eugene Ie},
  title = {{Factored Agents: Decoupling In-Context Learning and Memorization for Robust Tool Use}},
  year = {2025},
  eprint = {2503.22931},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.22931},
}
Figure