用元学习让AI工作流自动适应复杂任务,效果比人工设计更好。
AdaptFlow: Adaptive Workflow Optimization via Meta-Learning
- 基于自然语言的元学习,从多个任务中学习可复用的工作流初始化
- 在问答、编程、数学推理上超越人工和搜索基线,通用性强
- 适合需要快速适配新任务的智能系统开发者
大语言模型(LLM)的发展推动了智能体工作流的研究,即通过一系列LLM调用完成复杂任务。然而,现有方法多依赖静态模板或人工设计,难以适应多样化任务且扩展性差。本文提出AdaptFlow,一种受模型无关元学习(MAML)启发的自然语言驱动元学习框架。该框架学习一个可泛化的初始工作流,支持子任务级快速适应。采用双层优化机制:内层利用LLM生成的反馈对特定子任务进行工作流微调,外层则更新共享初始化以在各类任务上表现良好。该设计使AdaptFlow能通过语言引导的修改快速适配未见任务。在问答、代码生成和数学推理基准上评估显示,AdaptFlow持续优于人工设计与自动搜索的基线,实现领先性能,并展现出跨任务与跨模型的强泛化能力。代码与数据已公开于https://github.com/microsoft/DKI_LLM/tree/AdaptFlow/AdaptFlow。
原文摘要 · Abstract (English)
Recent advances in large language models (LLMs) have sparked growing interest in agentic workflows, which are structured sequences of LLM invocations intended to solve complex tasks. However, existing approaches often rely on static templates or manually designed workflows, which limit adaptability to diverse tasks and hinder scalability. We propose AdaptFlow, a natural language-based meta-learning framework inspired by model-agnostic meta-learning (MAML). AdaptFlow learns a generalizable workflow initialization that enables rapid subtask-level adaptation. It employs a bi-level optimization scheme: the inner loop refines the workflow for a specific subtask using LLM-generated feedback, while the outer loop updates the shared initialization to perform well across tasks. This setup allows AdaptFlow to generalize effectively to unseen tasks by adapting the initialized workflow through language-guided modifications. Evaluated across question answering, code generation, and mathematical reasoning benchmarks, AdaptFlow consistently outperforms both manually crafted and automatically searched baselines, achieving state-of-the-art results with strong generalization across tasks and models. The source code and data are available at https://github.com/microsoft/DKI_LLM/tree/AdaptFlow/AdaptFlow.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。