用任务分解与检索增强生成,让低代码生成完整工作流更可靠。
Generating a Low-code Complete Workflow via Task Decomposition and RAG
- 将任务分解与RAG作为GenAI系统设计模式,提升可维护性。
- 实测在企业级工作流生成中显著提升输出准确率与稳定性。
- 适合关注GenAI工程化落地的开发者与架构师参考。
AI技术正从研究快速转向生产应用。随着基础模型(FMs)在文本、图像和视频生成中的普及,基于生成式AI(GenAI)的系统复杂度大幅提升。相比传统AI软件,这类系统因规模与多功能性更强,设计难度显著增加。为此,本文首次将任务分解与检索增强生成(RAG)正式定义为GenAI系统的两大设计模式,分析其在灵活性、可维护性、安全性等软件质量属性上的权衡,并对比其他替代方案。我们建议开发者不仅从科学角度考虑,也应关注工程实践需求。第二部分基于真实工业场景,展示如何应用上述模式构建面向企业用户的复杂GenAI应用——工作流生成系统。该任务需根据用户需求与系统环境数据生成具体执行计划。由于这两项模式贯穿整个开发周期,文中还详细说明了其对数据集构建、模型训练、评估及部署阶段的影响。
原文摘要 · Abstract (English)
AI technologies are moving rapidly from research to production. With the popularity of Foundation Models (FMs) that generate text, images, and video, AI-based systems are increasing their complexity. Compared to traditional AI-based software, systems employing FMs, or GenAI-based systems, are more difficult to design due to their scale and versatility. This makes it necessary to document best practices, known as design patterns in software engineering, that can be used across GenAI applications. Our first contribution is to formalize two techniques, Task Decomposition and Retrieval-Augmented Generation (RAG), as design patterns for GenAI-based systems. We discuss their trade-offs in terms of software quality attributes and comment on alternative approaches. We recommend to AI practitioners to consider these techniques not only from a scientific perspective but also from the standpoint of desired engineering properties such as flexibility, maintainability, safety, and security. As a second contribution, we describe our industry experience applying Task Decomposition and RAG to build a complex real-world GenAI application for enterprise users: Workflow Generation. The task of generating workflows entails generating a specific plan using data from the system environment, taking as input a user requirement. As these two patterns affect the entire AI development cycle, we explain how they impacted the dataset creation, model training, model evaluation, and deployment phases.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。