Skip to main content
GW
HomeWorkAI appsPapersAboutNotesStackLabPilotPlan↗ (opens in a new tab)INVST↗ (opens in a new tab)
Govind Waghmare

Finance systems and AI. Building in public from NYC.

Resume (PDF)Book 20 minEmail
HomeNotesWorkAboutStackPapersLabFor founders
XLinkedInGitHubllms.txt
© 2026 · New York City

Keyboard shortcuts

?
Open this list
g then h
Go to Home
g then w
Go to Work
g then n
Go to Notes
g then a
Go to About
c
Ask the AI guide
Esc
Close this list
Original paperAbstract
Open in new tab (opens in a new tab)
All papers
AI agents and tools

Teach one agent to write its own team workflow

Paper: DynaFlow: Learning Free-Form Multi-Agent Orchestration

Ruhao Liu, Qi Li, Shizun Wang, Xinchao Wang · arXiv preprint (National University of Singapore) · Posted 25 Oct 2026 · 10 min read · arXiv 2610.34467

Share this paper

LinkedIn (opens in a new tab)X (opens in a new tab)WhatsApp (opens in a new tab)EmailDownload PDFExplainer + original paper (PDF), 1.7 MB

  • Many multi-agent systems use a fixed team shape.
  • But tasks differ. Some need one agent. Some need parallel work.
  • Dependent steps need reliable access to earlier results.
  • A fixed shape adds cost and delay.
88.08%

overall accuracy in Forced mode, using Qwen3.5-27B.

  • The main agent writes a JavaScript program to run sub-agents.
  • Only the main agent is trained. Sub-agents stay fixed.
  • They tested 6 benchmarks and 688 questions.

  • Forced mode beat the best baseline by 10.90 points.
  • Workflows hurt before training and helped after it.
  • Dynamic mode answered 47.1% of questions with no workflow.
  • Trained programs reuse upstream results far more often.

DynaFlow tops every baseline on overall accuracyFrom Table 1
0255075100Overall accuracy (%)DynaFlow (Forced)88.08%DynaFlow (Dynamic)87.94%Self-Refine77.18%DynaFlow (Direct)77.18%AFlow76.45%CoT-SC76.16%Base, Forced75.87%CoT74.27%Base, Direct71.51%

Hover, tap or focus a bar to read its exact value.

MethodOverall accuracy (%)
DynaFlow (Forced)88.08
DynaFlow (Dynamic)87.94
Self-Refine77.18
DynaFlow (Direct)77.18
AFlow76.45
CoT-SC76.16
Base, Forced75.87
CoT74.27
Base, Direct71.51

  • The workflows were harmful before training in 5 of 6 sets.
  • Only Qwen3.5-27B was tested.
  • Training used only first-turn demos, not multi-turn trials.

Jump to

  1. A The abstract
  2. 1 Introduction
  3. 2 Related work
  4. 3 DynaFlow: the method
  5. 4 Experimental setup
  6. 5 Results and analysis
  7. 6 Discussion
  8. 7 Conclusion
  9. A.1 Appendix A: experimental setup details
  10. B Appendix B: workflow runtime
  11. C Appendix C: training details
  12. D Appendix D: evaluation protocol
  13. E Appendix E: orchestration quality selection
  14. F Appendix F: evaluation prompts and interface
  15. G Appendix G: full results
  16. H Appendix H: case studies
  17. I Appendix I: extended related work
  18. W Words to know

Every detail from the paper

Cards follow the paper's own order. Dotted words link to Words to know. Numbers match the paper.

The problem

  • Multi-agent systems often use predefined collaboration structures.
  • This limits how well they fit varied task needs.

The idea

  • DynaFlow puts free-form executable workflow synthesis in the main agent's action space.
  • The agent decides when collaboration is needed.
  • It writes task-specific programs that run sub-agents in sequence or in parallel.
  • The programs also pass structured information and run verification.
  • Results and traces guide the next action.
  • So the agent can adapt collaboration as it reasons.

Training

  • Only the main agent is trained, by supervised fine-tuning on distilled trajectories.
  • A second pass refines on examples filtered for unsupported premises, biased verification and information-flow defects.
  • All sub-agents stay fixed.
  • This separates learning to orchestrate from learning to execute.

