arXiv(opens in a new tab)cs.AISep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.00813

One Policy, Any Budget: Internalizing Budget-Aware Search via Reinforcement Learning

Xiaowei Sun, Jin Li, Yili Hong, Yikun Fu, Yanghua Xiao

Abstract

While reinforcement learning has enabled LLM-based search agents to invoke external tools, existing methods train under fixed budgets and cannot adapt when constraints vary at deployment. We propose AnySearch, a framework that enables a single policy to perform budget-aware search under any budget constraint through a training scaffold and curriculum reinforcement learning. In the first phase, we train the agent with explicit budget state injection and structured reasoning prompts that guide efficient allocation under linearly decaying budgets. In the second phase, the scaffold is removed and the agent learns to operate autonomously under adaptively sampled budget constraints, matching inference conditions. Both phases are optimized with a composite reward that couples answer accuracy with budget efficiency through absolute and relative signals, where an adaptive weight amplifies the efficiency signal for high-accuracy queries and attenuates it for low-accuracy ones. Extensive experiments on seven general and multi-hop QA benchmarks show that our method outperforms baselines across all budget scales, generalizes to unseen constraints beyond the training range, and achieves superior tool productivity without excessive token overhead. Our code is available at https://github.com/xwsun01/AnySearch.

1 Introduction

Augmenting Large Language Models (LLMs) with external tools has become a fundamental approach to compensate for the limitations of static parametric knowledge (Qin et al., 2024; Qu et al., 2025; Schick et al., 2023). Reinforcement learning (RL) further enables search agents to autonomously decide when and what to search through multi-turn interaction (Jin et al., 2025; Song et al., 2025; Chen et al., 2025; Yao et al.,

Figure

Figure 1: Comparison of search behaviors under varying budgets. Existing methods trained under fixed budgets cannot adapt their search strategy when the budget changes, while our method adjusts its allocation proportionally to the available budget.

2022). However, existing RL-based search agents are predominantly trained under fixed or unconstrained budgets, producing policies that cannot adapt when resource availability changes at deployment (Jin et al., 2025; Wang et al., 2025b).

In practice, search budgets vary widely across diverse deployment scenarios, from latency-critical applications requiring minimal external search calls to deep research tasks permitting extensive exploration (Jeong et al., 2024; Zheng et al., 2025). An ideal search agent should operate effectively under any budget constraint with a single policy, rather than requiring retraining or separate models for different resource regimes (Figure 1). This requires more than simply capping tool calls at a threshold. The agent must learn to allocate limited budgets effectively, deciding which queries merit external search and which can be resolved through reasoning (Asai et al., 2024; Jiang et al., 2023; Xi et al., 2025).

Prior approaches fall short of this goal. Methods that reduce redundant tool calls via reward shaping (Wang et al., 2025a; Huang et al., 2025) lack an explicit budget interface and cannot adapt to arbitrary constraints specified at inference.

*Corresponding author.

BATS (Liu et al., 2025) introduces budget state tracking, but relies on an external tracker that must persist at inference, leaving budget-aware allocation as an external dependency rather than an internalized capability of the policy itself.

Accordingly, we propose AnySearch that internalizes budget-aware search into the policy, so that at inference the agent requires only a total budget specification and autonomously handles all allocation decisions. Our key insight is that budget-aware behavior can be scaffolded during training and internalized into the policy, eliminating external dependencies at inference (Wood et al., 1976; Yu et al., 2024).

Specifically, we design a training scaffold that provides explicit budget state tracking and structured reasoning prompts, guiding the agent toward budget-aware decision patterns. To internalize these patterns, we employ a two-phase curriculum that progressively removes the scaffold. Phase I trains with the full scaffold under linearly decaying budgets, allowing the agent to learn search behaviors with explicit guidance. Phase II removes the scaffold entirely and applies adaptive budget sampling that focuses training on weak budget levels while maintaining coverage through uniform smoothing. Since Phase II matches inference conditions exactly, the training-inference gap is eliminated. The learning signal is provided by a composite reward that couples answer accuracy with budget efficiency through absolute and relative signals, where an adaptive weight dynamically adjusts the balance based on per-query difficulty, preventing the agent from sacrificing correctness on hard queries.

We evaluate on seven benchmarks across three backbone models. Our method consistently outperforms baselines at all tested budget levels, generalizes to budget constraints unseen during training, achieves the highest tool productivity, and produces the lowest total token consumption. Ablation studies confirm that the scaffold is successfully internalized after removal, and that each component of the curriculum and reward design contributes to the final performance.

Our contributions are summarized as follows:

  • We propose a framework that internalizes budget-aware search through a progressively removed training scaffold, eliminating external dependencies at inference.

  • We introduce a two-phase curriculum with sliding-window-based adaptive budget sampling and a composite reward with adaptive efficiency weighting to jointly optimize accuracy and efficiency.

  • Extensive experiments demonstrate consistent improvements, robust generalization to unseen budgets, and superior tool productivity. Ablations validate the internalization hypothesis and each component's necessity.

References (2)

  • <budget>remaining=R; used=U; total=T</budget> The remaining is the number of searches you can still perform, used is the number of searches you have already performed, and total is the total budget allocated
  • <search>query</search> Cost: 1 unit of budget per search