arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.23822cs.AI
收藏

ReCAP:面向大语言模型智能体的递归上下文感知推理与规划

ReCAP: Recursive Context-Aware Reasoning and Planning for Large Language Model Agents

Department of Computer Science, Stanford University(斯坦福大学计算机科学系);Stanford Institute for Human-Centered AI(斯坦福大学人本人工智能研究所);MIT Media Lab(麻省理工学院媒体实验室)

Zhenyu Zhang, Tianyi Chen, Weiran Xu, Alex Pentland, Jiaxin Pei

AI总结:

针对大语言模型长程任务中序列提示易漂移、分层提示开销高的问题,提出带共享上下文的ReCAP分层框架,通过三项核心机制提升子目标对齐与成功率,在Robotouille基准上获显著增益。

摘要:

对于大语言模型(LLM)而言,需要多步推理和动态重规划的长程任务仍然颇具挑战。序列提示方法容易出现上下文漂移、目标信息丢失和循环失败的问题,而分层提示方法往往会削弱层级间连续性,或是产生巨大的运行时开销。我们提出ReCAP(Recursive Context-Aware Reasoning and Planning,递归上下文感知推理与规划)——一种具备共享上下文的LLM推理与规划分层框架。ReCAP融合了三项核心机制:(i)前置规划分解:模型生成完整的子任务列表,执行首个子项并优化剩余部分;(ii)父计划结构化重注入:在递归返回过程中维持一致的多层级上下文;(iii)内存高效执行:限制活跃提示的规模,使开销随任务深度线性增长。这些机制共同实现了高层目标与底层动作的对齐,减少了冗余提示,同时在递归过程中保持连贯的上下文更新。实验表明,ReCAP在多种长程推理基准上大幅提升了子目标对齐度和成功率:在严格的pass@1协议下,同步Robotouille任务上提升32%,异步Robotouille任务上提升29%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