[{"data":1,"prerenderedAt":213},["ShallowReactive",2],{"article-other\u002Fagent_plan":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"body":13,"_type":207,"_id":208,"_source":209,"_file":210,"_stem":211,"_extension":212},"\u002Farticles\u002Fother\u002Fagent_plan","other",false,"","AgentPlan",null,"2026-09-08",[12],"随笔",{"type":14,"children":15,"toc":193},"root",[16,25,31,36,42,47,52,57,62,67,72,76,81,86,89,95,100,106,128,134,153,159],{"type":17,"tag":18,"props":19,"children":21},"element","h2",{"id":20},"面试题",[22],{"type":23,"value":24},"text","面试题：",{"type":17,"tag":26,"props":27,"children":28},"p",{},[29],{"type":23,"value":30},"在 Agent 的设计中，“规划能力”至关重要。请谈谈目前有哪些主流方法可以赋予 LLM 规划能力？（例如 CoT, ToT, GoT等）",{"type":17,"tag":18,"props":32,"children":34},{"id":33},"回答",[35],{"type":23,"value":33},{"type":17,"tag":37,"props":38,"children":40},"h3",{"id":39},"目前我的理解",[41],{"type":23,"value":39},{"type":17,"tag":26,"props":43,"children":44},{},[45],{"type":23,"value":46},"一般任务不需要规划\n中等难度的任务，使用框架自带边思考边规划就好。\n高难度的任务，可自己根据需求实现plan机制。",{"type":17,"tag":37,"props":48,"children":50},{"id":49},"codex回答",[51],{"type":23,"value":49},{"type":17,"tag":26,"props":53,"children":54},{},[55],{"type":23,"value":56},"赋予 Agent 规划能力的方法可以分为三层。",{"type":17,"tag":26,"props":58,"children":59},{},[60],{"type":23,"value":61},"第一层是 CoT，通过中间推理帮助模型生成初步计划，但它本身不等于完整规划。",{"type":17,"tag":26,"props":63,"children":64},{},[65],{"type":23,"value":66},"第二层是 ToT 和 GoT，把规划视为搜索问题，允许探索、评估、回溯或合并多条候选路径。",{"type":17,"tag":26,"props":68,"children":69},{},[70],{"type":23,"value":71},"第三层是 Agent 系统层面的规划，例如 ReAct、Plan-and-Execute 和 Planner–Executor，它们会将目标拆解为可执行任务，并由 Harness 执行工具、维护状态，再根据环境反馈动态调整计划。实际生产中，通常会组合使用这些方法，而不是只选择其中一种。",{"type":17,"tag":73,"props":74,"children":75},"hr",{},[],{"type":17,"tag":37,"props":77,"children":79},{"id":78},"codex怎么实现plan机制",[80],{"type":23,"value":78},{"type":17,"tag":26,"props":82,"children":83},{},[84],{"type":23,"value":85},"Codex 使用经过 Agent 编程优化的推理模型进行动态任务分解，再通过 Harness 管理计划状态、工具调用和执行反馈，从而形成“规划—执行—观察—重规划”的闭环。OpenAI 的模型指南也将规划、代码库导航、工具使用和验证视为完整的编码 Agent 工作流。",{"type":17,"tag":73,"props":87,"children":88},{},[],{"type":17,"tag":37,"props":90,"children":92},{"id":91},"github回答",[93],{"type":23,"value":94},"GitHub回答",{"type":17,"tag":26,"props":96,"children":97},{},[98],{"type":23,"value":99},"规划能力是衡量Agent智能水平的核心指标，它决定了Agent能否有效地将复杂目标分解为可执行步骤。目前，赋予LLM规划能力的主流方法，从简单到复杂，大致可以分为以下几个层次三种()：",{"type":17,"tag":37,"props":101,"children":103},{"id":102},"基于提示的隐式规划-prompt-based-implicit-planning",[104],{"type":23,"value":105},"基于提示的隐式规划 (Prompt-based Implicit Planning):",{"type":17,"tag":107,"props":108,"children":109},"ol",{},[110,120],{"type":17,"tag":111,"props":112,"children":113},"li",{},[114],{"type":17,"tag":115,"props":116,"children":117},"strong",{},[118],{"type":23,"value":119},"CoT(Chain of Thought)：",{"type":17,"tag":111,"props":121,"children":122},{},[123],{"type":17,"tag":115,"props":124,"children":125},{},[126],{"type":23,"value":127},"ReAct框架：",{"type":17,"tag":37,"props":129,"children":131},{"id":130},"基于搜索的显式规划-search-based-explicit-planning",[132],{"type":23,"value":133},"基于搜索的显式规划 (Search-based Explicit Planning):",{"type":17,"tag":107,"props":135,"children":136},{},[137,145],{"type":17,"tag":111,"props":138,"children":139},{},[140],{"type":17,"tag":115,"props":141,"children":142},{},[143],{"type":23,"value":144},"ToT(Tree of Thoughts)：",{"type":17,"tag":111,"props":146,"children":147},{},[148],{"type":17,"tag":115,"props":149,"children":150},{},[151],{"type":23,"value":152},"GoT(Graph of Thoughts):",{"type":17,"tag":37,"props":154,"children":156},{"id":155},"基于任务分解的规划-task-decomposition-planning",[157],{"type":23,"value":158},"基于任务分解的规划 (Task Decomposition Planning):",{"type":17,"tag":160,"props":161,"children":162},"ul",{},[163,173,183],{"type":17,"tag":111,"props":164,"children":165},{},[166,171],{"type":17,"tag":115,"props":167,"children":168},{},[169],{"type":23,"value":170},"方法：",{"type":23,"value":172}," 训练或提示LLM充当一个“规划器”，将主任务显式地分解成一个依赖图或一个步骤列表。然后，另一个“执行器”LLM（或同一个LLM扮演不同角色）再去逐一完成这些子任务。",{"type":17,"tag":111,"props":174,"children":175},{},[176,181],{"type":17,"tag":115,"props":177,"children":178},{},[179],{"type":23,"value":180},"优点：",{"type":23,"value":182}," 结构清晰，易于管理和监控任务进度。",{"type":17,"tag":111,"props":184,"children":185},{},[186,191],{"type":17,"tag":115,"props":187,"children":188},{},[189],{"type":23,"value":190},"缺点：",{"type":23,"value":192}," 对LLM的分解能力要求很高，且预先分解的计划可能缺乏对动态变化的适应性。",{"title":7,"searchDepth":194,"depth":194,"links":195},2,[196,197],{"id":20,"depth":194,"text":24},{"id":33,"depth":194,"text":33,"children":198},[199,201,202,203,204,205,206],{"id":39,"depth":200,"text":39},3,{"id":49,"depth":200,"text":49},{"id":78,"depth":200,"text":78},{"id":91,"depth":200,"text":94},{"id":102,"depth":200,"text":105},{"id":130,"depth":200,"text":133},{"id":155,"depth":200,"text":158},"markdown","content:articles:other:agent_plan.md","content","articles\u002Fother\u002Fagent_plan.md","articles\u002Fother\u002Fagent_plan","md",1789465114555]