arXiv:2605.30785cs.AI2026-05被引 5

让外部模型动态管理大模型智能体的上下文,提升长任务推理能力。

Learning Agent-Compatible Context Management for Long-Horizon Tasks

论文配图:Learning Agent-Compatible Context Management for Long-Horizon Tasks
图 1 · 摘自论文原文
  • 用外部大模型通过强化学习动态调整智能体上下文,不需修改原智能体。
  • 在网页搜索和深度研究任务中显著提升性能,保留关键信息并删减过时内容。
  • 发现高表现智能体适合保留更多细节,低表现者需更激进压缩以保证可靠性。

大语言模型智能体在真实场景中面临越来越多长周期任务,如网络搜索与深度研究,累积的上下文会导致长序列退化和推理失败。现有方法依赖智能体自身进行上下文控制或使用固定策略(如摘要),需训练智能体本身,对闭源智能体不适用,且忽视不同智能体可能需要不同策略。本文提出自适应上下文管理(AdaCoM),训练一个外部大模型通过灵活修改动作,以端到端强化学习方式管理冻结智能体的上下文。在多种智能体的网页搜索与深度研究基准测试中,AdaCoM 显著提升性能,有效保留任务约束与进展,同时修剪过时内容。学习到的策略揭示了保真度-可靠性权衡:原始 ReAct 表现更高的智能体受益于更高保真度的上下文保留,而表现较低的智能体则需更激进压缩以维持可靠推理。迁移实验表明,AdaCoM 在能力相近的智能体间泛化效果最佳(以原始 ReAct 性能衡量),为智能体系统提供可复用的上下文管理器提供了可行路径。

原文摘要 · Abstract (English)

LLM agents increasingly face long-horizon tasks such as web search and deep research in real-world applications, where accumulated context can cause long-context degradation and reasoning failures. Prior work mitigates this through context management with agent-side context control or fixed strategies such as summarization, which require training the agent itself for adaptation - making it impractical for closed-source agents and ignoring that different agents may require different strategies. We introduce Adaptive Context Management (AdaCoM), which trains an external LLM to manage the context of a frozen agent through flexible modification actions and end-to-end reinforcement learning. Across diverse agents on web search and deep research benchmarks, AdaCoM substantially improves performance by preserving task constraints and progress while pruning stale content. The learned strategies reveal a Fidelity-Reliability Trade-off: agents with higher vanilla ReAct performance benefit from higher-fidelity context preservation, whereas lower-performing agents require more aggressive compression to stay within a reliable reasoning regime. Transfer experiments show that AdaCoM generalizes most effectively across agents with similar capability (measured by vanilla ReAct performance), suggesting a practical path toward reusable context managers for agent systems.

智能体上下文管理强化学习长任务

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。