让大模型学会何时规划,提升推理效率与任务完成率。
Learning When to Plan: Efficiently Allocating Test-Time Compute for LLM Agents
- 提出动态规划框架,让模型自主决定何时分配计算资源进行规划。
- 在Crafter环境测试中,该方法更高效且能完成更复杂目标。
- 支持人工计划引导,适合构建安全协作的智能体系统。
通过强化学习训练大型语言模型(LLM)进行推理,显著提升了其问题解决能力。在智能体场景中,现有方法如ReAct要求模型在每次行动前都显式规划;然而我们发现,始终规划会增加计算开销并降低长程任务表现,而从不规划则限制性能。为此,我们提出一个动态规划的概念性框架,使智能体能够灵活决定在测试阶段何时分配计算资源进行规划。采用两阶段训练流程:(1) 在多样化合成数据上进行监督微调,以引导模型具备动态规划能力;(2) 在长程环境中通过强化学习优化该能力。在Crafter环境中的实验表明,使用该方法训练的动态规划智能体具有更高的样本效率,并能持续达成更复杂的任务目标。此外,这些智能体可通过人工编写的计划有效引导,表现优于自主决策,展现出更安全、更协同的智能体系统的潜力。
原文摘要 · Abstract (English)
Training large language models (LLMs) to reason via reinforcement learning (RL) significantly improves their problem-solving capabilities. In agentic settings, existing methods like ReAct prompt LLMs to explicitly plan before every action; however, we demonstrate that always planning is computationally expensive and degrades performance on long-horizon tasks, while never planning further limits performance. To address this, we introduce a conceptual framework formalizing dynamic planning for LLM agents, enabling them to flexibly decide when to allocate test-time compute for planning. We propose a simple two-stage training pipeline: (1) supervised fine-tuning on diverse synthetic data to prime models for dynamic planning, and (2) RL to refine this capability in long-horizon environments. Experiments on the Crafter environment show that dynamic planning agents trained with this approach are more sample-efficient and consistently achieve more complex objectives. Additionally, we demonstrate that these agents can be effectively steered by human-written plans, surpassing their independent capabilities and highlighting the potential for safer and more collaborative agentic systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。