AgentTTS: Large Language Model Agent for Test-time Compute-optimal Scaling Strategy in Complex Tasks

Fali Wang, Hui Liu, Zhenwei Dai, Jingying Zeng, Zhiwei Zhang, Zongyu Wu, Chen Luo, Zhen Li, Xianfeng Tang, Qi He, Suhang Wang

Abstract

Recent advancements in Large Language Models (LLMs) have highlighted the efficacy of "test-time scaling" (TTS)—the practice of increasing inference-time computation to improve model performance. However, while scaling strategies are well-understood for single-step tasks, multi-stage workflows present a complex combinatorial challenge. This paper introduces AgentTTS, a novel framework that employs an LLM agent to autonomously optimize compute budgets across multi-stage AI tasks. By intelligently navigating the trade-offs between model size and sampling frequency, AgentTTS achieves superior performance and search efficiency compared to traditional optimization methods.

1. Introduction

Test-time scaling (TTS) has emerged as a critical paradigm for enhancing LLM capabilities, particularly in reasoning-intensive domains like mathematics and code generation. The core premise is that providing a model with a larger "thinking budget"—either through increased sampling (best-of-N) or more sophisticated search algorithms—leads to higher accuracy.

Despite its success in isolated tasks, real-world AI applications typically involve multi-stage pipelines, such as retrieval-augmented generation (RAG) or multi-step software engineering. In these scenarios, the optimal allocation of compute is non-trivial. A budget spent on a high-parameter retriever might reduce the need for extensive sampling in the generation phase, or vice versa. AgentTTS addresses this allocation problem by treating the search for an optimal scaling strategy as an agentic task.

2. The Multi-Stage Scaling Challenge

Optimizing compute across multiple stages involves two primary variables for each stage: the choice of model (e.g., a 3B parameter model vs. a 70B parameter model) and the number of samples generated (the budget). This creates a massive search space. Furthermore, stages are inherently interdependent. For instance, if a retrieval stage fails to provide relevant context, the downstream reasoning stage requires significantly more compute to compensate for the missing information.

Traditional optimization techniques, such as Bayesian Optimization (BO), often struggle with this high-dimensional, non-linear space. Moreover, these "black-box" methods provide no qualitative insight into why a specific configuration works, making it difficult for developers to refine their workflows.

3. Methodology: The AgentTTS Framework

AgentTTS is designed as an iterative, agentic loop consisting of three core components:

  1. The LLM Agent: The central controller that generates candidate configurations. It analyzes performance data and distills "guidelines"—natural language insights—from previous trials to inform future searches.
  2. The Archive: A persistent memory bank that stores the history of all trials, including the specific model/budget configurations, the resulting performance metrics, and the evolving strategy guidelines.
  3. The Environment: An execution platform where the agent's proposed configurations are tested on a validation set to provide real-world performance feedback.

3.1 Unified Budget Conversion

To enable fair comparisons across different model sizes and sampling rates, the authors utilize a Unified Budget Conversion based on inference FLOPs (Floating Point Operations). This normalization allows the agent to treat compute as a fungible resource, mathematically equating a single pass of a massive model with multiple passes of a smaller, more efficient model.

4. Experimental Setup

The framework was evaluated across six datasets spanning four complex task categories:

  • Retrieval-based QA: 2WikiMultiHopQA and HotpotQA.
  • Knowledge Graph QA: CWQ and WebQSP.
  • Task Automation: TaskBench (focusing on decomposition and tool selection).
  • Software Development: ChatDev (covering coding and testing phases).

5. Key Insights and Results

5.1 Pilot Findings

The researchers identified three critical phenomena that govern multi-stage scaling:

  • Heterogeneous Preferences: Subtasks exhibit distinct model preferences. Retrieval-heavy stages benefit significantly from larger models with broader context windows, whereas reasoning stages often achieve higher performance peaks using smaller models with high sampling rates.
  • The "Knee" of Diminishing Returns: Performance does not scale linearly with compute. Each task typically has an optimal budget "knee," beyond which additional sampling introduces "fusion noise," where the model becomes confused by too many candidate answers, leading to a performance drop.
  • Upstream Impact: There is a direct correlation between upstream success and downstream efficiency. High-quality output from an initial stage "buys" compute efficiency for subsequent stages.

5.2 Performance and Efficiency

AgentTTS significantly outperformed existing baselines, including Bayesian Optimization and AgentHPO:

  • Search Efficiency: On the 2WikiMultiHopQA dataset, AgentTTS identified the optimal configuration in 2.5 hours, a stark contrast to the 8.3 hours required by AgentHPO and the 12+ hours for zero-shot LLM approaches.
  • Accuracy Gains: AgentTTS consistently achieved higher Exact Match (EM) scores, exceeding the best baseline by 2% on the 2Wiki test set.
  • Interpretability: Unlike traditional optimizers, AgentTTS provides transparent, textual reasoning for its choices (e.g., identifying that a 72B model is essential for retrieval but a smaller model suffices for final answer synthesis).

6. Limitations and Future Work

While effective, AgentTTS currently operates on static workflows with a fixed sequence of subtasks. It does not yet account for dynamic or branching workflows where the path changes based on intermediate results. Additionally, the initial search phase incurs a one-time compute overhead on a training set. Future research will focus on dynamic test-time scaling, allowing the agent to re-allocate the remaining budget on-the-fly during a single inference run.

7. Conclusion

AgentTTS demonstrates that LLM agents are highly capable of managing their own "thinking budgets." By automating the discovery of compute-optimal scaling strategies, AgentTTS provides a scalable, efficient, and interpretable solution for maximizing the performance of complex, multi-stage AI systems.

Summary updated

BibTeX
@inproceedings{wang2025agenttts,
  author = {Fali Wang and Hui Liu and Zhenwei DAI and Jingying Zeng and Zhiwei Zhang and Zongyu Wu and Chen Luo and Zhen Li and Xianfeng Tang and Qi He and Suhang Wang},
  title = {{AgentTTS: Large Language Model Agent for Test-time Compute-optimal Scaling Strategy in Complex Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=BuYtcTUMyA},
}
Figure