让大模型长程任务更可靠,通过递归规划保持目标一致
ReCAP: Recursive Context-Aware Reasoning and Planning for Large Language Model Agents
- 分步规划+上下文回注,递归执行时不忘目标
- 在机器人任务中提升32%成功率,且推理成本线性增长
- 适合需要持续决策的智能体系统,如自动化工具链
长周期任务中的多步推理与动态重规划仍是大语言模型的挑战。顺序提示易导致上下文漂移、目标丢失和循环失败,而分层提示常削弱跨层级连续性或带来显著运行开销。本文提出ReCAP(递归上下文感知推理与规划),一种支持推理与规划共享上下文的分层框架。其包含三个核心机制:(i) 预规划分解,模型先生成完整子任务列表,执行首项后修正剩余;(ii) 父级计划结构化回注,在递归返回时维持多层级上下文一致性;(iii) 内存高效执行,限定活跃提示长度,使成本随任务深度线性增长。这些机制协同实现高层目标与底层动作对齐,减少重复提示,并保持递归过程中的上下文连贯性。实验表明,ReCAP显著提升子目标对齐度与成功率,在多个长周期推理基准上表现优异:同步版Robotouille下提升32%,异步版下提升29%(严格pass@1协议)。
原文摘要 · Abstract (English)
Long-horizon tasks requiring multi-step reasoning and dynamic re-planning remain challenging for large language models (LLMs). Sequential prompting methods are prone to context drift, loss of goal information, and recurrent failure cycles, while hierarchical prompting methods often weaken cross-level continuity or incur substantial runtime overhead. We introduce ReCAP (Recursive Context-Aware Reasoning and Planning), a hierarchical framework with shared context for reasoning and planning in LLMs. ReCAP combines three key mechanisms: (i) plan-ahead decomposition, in which the model generates a full subtask list, executes the first item, and refines the remainder; (ii) structured re-injection of parent plans, maintaining consistent multi-level context during recursive return; and (iii) memory-efficient execution, bounding the active prompt so costs scale linearly with task depth. Together these mechanisms align high-level goals with low-level actions, reduce redundant prompting, and preserve coherent context updates across recursion. Experiments demonstrate that ReCAP substantially improves subgoal alignment and success rates on various long-horizon reasoning benchmarks, achieving a 32% gain on synchronous Robotouille and a 29% improvement on asynchronous Robotouille under the strict pass@1 protocol.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。