AdaptFlow: Adaptive Workflow Optimization via Meta-Learning

Runchuan Zhu, Bowen Jiang, Lingrui Mei, Fangkai Yang, Lu Wang +6 more
8/11/2025
cs.AI

Official code: microsoft/DKI_LLM (40 stars, MIT, last commit 2026-04-08).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

microsoft/DKI_LLMOfficial100%
MIT

This is a repository for DKI group concerning the LLM-related papers alongside with code.

4011HTML, JavaFeb 25, 20256 months agoMIT

Similar Papers

Cite this paper

@article{zhu2025adaptflow,
  title  = {AdaptFlow: Adaptive Workflow Optimization via Meta-Learning},
  author = {Runchuan Zhu and Bowen Jiang and Lingrui Mei and Fangkai Yang and Lu Wang and Haoxiang Gao and Fengshuo Bai and Pu Zhao and Qingwei Lin and Saravan Rajmohan and Dongmei Zhang},
  year   = {2025},
  eprint = {2508.08053},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.08053v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.08053.svg)](https://codeofpaper.com/paper/2508.08053)

Discussion