程序化图:用于LLM智能体的自进化执行结构

·

研究论文 · 2026/09/09

大型语言模型越来越多地被部署为在长时间范围内规划并通过外部工具行动的智能体。大多数智能体通过基于累积历史的无约束生成来选择动作,隐含了做什么、按什么顺序以及在什么条件下做的程序性知识。随着轨迹变长,智能体可能会失去目标、无序调用工具并重复无效动作。我们引入了程序图:正如知识图将事实知识组织为(实体,关系,实体)三元组以回答“是什么”问题,程序图将程序性知识组织为(程序,关系,程序)三元组以回答“该做什么”问题。在每个决策步骤,框架定位智能体的活动节点,指导模型将周围的子图转换为逐步的情境指导,从而影响求解器的下一个动作而不强制指定。该图是自进化的:LLM 精炼器将失败的轨迹与成功的轨迹进行对比,并编辑图的拓扑和属性,提交能保持或改进保留验证性能的编辑,同时保留被拒绝的编辑以阻止重复。从最小骨架开始,循环构建的图能匹配或超越手工设计的图,还能修复有缺陷的专家先验。在多个数据集、任务类型和 LLM 上,程序图相对于基于记忆的基线带来了一致的改进,自进化进一步提升了性能,无需手动工程。

本文提出了一种新颖的程序图框架,将程序性知识显式结构化,并通过自进化机制持续优化,解决了长轨迹下智能体目标丢失和动作无序的问题。实验证明其在不同任务和模型上均优于基线,且无需手动工程,对提升 LLM 智能体的可靠性有重要价值。

Large language models are increasingly deployed as agents that plan over long horizons and act through external tools. Most agents select actions through unconstrained generation over an accumulating history, leaving implicit the procedural knowledge of what to do, in what order, and under which conditions. As trajectories lengthen, agents can lose track of their objectives, invoke tools out of order, and repeat unproductive actions. We introduce the Procedural Graph: just as a knowledge graph organizes factual knowledge into (entity, relation, entity) triplets for what-is questions, a Procedural Graph organizes procedural knowledge into (procedure, relation, procedure) triplets for what-to-do questions. At each decision step, the framework localizes the agent's active node, and a guidance model translates the surrounding subgraph into step-level situational guidance that biases the solver's next action without dictating it. The graph is self-evolving: an LLM refiner contrasts failed trajectories with successful ones and edits the graph's topology and attributes, committing edits that preserve or improve held-out validation performance while retaining rejected ones to discourage repetition. Starting from a minimal skeleton, the loop builds graphs that match or surpass hand-designed ones. It can also repair a flawed expert prior. Across multiple datasets, task types, and LLMs, the Procedural Graph delivers consistent gains over memory-based baselines, and self-evolution further improves performance without manual engineering.

阅读原文

参与讨论