Results

  • On six benchmarks DynaFlow reaches 88.08% overall accuracy in Forced mode.
  • The benchmarks cover math, science questions and multi-hop retrieval.
  • That beats the strongest baseline by 10.90 percentage points on the same Qwen3.5-27B backbone.
  • After training, workflows use, verify and refine upstream outputs more often.
  • The authors call cross-stage information flow a key part of orchestration.

Why fixed teams fall short

  • How well an LLM multi-agent system (MAS) works depends on its setup.
  • The setup is how the agents collaborate.
  • Many systems use fixed structures with pre-set roles, messages or workflow parts.
  • Needs differ by task.
  • Simple queries may need one agent.
  • Independent subtasks can run in parallel.
  • Dependent stages need reliable access to upstream results.
  • A fixed structure can add needless communication, delay and compute.

Free Orchestration

  • The authors name a stronger skill: Free Orchestration.
  • It is the ability to decide when collaboration helps.
  • It also builds task-specific workflows during problem solving.

What earlier work does

  • Some methods search for good workflows with execution feedback.
  • Others make or adapt query-specific agent systems at inference time.
  • But they limit how workflows are built or adapted.
  • DyFlow revises plans with feedback but uses a finite set of operator templates.
  • MAS-Orchestra uses function calls but writes the whole structure in one decision.
  • It does not see intermediate results first.

The DynaFlow design

  • DynaFlow makes executable workflow synthesis a native action of the task-solving agent.
  • It sits beside ordinary tool use.
  • The same agent decides when to collaborate and builds the program.
  • It uses the returned outputs and traces to decide what to do next.
  • The main agent can answer directly, use a tool or generate a workflow program.
  • The program defines sub-agent duties, order and how outputs are passed, merged and checked.
  • A budget-limited runtime runs it and returns outputs and a trace.
  • The agent may then write follow-up workflows.

Training and results

  • Only the main agent is updated. Sub-agents stay fixed.
  • This focuses learning on coordination and lets pretrained models serve as executors.
  • Answer correctness alone does not guarantee good coordination.
  • So a second stage drops flawed demos.
  • It drops demos with unsupported premises, biased verification or incomplete information transfer.
  • DynaFlow reaches 88.08% overall accuracy in Forced mode.
  • That is 10.90 percentage points above the strongest baseline with the same backbone.
  • In Dynamic mode it stays close to Forced accuracy.
  • It answers 47.1% of questions without a workflow.

Agentic workflows and orchestration

  • A workflow sets model and tool calls through instructions, control flow and information links.
  • Control flow sets order and branching.
  • Data flow sets which intermediate outputs later calls get.
  • Orchestration organizes these calls to solve a task.
  • AutoGen gives programmable agent interactions.
  • Magentic-One and Apodex 1.1 support runtime coordination and replanning.
  • Graph and code forms support automated workflow design.
  • Verification-centered systems stress checking mid-way decisions and their evidence.

Focus of this paper

  • The authors study when to invoke collaboration and how to build task-specific workflows.
  • The workflows should keep, check and reuse intermediate results.
  • They also study how training changes workflow patterns.
  • They focus on stage dependencies and the use, checking and refining of intermediate results.

The DynaFlow decision loopFrom Figure 2 and Algorithm 1
  1. ModelMain agent reads the question
  2. Choose: answer, tool or workflow
  3. CodeWrite a JavaScript program
  4. Frozen sub-agents run it
  5. Outputs and trace return
  6. Answer when information suffices

The loop repeats until the main agent answers.

3.1 Free-form workflow orchestration

Actions

  • Given a question and an instruction, the main agent follows a policy.
  • The policy has three action forms.
  • Form 1: an ordinary tool call.
  • Form 2: a final answer.
  • Form 3: a workflow action.
  • It is a JavaScript program plus its call to the workflow tool.
  • At each turn the agent picks its next action.
  • It uses the history of past actions and observations.
  • The same policy decides whether to answer, use a tool or build a workflow.

Two execution modes

  • In Dynamic mode the first decision is a direct answer or a workflow call.
  • In Forced mode the first real action must call a workflow.
  • Forced mode tests workflow building without the first routing choice.
  • Both modes allow later tool calls and follow-up workflows.
  • Once a workflow runs, the main agent only coordinates and summarizes.
  • Sub-agents do the real problem solving.

