控制-数据流分离:多智能体LLM中的稳定提示优化

·

研究论文 · 2026/09/02

提示优化可以改善多智能体LLM系统,但被优化的提示往往承担两个纠缠不清的角色:生成任务相关内容,以及指定执行关键协议(如消息路由、输出格式、终止信号),这些协议是底层代码所依赖的。因此,旨在改进内容生成的提示编辑可能无意中破坏协议,导致整个智能体管道失败。我们的关键观察是,这两个角色有不同的表示:执行协议通常是结构化的,而任务相关内容通常以非结构化语言表达。基于此,我们提出控制-数据流分离,其中执行关键控制表示为类型化、验证过的程序对象,而任务相关语言保持为可优化的数据流,用于智能体通信。这种设计允许优化器改善多智能体行为,而不会将路由或格式化接口暴露给提示漂移。在合成推理、协作评论生成和保险评级工作流中,我们的框架经验性地实现了100%的最终协议有效性,同时持续提高任务性能。

该文提出了一种新颖的提示优化框架,通过分离控制与数据流,解决了多智能体系统中提示编辑导致协议失效的关键问题,具有实际应用价值。

Prompt optimization can improve multi-agent LLM systems, but the prompts being optimized often serve two entangled roles: generating task-relevant content and specifying execution-critical protocols, such as message routing, output formatting, and termination signals, on which the underlying code relies. As a result, a prompt edit intended to improve content generation can inadvertently corrupt the protocol and cause the entire agent pipeline to fail. Our key observation is that these two roles have different representations: execution protocols are typically structured, while task-relevant content is usually expressed in unstructured language. Based on this, we propose control-data flow separation, where execution-critical control is represented as typed, validated program objects, while task-relevant language remains the optimizable data flow for agent communication. This design allows optimizers to improve multi-agent behavior without exposing the routing or formatting interface to prompt drift. Across synthetic reasoning, collaborative review generation, and insurance rating workflows, our framework empirically achieves 100% eventual protocol validity while consistently improving task performance.

阅读原文

参与讨论