透過任務分解和RAG生成低代碼完整工作流程

Generating a Low-code Complete Workflow via Task Decomposition and RAG

November 29, 2024
作者: Orlando Marquez Ayala, Patrice Béchard
cs.AI

摘要

AI 技術正迅速從研究走向生產。隨著能生成文本、圖像和視頻的基礎模型(FMs)的普及,基於 AI 的系統正變得越來越複雜。與傳統基於 AI 的軟件相比,採用 FMs 或基於 GenAI 的系統更難設計,因為它們的規模和多功能性。這使得有必要記錄最佳實踐,即軟件工程中稱為設計模式的知識,這些知識可以在 GenAI 應用中使用。我們的第一個貢獻是將兩種技術,任務分解和檢索增強生成(RAG),正式化為 GenAI 系統的設計模式。我們討論它們在軟件質量屬性方面的權衡,並評論替代方法。我們建議 AI 從業者不僅從科學角度,還應從靈活性、可維護性、安全性和保密性等期望的工程特性角度考慮這些技術。作為第二個貢獻,我們描述了我們在工業界應用任務分解和 RAG 來為企業用戶構建一個複雜的真實世界 GenAI 應用的經驗:工作流生成。生成工作流的任務包括使用系統環境中的數據生成具體計劃,以用戶需求為輸入。由於這兩種模式影響整個 AI 開發周期,我們解釋了它們如何影響數據集創建、模型訓練、模型評估和部署階段。
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.

Summary

AI-Generated Summary

PDF42December 4, 2024