The program and the feedback

  • The program defines sub-agent roles, stages and dependencies.
  • It uses agent calls, parallel runs and optional phase labels.
  • Independent calls can run at once.
  • Dependent calls get upstream outputs explicitly.
  • Each sub-agent gets only the instructions and inputs the program names.
  • The tool runs the program with fixed sub-agents under resource limits.
  • It returns the program output and a trace of each sub-agent call.
  • The agent adds the action and result to its history.
  • It answers when it judges the information sufficient.
  • Otherwise it calls a tool or workflow to verify, refine or extend results.
3.2 Learning the orchestration policy
Two-stage training of the main agentFrom Section 3.2
  1. Teacher writes trajectories
  2. Keep correct, protocol-following ones
  3. ModelStage 1: fine-tune main agent
  4. Judge flags defective programs
  5. Stage 2: train on clean subset

Sub-agents never change.

Stage 1: trajectory distillation

  • A teacher model writes trajectories with the same workflow tool, tools and fixed sub-agents.
  • The authors keep trajectories with correct final answers.
  • They also keep only those that follow the delegation rule.
  • That rule says the real solving happens inside workflows.
  • The training target is the main agent's first-turn output.
  • It holds the reasoning and the workflow action.
  • Both stages minimize the negative log-likelihood of that target.
  • The loss covers reasoning and action tokens.
  • Instructions, questions and tool definitions are masked.

Stage 2: high-quality data selection

  • Stage 1 demos are correct and follow protocol.
  • But they vary in orchestration quality.
  • Tests of the Stage 1 model show information-transfer failures and bad main-agent judgments.
  • These can steer workflows to wrong answers.
  • An LLM judge checks each question and program for three defects.
  • Premise injection: answer-deciding claims beyond the task givens are stated as facts.
  • Verification defects: review rules steer a verifier toward an expected answer or block independent checks.
  • Information-flow defects: missing context, wrong references, lossy transfer or hard-coded stand-ins for upstream outputs.
  • Verification is judged only when a review step exists.
  • Each reported defect needs matching excerpts from the program or launch arguments.

How Stage 2 trains

  • Complete first-turn examples that pass the evidence check are kept.
  • The result is a subset of the Stage 1 data.
  • Stage 2 continues from the Stage 1 checkpoint on this subset.
  • It uses the same objective and a smaller learning rate.
  • A random subset of equal size serves as a control.
  • It separates curation effects from extra training.

What the tests ask

  • Does training the main agent improve workflow-based problem solving?
  • How does high-quality data selection change orchestration?
  • Does adaptive workflow use keep performance while using fewer workflows?
  • Sub-agents stay fixed in every DynaFlow comparison.

Checkpoints and training

  • Three main-agent checkpoints are compared.
  • Base is the backbone with no orchestration training.
  • Stage 1 is trained by trajectory distillation.
  • DynaFlow is Stage 1 plus Stage 2 on selected demos.
  • GLM-5.3 Max is the teacher.
  • Stage 1 uses QLoRA on 2,257 teacher-distilled first-turn examples.
  • Stage 2 continues on 712 selected examples.
  • Main agent and sub-agents both run with thinking on.

Benchmarks and models

  • The test uses 688 questions across six sets.
  • They are AIME 2024, 2025 and 2026, PolyMATH (200), GPQA-Diamond (198) and HotpotQA (200).
  • PolyMATH and HotpotQA subsets use random seed 42.
  • They cover competition math, multilingual math, science reasoning and multi-hop questions.
  • HotpotQA uses web search.
  • The main agent uses Qwen3.5-27B.
  • All sub-agents use the Base Qwen3.5-27B and stay fixed.

Modes, baselines and metrics

  • Direct answers with no tools or workflows.
  • Dynamic picks between a direct answer and a workflow.
  • Forced requires a workflow before any real problem solving.
  • In workflow paths the main agent only designs, checks and summarizes.
  • Baselines are CoT, CoT-SC, Self-Refine and AFlow, all on Qwen3.5-27B.
  • CoT-SC pools five sampled answers. Self-Refine critiques and revises.
  • AFlow uses released workflows moved to new tasks, with no new search.
  • Base + Web search gives context for retrieval gains.
  • Tool-free baselines lack the retrieval access of workflow settings.
  • The authors report final-answer accuracy. Runs with no valid answer count as wrong.
  • They also score Forced workflows on four design criteria.
  • Scores run from 0 (major defect) to 2 (no defect).
  • The criteria are task consistency, decomposition, logical continuity and information-flow correctness.

