Beyond Turn Limits: Training Deep Search Agents with Dynamic Context Window

Qiaoyu Tang, Hao Xiang, Le Yu, Bowen Yu, Yaojie Lu, Xianpei Han, Le Sun, WenJuan Zhang, Pengbo Wang, Shixuan Liu, Zhenru Zhang, Jianhong Tu, Hongyu Lin, Junyang Lin · Submission to ICLR 2026 · Rejected

TL;DR

Existing open-source web-search agents quickly hit performance ceilings due to shallow training datasets and context windows clogged by verbose tool outputs. DeepMiner solves both issues by introducing a reverse-construction pipeline that generates complex, multi-source research queries, alongside a simple yet potent sliding-window context manager that preserves reasoning traces while omitting stale tool outputs. Trained on Qwen3-32B with reinforcement learning, DeepMiner-32B scores 33.5% on BrowseComp-en—surpassing previous open-source agents by nearly 20 percentage points and outperforming models over 20 times its size.

What Problem Does This Paper Address?

While single-turn reasoning models have advanced through Reinforcement Learning with Verifiable Rewards (RLVR), extending deep cognitive reasoning (e.g., backtracking, self-verification, hypothesis revision) to autonomous, multi-turn search agents remains an open hurdle.

The authors identify two fundamental bottlenecks in current open-source search agents:

  1. Insufficient Task Complexity: Classic multi-hop QA benchmarks (e.g., HotpotQA, TriviaQA) primarily rely on clean Wikipedia articles and can be solved with shallow retrieval. They do not challenge models to formulate complex, exploratory research plans across fragmented web documents.
  2. Context Window Saturation: Raw web pages fetched during browsing are 5 to 10 times longer than the agent's own thoughts. In a standard 32k-token context, agents hit memory limits after only 10–15 turns. Conventional fixes—such as external summarization models—lose fine-grained facts, add latency, and create optimization blind spots during end-to-end RL training.

Methods

DeepMiner introduces an end-to-end framework combining targeted data synthesis with dynamic context management:

[Web Documents] ➔ [Reverse QA Generation] ➔ [Obfuscation & Filtering]
                                                        │
┌───────────────────────────────────────────────────────┘
▼
[Two-Stage Training: SFT + GRPO RL]
  ├─ Context Window: Keep all Assistant reasoning steps intact
  └─ Sliding Window: Omit distant tool responses with placeholder tokens
  • Reverse Question Construction:
  • Selects Wikipedia entities with moderate visibility (1,000–10,000 page views over 6 months) to avoid parametric memorization.
  • Collects external, complementary web pages (deliberately excluding the Wikipedia page itself).
  • Synthesizes questions that require cross-referencing at least four disparate sources.
  • Obfuscates clues into generalized constraints (e.g., changing "born in Manhattan in 1905" to "born in New York in the early 20th century") while ensuring a unique, verifiable ground truth answer.
  • Filters candidate QA pairs against direct search and zero-shot reasoning model evaluations.
  • Dynamic Context Management (Sliding Window):
  • Observes that past tool outputs are mostly needed for immediate local decisions, whereas assistant reasoning thoughts are critical for global long-term coherence.
  • Employs a sliding window over tool outputs: after accumulating $W$ tool calls, earlier raw tool outputs are replaced by a lightweight placeholder ("[Previous tool output skipped. Re-run tool if needed.]"), while keeping all reasoning traces visible.
  • Decomposes rollouts into aligned training sequence slices with proper loss masking to maintain training-inference consistency during Group Relative Policy Optimization (GRPO).

Datasets

  • Training Data: Synthesized DeepMiner dataset consisting of ~3,000 SFT trajectories and ~4,000 RL questions generated using Qwen3-235B and DeepSeek-R1.
  • Evaluation Benchmarks:
  • BrowseComp (en) and BrowseComp-zh: Challenging web browsing benchmarks for complex information-seeking.
  • XBench-DeepSearch: Profession-aligned, long-horizon search evaluation.
  • GAIA: General AI assistant benchmark assessing multi-modal and web-based execution.

Key Insights and Ideas

  • Preserving Reasoning Traces Beats Preserving Tool Outputs: Compressing old tool responses rather than assistant thoughts preserves the agent’s strategic plan and avoids the "hallucinatory drift" seen when past reasoning is truncated.
  • Eliminating Summarizers Enables Cleaner RL: Relying on simple placeholder tokens for expired tool outputs eliminates separate summarization models, lowering computation while ensuring all policy decisions remain differentiable and fully aligned with RLVR objectives.
  • More Turns in the Same Context: By capping tool-output bloat, DeepMiner scales to nearly 100 interaction turns inside a standard 32k context—an operational depth previously requiring 128k+ contexts.
  • Obfuscation Drives True Planning: Forcing models to connect ambiguous constraints across non-Wikipedia web pages effectively unlocks human-like search behaviors (sub-goal setting, hypothesis testing, and backtracking).

Key Results

  • BrowseComp-en: DeepMiner-32B achieves 33.5% accuracy, outperforming previous open-source models (such as WebExplorer-8B at 15.6% and DeepDive-32B at 14.8%) by ~18–20 points, and surpassing the massive DeepSeek-V3.1-671B (30.0%).
  • Consistent Cross-Benchmark Gains: On BrowseComp-zh, DeepMiner reaches 40.1% (vs. WebExplorer's 32.0%); on XBench-DS, it reaches 62.0%; and on GAIA, it scores 58.7%.
  • RL vs. SFT: RL fine-tuning provides large leaps over SFT (+12.3% on BrowseComp-en, +12.1% on BrowseComp-zh), demonstrating that RLVR successfully optimizes multi-turn exploration policies.
  • Efficiency: In training-free tests on GPT-OSS-120B, the sliding window with 32k context matched the accuracy (33.3%) of vanilla context at 128k context (30.3%), while completing tasks in far fewer steps than simple truncation.

Limitations and Future Work

  • Proprietary Gap Remains: While DeepMiner drastically narrows the open-source deficit, top commercial systems like OpenAI DeepResearch (51.5% on BrowseComp, 67.4% on GAIA) still hold a significant lead.
  • Binary Reward Sparsity: DeepMiner relies on a binary match reward from an LLM judge on the final answer. More granular intermediate credit assignment could potentially improve training stability and sample efficiency on extreme-horizon tasks.
  • Static Context Parameters: Although experiments show the model generalizes across window sizes ($W=3\text{--}6, S=1\text{--}5$), the agent cannot yet autonomously decide when to evict or re-fetch specific context entries on the fly.

Summary updated

BibTeX
@misc{tang2025beyond,
  author = {Qiaoyu Tang and Hao Xiang and Le Yu and Bowen Yu and Yaojie Lu and Xianpei Han and Le Sun and WenJuan Zhang and Pengbo Wang and Shixuan Liu and Zhenru Zhang and Jianhong Tu and Hongyu Lin and Junyang Lin},
  title = {{Beyond Turn Limits: Training Deep Search Agents with Dynamic Context Window}},
  year = {2025},
  eprint = {2510.08276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.08276},
}

Loading related content...

Figure