控制流与数据流分离:多智能体大语言模型中的稳定提示优化
Control-Data Flow Separation: Stable Prompt Optimization in Multi-Agent LLMs
September 1, 2026
作者: Wentao Zhang, Syed Shariyar Murtaza, Junaid Ahmad Bhatti, Utkarsh Soni, Yifan Nie, Eugene Wen, Yuntian Deng
cs.AI
摘要
提示优化可以改进多智能体大语言模型系统,但被优化的提示往往同时承担两种相互交织的角色:生成任务相关内容,以及指定执行关键协议——如消息路由、输出格式化和终止信号——底层代码依赖这些协议运行。因此,旨在改进内容生成的提示编辑可能无意中破坏协议,导致整个智能体流水线失效。我们的关键观察在于,这两种角色具有不同的表征形式:执行协议通常是结构化的,而任务相关内容通常以非结构化语言表达。基于此,我们提出控制-数据流分离方法,其中执行关键控制被表示为类型化、已验证的程序对象,而任务相关语言则保留为可优化的数据流,用于智能体间通信。该设计使优化器能够改进多智能体行为,同时不将路由或格式化接口暴露于提示漂移的风险之下。在合成推理、协作式评审生成和保险评级工作流等任务中,我们的框架实验证明能够实现100%的最终协议有效性,同时持续改进任务性能。
English
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.