5.1 Overall performance
MethodAIME24AIME25AIME26
CoT96.6793.3386.67
CoT-SC90.0093.3396.67
Self-Refine96.6793.3393.33
AFlow93.3396.67100.00
Base, Direct93.3393.3393.33
Base + Web search83.3373.3373.33
Base, Dynamic63.3363.3373.33
Base, Forced76.6770.0070.00
DynaFlow (Direct)93.3390.0090.00
DynaFlow (Dynamic)93.33100.0096.67
DynaFlow (Forced)100.00100.00100.00

Table 1: accuracy (%) on six benchmarks, Qwen3.5-27B

MethodPolyMATHGPQA-DHotpotQA
CoT83.0085.3546.50
CoT-SC84.5085.8650.50
Self-Refine87.5088.3848.00
AFlow86.0087.3747.00
Base, Direct74.0083.3347.50
Base + Web search66.0079.8077.50
Base, Dynamic64.0077.7853.00
Base, Forced70.0077.7881.50
DynaFlow (Direct)87.0086.8751.50
DynaFlow (Dynamic)91.5083.8484.50
DynaFlow (Forced)90.5084.8583.50

Table 1 (continued): PolyMATH, GPQA-D, HotpotQA, overall

Overall accuracy: CoT 74.27, CoT-SC 76.16, Self-Refine 77.18, AFlow 76.45, Base Direct 71.51, Base + Web search 74.71, Base Dynamic 65.12, Base Forced 75.87, DynaFlow Direct 77.18, Dynamic 87.94, Forced 88.08. Overall is micro-averaged over all 688 questions.

The headline

  • DynaFlow reaches 88.08% in Forced mode and 87.94% in Dynamic mode.
  • Both beat the strongest baseline by over 10 percentage points.
  • Both beat their Base counterparts, with only the main agent trained.

Mathematical reasoning

  • Forced mode solves all 90 AIME questions.
  • It scores 100% on the 2024, 2025 and 2026 sets.
  • Both modes beat the best baseline on PolyMATH by 3 to 4 points.
  • The workflows split solving into complementary derivation, computation and verification.
  • On PolyMATH they pair symbolic derivations with small numeric checks.
  • Those checks find errors in intermediate expressions.
  • That offers a concrete reason for the strong math scores.

Scientific reasoning

  • On GPQA-Diamond, Forced mode reaches 84.85%.
  • That is 7.07 points above Base, Forced and above Base, Direct.
  • Dynamic mode also beats its Base counterpart.
  • Self-Refine and AFlow still lead on this benchmark.
  • In failed cases, wrong sub-agent conclusions can mislead later verification.
  • The main agent can also fail to rank the right evidence in the final answer.
  • So independent verification and reliable answer selection matter.

Multi-hop questions with web search

  • DynaFlow is best on HotpotQA with 84.50% in Dynamic and 83.50% in Forced mode.
  • Both beat Base + Web search by 6 to 7 points.
  • The retrieval workflows center search on intermediate entities.
  • They check the link between hops.
  • Example: find the city tied to a venue.
  • Then get its nickname and check both hops name the same entity.
  • Building and checking an evidence chain is a likely reason for the gains.
5.2 Effect of training and execution mode
Workflow modes gain the most after trainingFrom Table 2
DirectDynamicForced
0255075100Overall accuracy (%)Base71.51%65.12%75.87%Stage 176.74%84.45%85.47%DynaFlow (Stage 2)77.18%87.94%88.08%

Hover, tap or focus a bar to read its exact value.

Main agentDirect (%)Dynamic (%)Forced (%)
Base71.5165.1275.87
Stage 176.7484.4585.47
DynaFlow (Stage 2)77.1887.9488.08
  • Base, Forced does worse than Base, Direct on every benchmark except HotpotQA.
  • On HotpotQA workflows add retrieval.
  • After Stage 1, Forced mode matches or beats Base, Direct.
  • This holds on all six sets.
  • Within the same checkpoint it beats Direct by 8.73 points overall.
  • So orchestration training turns workflow access into real collaboration.
  • The gain goes beyond the trained agent's solo score.
  • This fits earlier findings that team gains depend on task and structure.
  • Stage 2 improves both Forced and Dynamic modes.
  • Workflow quality is higher and upstream results are used more often.
  • Stage 2 also uses fewer sub-agents on average than Stage 1.
5.3 Workflow quality and task-specific organization
Training makes workflows hybrid and reuse upstream outputsFrom Figure 5
BaseStage 1Stage 2
0255075100% of Forced-mode workflowsHybrid structure3.4%83.2%85.6%Upstream output consumed12.6%93.3%97.7%

