arXiv:2602.23668cs.AIcs.SY2026-02被引 1

用伪代码规划让大模型智能体更高效地完成复杂长任务

PseudoAct: Leveraging Pseudocode Synthesis for Flexible Planning and Action Control in Large Language Model Agents

  • 通过生成结构化伪代码分解任务并明确控制流
  • 在FEVER上成功率达20.93%绝对提升,刷新HotpotQA记录
  • 适合需要复杂决策和多工具协作的长期任务场景

大型语言模型(LLM)代理通常依赖反应式决策范式(如ReAct),根据不断增长的执行历史选择动作。虽然在短任务中有效,但在涉及分支、循环或多工具协调的复杂长周期任务中,这类方法常导致冗余工具使用、推理不稳定和高令牌消耗。本文提出PseudoAct,一种通过伪代码合成实现灵活规划与动作控制的新框架。利用LLM表达任务求解策略为代码的能力,PseudoAct生成包含序列、条件、循环、并行组合等逻辑结构的结构化伪代码计划,将任务分解为子任务并显式编码控制流。动作按此全局计划执行,使决策逻辑清晰且时间一致。该设计减少了冗余动作,防止无限循环,避免无意义的替代探索,实现稳定高效的长周期决策。在基准数据集上的实验表明,该方法显著优于现有反应式代理,在FEVER上成功率提升20.93%,并在HotpotQA上达到新最优性能。

原文摘要 · Abstract (English)

Large language model (LLM) agents typically rely on reactive decision-making paradigms such as ReAct, selecting actions conditioned on growing execution histories. While effective for short tasks, these approaches often lead to redundant tool usage, unstable reasoning, and high token consumption in complex long-horizon tasks involving branching, iteration, or multi-tool coordination. To address these limitations, this paper introduces PseudoAct, a novel framework for flexible planning and action control in LLM agents through pseudocode synthesis. Leveraging the ability of LLMs to express task-solving strategies as code, PseudoAct synthesizes a structured pseudocode plan that decomposes a task into subtasks and explicitly encodes control flow, including sequencing, conditionals, loops, parallel composition, and combinations of these logic primitives. Actions are then executed by following this global plan, making the decision logic explicit and temporally coherent. This design reduces redundant actions, prevents infinite loops, and avoids uninformative alternative exploration, enabling consistent and efficient long-horizon decision-making. Experiments on benchmark datasets show that our method significantly outperforms existing reactive agent approaches, achieving a 20.93% absolute gain in success rate on FEVER and setting a new state-of-the-art on HotpotQA.

大模型代理任务规划伪代码长程决策

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