BayesFlow: A Probability Inference Framework for Meta-Agent Assisted Workflow Generation

📅 2026-01-29
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the lack of principled probabilistic foundations in existing automatic workflow generation methods, which are often reduced to optimization problems without theoretical guarantees. We formalize the task for the first time as Bayesian inference over the posterior distribution of workflows and propose BayesFlow, a training-free Bayesian Workflow Generation (BWG) framework. At its core, BayesFlow combines parallel lookahead rollouts with importance weighting, provably ensuring that the empirical distribution converges to the target posterior even without an optimizer. To further enhance workflow quality, we integrate a sequential in-pool optimizer that iteratively refines candidate solutions. Extensive experiments demonstrate that BayesFlow significantly outperforms current approaches across six benchmarks, achieving up to a 9-percentage-point improvement over state-of-the-art methods and a remarkable 65-percentage-point gain over zero-shot prompting.

Technology Category

Application Category

📝 Abstract
Automatic workflow generation is the process of automatically synthesizing sequences of LLM calls, tool invocations, and post-processing steps for complex end-to-end tasks. Most prior methods cast this task as an optimization problem with limited theoretical grounding. We propose to cast workflow generation as Bayesian inference over a posterior distribution on workflows, and introduce \textbf{Bayesian Workflow Generation (BWG)}, a sampling framework that builds workflows step-by-step using parallel look-ahead rollouts for importance weighting and a sequential in-loop refiner for pool-wide improvements. We prove that, without the refiner, the weighted empirical distribution converges to the target posterior. We instantiate BWG as \textbf{BayesFlow}, a training-free algorithm for workflow construction. Across six benchmark datasets, BayesFlow improves accuracy by up to 9 percentage points over SOTA workflow generation baselines and by up to 65 percentage points over zero-shot prompting, establishing BWG as a principled upgrade to search-based workflow design. Code will be available on https://github.com/BoYuanVisionary/BayesFlow.
Problem

Research questions and friction points this paper is trying to address.

automatic workflow generation
Bayesian inference
LLM calls
tool invocation
end-to-end tasks
Innovation

Methods, ideas, or system contributions that make the work stand out.

Bayesian inference
workflow generation
importance weighting
look-ahead rollouts
training-free algorithm
🔎 Similar Papers
No similar papers found.