Hover, tap or focus a bar to read its exact value.

Workflow propertyBase (%)Stage 1 (%)Stage 2 (%)
Hybrid structure3.483.285.6
Upstream output consumed12.693.397.7

Better flow and verification

  • Stage 1 errors show three patterns.
  • The main agent adds unsupported premises.
  • Verification is steered toward an expected answer.
  • Intermediate information transfers in part or wrongly.
  • These motivated the Stage 2 filter.
  • After Stage 2 more workflows are defect-free on all four design criteria.
  • Major information-flow defects fall from 1.9% in Stage 1 to 0.9% in Stage 2.
  • Workflows that specify correction or refinement of mid results rise from 28.1% to 35.9%.

Connected stages

  • Base usually uses one sub-agent or makes calls with no dependencies.
  • Trained programs usually mix parallel and sequential stages.
  • Hybrid workflows rise from 3.4% for Base to 83.2% after Stage 1.
  • They reach 85.6% after Stage 2.
  • Programs that pass upstream outputs and tell the next agent to use them also rise.
  • The share goes from 12.6% to 93.3%, then 97.7%.
  • Stage 2 averages 4.16 sub-agents versus 4.35 in Stage 1.
  • Base scores well on logical continuity because its workflows are simple and often single-agent.

Task-specific roles and instructions

  • Solvers and verifiers make up over 90% of nodes on AIME and PolyMATH.
  • Researchers make up 59.6% of nodes on HotpotQA.
  • GPQA-Diamond mixes a large solver share with more research than the math sets.
  • Verification stays common, at 33.2% to 43.9% of nodes.
  • The main agent also writes a prompt for each sub-agent.
  • The prompt names the goal, the inputs and how to use upstream results.
  • So it adapts both the division of labor and the instructions.
  • This beats the transferred AFlow workflows, which were not built for these questions.
5.4 Adaptive workflow invocation
  • The Dynamic and Forced gap shrinks.
  • It is 10.75 points for Base and 1.02 after Stage 1.
  • For DynaFlow it is 0.14 points.
  • In Dynamic mode DynaFlow answers 47.1% of questions directly.
  • It scores 87.94%, close to 88.08% in Forced mode.
  • Averaged over all questions it uses 2.44 sub-agents per question.
  • Forced mode uses about 4.16, a cut of about 41%.
  • Figure 1 reports the same run as 3.44 agent roles per question on average.
  • A single main-agent policy can adapt its strategy to the task with fewer sub-agents.
  • The choice between direct answer and workflow is part of orchestration.
  • More agents do not always help. Collaboration should match each question.

  • Reliable information use matters as much as task decomposition.
  • Gains with fixed sub-agents support learning to coordinate existing skills.
  • Stage 2 gains come with better information transfer and more refinement of mid results.
  • This fits screening for unsupported premises, limited verification and information-flow defects.
  • GPQA-Diamond failures show how a right mid result can be lost.
  • It can be overridden in verification and final synthesis.
  • DynaFlow workflows add complementary evidence, independent checks and refinement.

Future work

  • Train sub-agents for reliable information transfer and independent verification.
  • Extend first-turn training to multi-turn trajectories with disagreements and errors.
  • That could help the main agent judge conflicting outputs and find errors.
  • It could also help it choose actions for error recovery, workflow revision and final answers.

  • DynaFlow joins free-form executable workflow actions with two-stage main-agent training.
  • The stages are trajectory distillation and selection by orchestration quality.
  • Sub-agents stay fixed.
  • Across six benchmarks it has the highest overall accuracy among the methods tested.
  • Dynamic mode answers nearly half the questions directly with accuracy close to Forced mode.
  • Workflow analysis shows how training changes structure and the use of intermediate results.

  • Stage 1 trains on 2,257 first-turn demos from HotpotQA and BrowseComp.
  • Stage 2 continues on 712 demos from the Stage 1 set.
  • 449 come from HotpotQA and 263 from BrowseComp.
  • Both stages run for two epochs with a smaller learning rate in Stage 2.
  • There is no separate validation split.
  • Training uses ms-swift with 4-bit NF4 QLoRA, double quantization, BF16 and gradient checkpointing.
  • The Qwen3.5-27B backbone has about 27 billion parameters.
  • Of these, 116,727,808 are trainable in this setup.
  • Each stage runs on two NVIDIA H100 80GB GPUs.
  • Stage 1 and Stage 2 take about 52 and 17 GPU-hours, about 69 in total.
  • That covers fine-tuning only, not teacher generation, evaluation or judging.

