arXiv:2604.01664cs.AI2026-04被引 9

让大模型在有限记忆下智能管理对话历史,提升长任务表现

ContextBudget: Budget-Aware Context Management for Long-Horizon Search Agents

  • 将上下文管理建模为带预算约束的序列决策问题,动态评估是否压缩
  • 在复杂任务中性能超基线1.6倍,预算减少时仍保持优势
  • 适合需要长期推理的智能体,如复杂问答与网页浏览任务

基于大语言模型的智能体在长周期推理中展现出强大潜力,但受部署因素(如内存、延迟和成本)限制,上下文长度存在实际预算。随着交互历史增长,如何在保留历史信息与遵守上下文限制之间权衡成为关键挑战。为此,我们提出预算感知的上下文管理方法(BACM),将上下文管理建模为具有预算约束的序列决策问题。该方法使智能体能在纳入新观测前评估可用预算,并决定何时以及以何种程度压缩交互历史。进一步提出BACM-RL,一种端到端的课程式强化学习方法,可学习在不同上下文预算下的压缩策略。在组合多目标问答与长周期网络浏览基准测试中,BACM-RL在不同模型规模和任务复杂度下均持续优于现有方法,在高复杂度场景下性能超越强基线超过1.6倍,且在预算缩减时仍保持显著优势,而多数方法性能随预算下降而显著下滑。

原文摘要 · Abstract (English)

LLM-based agents show strong potential for long-horizon reasoning, yet their context size is limited by deployment factors (e.g., memory, latency, and cost), yielding a constrained context budget. As interaction histories grow, this induces a trade-off between retaining past information and staying within the context limit. To address this challenge, we propose Budget-Aware Context Management (BACM), which formulates context management as a sequential decision problem with a context budget constraint. It enables agents to assess the available budget before incorporating new observations and decide when and how much of the interaction history to compress. We further develop BACM-RL, an end-to-end curriculum-based reinforcement learning approach that learns compression strategies under varying context budgets. Experiments on compositional multi-objective QA and long-horizon web browsing benchmarks show that BACM-RL consistently outperforms prior methods across model scales and task complexities, achieving over $1.6\times$ gains over strong baselines in high-complexity settings, while maintaining strong advantages as budgets shrink, where most methods exhibit a downward performance trend.

大模型推理上下文管理智能体系统

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