FlowAgent:为工作流智能体实现合规性与灵活性
FlowAgent: Achieving Compliance and Flexibility for Workflow Agents
AI总结:
本文提出 FlowAgent 框架,通过 PDL 与控制器监督机制兼顾工作流合规性和 OOW 查询处理灵活性,并建立新评估方法验证其有效性。
摘要:
将工作流与大型语言模型(LLM)集成,可使基于 LLM 的智能体执行预定义流程,从而增强现实应用中的自动化。传统的基于规则的方法往往会限制 LLM 固有的灵活性,因为其预定义执行路径会限制模型的动作空间,尤其是在遇到意外的、工作流之外(OOW)的查询时。相反,基于提示的方法允许 LLM 完全控制流程,这可能导致流程合规性的执行力度减弱。为应对这些挑战,我们提出 FlowAgent,这是一种旨在同时保持合规性与灵活性的新型智能体框架。我们提出过程描述语言(PDL),它将自然语言的适应性与代码的精确性相结合,用于表述工作流。在 PDL 的基础上,我们开发了一个综合框架,使 LLM 能够有效处理 OOW 查询,同时让执行路径处于一组控制器的监督之下。此外,我们提出一种新的评估方法,用于严格评估 LLM 智能体处理 OOW 场景的能力,超越现有基准所测试的常规流程合规性。在三个数据集上的实验表明,FlowAgent 不仅能够遵守工作流,还能有效处理 OOW 查询,突显其在合规性与灵活性方面的双重优势。代码可在 https://github.com/Lightblues/FlowAgent 获取。
英文摘要:
The integration of workflows with large language models (LLMs) enables LLM-based agents to execute predefined procedures, enhancing automation in real-world applications. Traditional rule-based methods tend to limit the inherent flexibility of LLMs, as their predefined execution paths restrict the models' action space, particularly when the unexpected, out-of-workflow (OOW) queries are encountered. Conversely, prompt-based methods allow LLMs to fully control the flow, which can lead to diminished enforcement of procedural compliance. To address these challenges, we introduce FlowAgent, a novel agent framework designed to maintain both compliance and flexibility. We propose the Procedure Description Language (PDL), which combines the adaptability of natural language with the precision of code to formulate workflows. Building on PDL, we develop a comprehensive framework that empowers LLMs to manage OOW queries effectively, while keeping the execution path under the supervision of a set of controllers. Additionally, we present a new evaluation methodology to rigorously assess an LLM agent's ability to handle OOW scenarios, going beyond routine flow compliance tested in existing benchmarks. Experiments on three datasets demonstrate that FlowAgent not only adheres to workflows but also effectively manages OOW queries, highlighting its dual strengths in compliance and flexibility. The code is available at https://github.com/Lightblues/FlowAgent.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。