Benchmarks, models and baselines

  • The 688 questions are 30 each from AIME 2024, 2025 and 2026.
  • They add 200 from PolyMATH, 198 from GPQA-Diamond and 200 from HotpotQA.
  • AIME needs integer answers. PolyMATH has multilingual free-form answers.
  • GPQA-Diamond is multiple choice. HotpotQA needs evidence across retrieval steps.
  • The main agent and all sub-agents use Qwen3.5-27B with thinking on.
  • AFlow uses the released MATH workflow on AIME and PolyMATH.
  • It uses the released HotpotQA workflow on HotpotQA and GPQA-Diamond.

  • The main agent passes a JavaScript program to the Workflow tool.
  • Programs define sub-agent instructions and pass outputs through ordinary code.
  • The interface offers agent for sub-agent calls and parallel for concurrent calls.
  • It offers pipeline for dependent stages over many items and phase for stage labels.
  • A sub-agent gets only what the program names.
  • It does not inherit the main agent's history.
  • Calls can ask for structured output through a JSON schema.
  • The tool returns the program result and execution information.
  • The main agent uses them to revise the workflow or answer.

ParameterStage 1Stage 2
Training examples2,257712
Learning rate5 × 10−51 × 10−5
Epochs22
LoRA rank / alpha / dropout16 / 32 / 016 / 32 / 0
OptimizerFused AdamWFused AdamW
Schedule / warmup ratioCosine / 0.05Cosine / 0.05
Effective batch size44
Max sequence length67,58467,584
Random seed4242

Table 3: training configuration

Only the main agent is updated. Shared values apply to both stages.

Decoding

  • Thinking is on for the main agent and sub-agents.
  • Main agent: context length 131,072 and max output 81,920 tokens.
  • Sampling: temperature 1.0, top-p 0.95, top-k 20.
  • Presence penalty is 1.5 and the seed is 42.
  • Sub-agents: max output 65,536 tokens.
  • Token limits apply to single responses, not to workflow stages.

Answer scoring

  • The answer comes from the main agent's FINAL ANSWER line.
  • Mid reasoning and sub-agent outputs do not stand in for a missing answer.
  • Runs without a valid answer count as wrong.
  • AIME answers match as integers after dropping leading zeros.
  • GPQA-Diamond answers match option labels.
  • PolyMATH allows exact mathematical equivalence.
  • HotpotQA accepts answers that name the reference entity or relation, with aliases.
  • Approximate decimals do not count as exact when no precision is set.

Workflow quality, structure and roles

  • The judge deepseek-flash scores Forced-mode programs with thinking on and temperature 0.
  • It sees the question and program but not the execution results.
  • Scores are 0 for a major defect and 1 for a minor weakness.
  • A score of 2 means no defect.
  • Where no dependencies are needed, continuity and flow ratings map to 2.
  • Ratings with too little evidence are left out.
  • Table 5 defines six structure dimensions of the programs.
  • They are execution structure, role specialization, dependency pattern, output reuse, aggregation strategy and agent count.
  • Roles use five groups: Verifier, Aggregator, Interpreter, Researcher and Solver.
  • Keywords in node labels set the group, with phase names as a fallback.
  • Unmatched nodes are Other.

  • The selection judge is deepseek-flash with thinking on, high reasoning effort and temperature 0.
  • It gets the question, the first-turn program and any launch arguments.
  • It does not see the agent's reasoning, final answer, reference answer or execution results.
  • The rubric checks premise injection, verification defects and information-flow defects.
  • The judge cites excerpts for each defect.
  • The authors check those excerpts against the text.
  • From 2,257 workflow demos, 712 complete first-turn examples remain for Stage 2.

  • Figure 7 shows short versions of the Direct, Dynamic and Forced prompts.
  • Direct says to solve with no task-solving tool calls.
  • Forced says to call Workflow before any real solving, even if the model could answer.
  • Forced limits the main agent to plan, launch, monitor, revise, assess and summarize.
  • A done status is not enough if needed subtasks gave no result.
  • Dynamic says to pick DIRECT or WORKFLOW before any real solving.
  • If tools are needed later, switch to WORKFLOW first.
  • All modes end with a FINAL ANSWER line.
  • The Workflow tool takes a script or a stored script path, with optional args.
  • Each script starts with a meta object holding a name and description.
  • The primitives are agent, parallel, pipeline, phase and args.
  • The main agent must not repeat the workflow's solving.
  • If results are incomplete, unsure or contradicted, it revises or reruns the workflow.

