(P)rior(D)yna(F)low: A Priori Dynamic Workflow Construction via Multi-Agent Collaboration

Yi Lin, Lujin Zhao, Yijie Shi · 2025

Read (P)rior(D)yna(F)low: A Priori Dynamic Workflow Construction via Multi-Agent Collaboration by Yi Lin, Lujin Zhao, Yijie Shi (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-14547.txt.

Introduction

Yi Lin, Lujin Zhao and Yijie Shi propose PriorDynaFlow in 2025, a system that builds multi agent workflows before a task runs, not only from past experience. Carefully designed workflows of language models beat single models on hard tasks. Most builders lean only on historical cases.

History helps, but each new task has unique traits that old workflows miss. Their framework first uses Q-table learning to prune and guide the decision space from experience. Agents then collaborate to construct a workflow tailored to the current task characteristics. The a priori design balances proven patterns with task specific adaptation. Better upfront workflow design could cut the costly trial and error that multi agent systems usually need at run time.

Catalog record

CREATORYi Lin, Lujin Zhao, Yijie Shi
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE63 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2509-14547

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

(P)rior(D)yna(F)low: A Priori Dynamic Workflow Construction via Multi-Agent Collaboration Yi Lin, Lujin Zhao, Yijie Shi Abstract Recent studies have shown that carefully designed workflows coordinating large language models (LLMs) significantly enhance task-solving capabilities compared to using a single model. While an increasing number of works focus on autonomous workflow construction, most existing approaches rely solely on historical experience, leading to limitations in efficiency and adaptability. We argue that while historical experience is valuable, workflow construction should also flexibly respond to the unique characteristics of each task. To this end, we propose an a priori dynamic framework for automated workflow construction. Our framework first leverages Q-table learning to optimize the decision space, guiding agent decisions and enabling effective use of historical experience. At the same time, agents evaluate the current task progress and make a priori decisions regarding the next executing agent, allowing the system to proactively select the more suitable workflow structure for each given task. Additionally, we incorporate mechanisms such as cold-start initialization, early stopping, and pruning to further improve system efficiency. Experimental evaluations on four benchmark datasets demonstrate the feasibility and effectiveness of our approach. Compared to state-of-the-art baselines, our method achieves an average improvement of 4.05%, while reducing workflow construction and inference costs to only 30.68%–48.31% of those required by existing methods. Code — https://github.com/L1n111ya/PriorDynaFlow 1 Introduction Driven by technological advances, large language models (LLMs) have become powerful tools in reasoning, code generation, and mathematical problem-solving. Yet, as their capabilities are further explored, limitations—such as hallucinations and task-specific inefficiencies—have become increasingly evident. While LLMs excel at generating fluent text or solving isolated problems, they often struggle with compositional reasoning and cross-domain generalization. These challenges are particularly pronounced in complex, multi-step tasks requiring contextual awareness, where models may produce inconsistent outputs or fail to prioritize critical sub-problems.To address these issues, methods such as problem decomposition ( Liao et al. 2023 ) , reflection ( Noah et al. 2023 ) , and chain-of-thought prompting ( Wei et al. 2022 ) have been proposed, showing promise in improving LLM performance. However, these approaches primarily mitigate surface-level errors rather than addressing fundamental architectural limitations—such as the inability to model dynamic task dependencies or adapt to novel problem structures. Figure 1: Overview of PriorDynaFlow. The framework dynamically operates the multi-agent system by enabling autonomous decision-making among agents, while Q-learning is employed to constrain and guide the decision space. For brevity, we denote it as PDF. In response, multi-agent systems have been increasingly recognized as a promising paradigm for addressing complex, real-world tasks. By decomposing problems into specialized sub-tasks and enabling collaborative decision-making, multi-agent frameworks can overcome LLMs’ single-pass inference limitations. For example, ( Chen et al. 2024 ) demonstrated that assigning distinct roles to agents (e.g., planner, executor, critic) significantly improves performance on multi-hop reasoning tasks. Nevertheless, the widespread adoption of multi-agent systems faces two critical barriers: (1) Design Complexity : Constructing efficient agent workflows requires domain expertise and labor-intensive manual configuration, limiting scalability. (2) Static Adaptability : Most existing frameworks rely on predefined, rigid workflows that lack flexibility to adjust to problem-specific dynamics (e.g., varying task dependencies or resource constraints). Recent efforts have focused on automating workflow construction to reduce design costs. For instance, ( Zhang et al. 2025b ) proposed a Monte Carlo Tree Search (MCTS)-based autonomous framework, while another work by ( Zhang et al. 2025a ) introduced a directed acyclic graph (DAG) pruning algorithm to optimize agent collaboration. ( Liu et al. 2024 ) conceptualized multi-agent systems as feedforward neural networks (FNNs), where an LLM Ranker selects layer-wise nodes to dynamically construct workflows. However, their workflow construction is typically a posteriori, and most approaches focus on static workflows. To address this challenge, we propose PDF, an a priori dynamic multi-Agent framework capable of autonomously constructing general-purpose workflows. Users define agent roles and behaviors, while PDF autonomously handles workflow construction and execution. Our approach emphasizes a priori workflow generation: after completing its action, an agent autonomously selects the next agent(s) or terminates the process, enabling proactive decisions based on task progress and learned experience.PDF employs Q-Learning with a reward mechanism to assign and update Q-values, constraining agent decisions to high-performing paths via the Q-table. To address the cold-start problem (initially empty Q-table), we maximize the decision space during early training, allowing any agent to be selected as the next node. This accelerates Q-table convergence. Mechanisms like early stopping and pruning further ensure efficiency and stability. Our contributions are threefold: • PDF Framework : An a priori dynamic multi-Agent framework leveraging autonomous decision-making and Q-Learning to construct both general-purpose and task-specific workflows autonomously. • Theoretical Justification : We formalize the reward function design in our Q-learning algorithm through mathematical proofs. • Empirical Validation : Extensive evaluations on four benchmark datasets (spanning mathematics and code generation) demonstrate a 4.05% average performance improvement over state-of-the-art baselines while reducing construction/inference costs to 30.68–48.31% of existing solutions. 2 Related Work Recently, the research on large-scale model Agents has become increasingly in-depth, and there have been many successful cases of applying it to various real-world fields( ( Ridnik, Kredo, and Friedman 2024 ) , ( Xie et al. 2024 ) , ( Wang et al. 2023a ) , ( Wang et al. 2024 ) , ( Zhang et al. 2024a ) , ( Hong et al. 2024 ) , ( Xu et al. 2024 ) , ( Xie et al. 2024 ) , ( Zhong et al. 2025 ) ), such as code generation, mathematics, reasoning, and other domains. LLM-agent Workflow ( Wang et al. 2023b ) refers to the ability to generate multiple reasoning paths and aggregate results to output stable and logically closed-loop answers. ( Madaan et al. 2023 ) proposes an iterative refinement framework via self-feedback, leveraging a single LLM without extra data to enhance output quality. ( Zhang et al. 2024b ) enhances code generation capabilities through an agent system that integrates tool invocation, enabling it to tackle coding challenges at the real codebase level and achieve full-process automation from task planning to code implementation. ( Chen et al. 2024 ) constructing a multi-agent system with communication and collaboration capabilities, which realizes full-process automated software development from requirement analysis to code implementation by simulating the division of labor and interaction patterns of human software development teams. ( Li, Wang, and Shang 2024 ) introduced a human-inspired workflow in which code is debugged incrementally, enabling large language models to generate more accurate and reliable code. Mutil-Agent Reinforcement Learning ( Li et al. 2024 ) AutoFlow proposes a natural-language workflow generation framework with iterative optimization. ( Silver et al. 2016 ) and ( OpenAI et al. 2019 ) applied deep neural networks with MCTS and multi-agent RL to defeat human professionals in Go and Dota 2. ( Noah et al. 2023 ) proposed the Reflexion framework, which enhances the continuous learning and adaptive capabilities of language agents in complex tasks by enabling them to conduct self-reflection in natural language and optimize decision-making processes using reinforcement learning. ( Zhang et al. 2025b ) proposed an automated workflow construction method based on Monte Carlo Tree Search (MCTS). ( Zhang et al. 2025a ) argued that agent workflows can be modeled as topological structures, and presented

Read the complete text