自动优化生成式AI工作流,提升质量并降低成本。
Cognify: Supercharging Gen-AI Workflows With Hierarchical Autotuning
- 分层自适应搜索算法动态分配调优资源。
- 生成质量最高提升2.8倍,成本降低10倍,延迟减少2.7倍。
- 适合需要高效部署AI工作流的研发团队使用。
当前涉及多模型调用、工具/接口调用、数据检索或通用代码执行的生成式AI工作流,通常采用手动且随意的方式调优,耗时且易出错。本文提出一种系统性的自动调优方法。核心洞察是生成式AI工作流可通过结构、算子和提示词调整获益,但其独特性需新的优化技术。我们提出AdaSeek——一种用于自动调优生成式AI工作流的自适应分层搜索算法。AdaSeek根据用户设定的总搜索预算,将调优方法按层次组织,并依据各层复杂度分配预算;在分层搜索过程中,基于工作流级评估结果,将资源从低效配置重新分配至更有潜力的配置。我们在Cognify框架中实现AdaSeek,针对六类工作流(如基于RAG的问答、文本转SQL)进行评估。结果显示,Cognify使生成质量最高提升2.8倍,执行成本降低10倍,端到端延迟减少2.7倍。
原文摘要 · Abstract (English)
Today's gen-AI workflows that involve multiple ML model calls, tool/API calls, data retrieval, or generic code execution are often tuned manually in an ad-hoc way that is both time-consuming and error-prone. In this paper, we propose a systematic approach for automatically tuning gen-AI workflows. Our key insight is that gen-AI workflows can benefit from structure, operator, and prompt changes, but unique properties of gen-AI workflows require new optimization techniques. We propose AdaSeek, an adaptive hierarchical search algorithm for autotuning gen-AI workflows. AdaSeek organizes workflow tuning methods into different layers based on the user-specified total search budget and distributes the budget across different layers based on the complexity of each layer. During its hierarchical search, AdaSeek redistributes the search budget from less useful to more promising tuning configurations based on workflow-level evaluation results. We implement AdaSeek in a workflow autotuning framework called Cognify and evaluate Cognify using six types of workflows such as RAG-based QA and text-to-SQL transformation. Overall, Cognify improves these workflows' generation quality by up to 2.8x, reduces execution monetary cost by up to 10x, and reduces end-to-end latency by 2.7x.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。