Agent and modeAIME24AIME25AIME26
Base, Direct93.3393.3393.33
Base, Dynamic63.3363.3373.33
Base, Forced76.6770.0070.00
Stage 1, Direct93.3396.6790.00
Stage 1, Dynamic96.67100.0093.33
Stage 1, Forced96.6796.67100.00
DynaFlow, Direct93.3390.0090.00
DynaFlow, Dynamic93.33100.0096.67
DynaFlow, Forced100.00100.00100.00

Table 6: accuracy (%) by training stage and execution mode, math sets

Agent and modePolyMATHGPQA-DHotpotQA
Base, Direct74.0083.3347.50
Base, Dynamic64.0077.7853.00
Base, Forced70.0077.7881.50
Stage 1, Direct87.5087.8847.50
Stage 1, Dynamic88.5082.8376.50
Stage 1, Forced84.5084.3482.00
DynaFlow, Direct87.0086.8751.50
DynaFlow, Dynamic91.5083.8484.50
DynaFlow, Forced90.5084.8583.50

Table 6 (continued): other sets and overall

Overall: Base 71.51, 65.12, 75.87. Stage 1 76.74, 84.45, 85.47. DynaFlow 77.18, 87.94, 88.08.

DimensionCategories
Execution structureCode only, single agent, serial, parallel, hybrid
Role specializationNone, homogeneous, complementary, mixed
Dependency patternNone, chain, fan-out, fan-in, multi-stage
Output reuseNone, passed, consumed
Aggregation strategyNone, concatenation, selection, voting, comparison, synthesis, correction or refinement, mixed
Agent count0, 1, 2, 3, 4 and 5+ agent reasoning nodes

Table 5: workflow structure dimensions

Consumed means the next agent must use, analyze, compare, refine, critique or transform the upstream output.

  • The authors compare Base and DynaFlow workflows in Forced mode with fixed sub-agents.
  • Complementary computation (AIME 2026, palindromes).
  • Base uses one solver and returns 59 after an arithmetic slip.
  • DynaFlow runs enumeration, dynamic programming and inclusion-exclusion in parallel.
  • A verifier compares and recomputes. All three solvers and the verifier get 62.
  • Research evidence (GPQA-Diamond, reaction product).
  • Base runs two analyses in order and passes nothing between them.
  • DynaFlow runs four research calls on separate chemical constraints and checks candidate products.
  • The decision agent sees the research evidence and the verification results.
  • Entity then retrieval (HotpotQA). Base searches for investment firms and founding years.
  • DynaFlow uses three search routes, then deduplicates and ranks candidate entities.
  • It passes names, quotes and sources to candidate-specific resolvers and checks the pick.
  • Stages, audits and repair (AIME 2025, geometry).
  • Base checks a given derivation and returns fixed numbers.
  • DynaFlow links geometric construction, parallel optimization, expression fitting and independent audits.
  • Audit findings decide if a repair step runs.

  • This appendix expands Section 2 on multi-agent collaboration, efficiency and reliable information flow.
  • It places DynaFlow among earlier methods.
  • The main text already states the key contrast.
  • DynaFlow joins free-form workflow actions to the task-solving policy and trains only that policy.
  • It picks training demos for orchestration quality.

Coverage note

  • This page covers the main body in full.
  • Appendix tables, prompts and extra related work are summarized, not copied.

Words to know

  • Workflow: A plan of model and tool calls, with order and data links.

Share this paper

LinkedIn (opens in a new tab)X (opens in a new tab)WhatsApp (opens in a new tab)EmailDownload PDFExplainer + original paper (PDF), 1.7 MB

Ask AI about this paper

Stuck on a word or an idea? Ask in plain words. The answer comes from the write-up on this page.

Read the original paper on arXiv: DynaFlow: Learning Free-Form Multi-Agent Orchestration (opens in a new tab)

Jump to

One paper a week, in plain English

Every Monday: the new AI papers worth your time. Short lines, the key number, and what to do with it.

One email a week. Unsubscribe with one click. No spam.