Skip to content


面向查询特定多智能体工作流的难度感知智能体编排

Abstract

Large Language Model (LLM)-based agentic systems have shown strong capabilities across various tasks. However, existing multi-agent frameworks often rely on static or task-level workflows, which either over-process simple queries or underperform on complex ones, while also neglecting the efficiency-performance trade-offs across heterogeneous LLMs. To address these limitations, we propose Difficulty-Aware Agentic Orchestration (DAAO), which can dynamically generate query-specific multi-agent workflows guided by predicted query difficulty. DAAO comprises three interdependent modules: a variational autoencoder (VAE) for difficulty estimation, a modular operator allocator, and a cost- and performance-aware LLM router. A self-adjusting policy updates difficulty estimates based on workflow success, enabling simpler workflows for easy queries and more complex strategies for harder ones. Experiments on six benchmarks demonstrate that DAAO surpasses prior multi-agent systems in both accuracy and inference efficiency, validating its effectiveness for adaptive, difficulty-aware reasoning.

基于大语言模型(LLM)的智能体系统已在多种任务上展现出强大能力。 然而,现有多智能体框架通常依赖静态工作流或任务级工作流,它们要么对简单查询进行过度处理,要么在复杂查询上表现不佳,同时还忽视了异构 LLM 之间的效率与性能权衡。 为解决这些局限,我们提出难度感知智能体编排(Difficulty-Aware Agentic Orchestration,DAAO),它能够在预测查询难度的引导下,动态生成查询特定的多智能体工作流。 DAAO 包含三个相互依赖的模块:用于难度估计的变分自编码器(VAE)、模块化算子分配器,以及兼顾成本与性能的 LLM 路由器。 自调整策略根据工作流是否成功更新难度估计,从而为简单查询启用更简单的工作流,并为较难查询采用更复杂的策略。 六个基准上的实验表明,DAAO 在准确率和推理效率方面均超越了先前的多智能体系统,验证了它在自适应难度感知推理方面的有效性。

Overall framework of DAAO
图1:DAAO 的整体框架。

1. Introduction

Large Language Model (LLM)-based agents have exhibited remarkable capabilities across a wide spectrum of tasks, including question answering, data analysis, decision-making, code generation and web navigation. Building upon the success of single agents, recent advancements reveal that organizing multiple LLM-based agents into structured agentic workflows can significantly enhance task performance. In such workflows, agents can interact either cooperatively or competitively depending on the task context. These multi-agent systems can overcome the cognitive and functional limitations of individual models, thereby exhibiting collective intelligence similar to human collaboration in a society of agents.

基于大语言模型(LLM)的智能体已在广泛任务中展现出卓越能力,包括问答、数据分析、决策、代码生成和网页导航。 在单智能体成功的基础上,近期进展表明,将多个基于 LLM 的智能体组织成结构化智能体工作流,可以显著提升任务性能。 在这类工作流中,智能体可以根据任务情境进行协作或竞争。 这些多智能体系统能够克服单个模型在认知和功能上的局限,从而展现出类似于智能体社会中人类协作的集体智能。

In recent years, the research community has focused on automating multi-agent system design. For instance, DsPy and EvoPrompting automate prompt optimization, GPTSwarm optimizing inter-agent communication, and EvoAgent self-evolving agent profiling. However, these systems are often constrained by limited search spaces and rigid representation paradigms, resulting in marginal performance gains and limited adaptability to diverse task requirements. Subsequently, ADAS and AFlow employ code as representation for workflow, facilitating robust and flexible workflow searches through different paradigms, with ADAS utilizing heuristic search and AFlow adopting Monte Carlo tree search. MaAS proposes an agentic supernet to generate a query-specific multi-agent system for each user query.

近年来,研究界开始聚焦于多智能体系统设计的自动化。 例如,DsPy 和 EvoPrompting 自动优化提示,GPTSwarm 优化智能体间通信,而 EvoAgent 让智能体画像实现自演化。 然而,这些系统往往受限于狭窄的搜索空间和僵化的表示范式,因此性能增益有限,对多样化任务需求的适应能力也不足。 随后,ADAS 和 AFlow 使用代码表示工作流,并通过不同范式实现稳健而灵活的工作流搜索,其中 ADAS 使用启发式搜索,AFlow 采用蒙特卡洛树搜索。 MaAS 提出智能体超网,为每个用户查询生成查询特定的多智能体系统。

How to dynamically generate a workflow given a query remains a key challenge in current research. Task-level workflows are typically built as uniform multi-agent systems for entire task categories, achieving strong metrics like accuracy and pass@k but relying on heavy pipelines with excessive LLM calls and tool usage. This design over-processes simple queries, wasting resources and overlooking factors like token cost and latency. Query-level workflows introduce input-specific adaptation, but their granularity is often insufficient, leading to suboptimal or oversimplified workflows for difficult inputs. For instance, when a user requests a travel guide for a specific location, a workflow that only retrieves and summarizes information often falls short of meeting the user’s needs. These limitations motivate a difficulty-adaptive framework that dynamically balances complexity and cost.

给定查询后如何动态生成工作流,仍是当前研究的一项关键挑战。 任务级工作流通常为整个任务类别构建统一的多智能体系统,虽然能在准确率和 pass@k 等指标上取得较好结果,却依赖包含大量 LLM 调用和工具使用的重型流水线。 这种设计会对简单查询进行过度处理,浪费资源,并忽视 token 成本和延迟等因素。 查询级工作流引入了针对输入的自适应,但其粒度往往仍然不足,导致困难输入所用的工作流不够理想或过于简化。 例如,当用户请求某个特定地点的旅行指南时,只进行信息检索和总结的工作流往往无法充分满足用户需求。 这些局限促使我们构建一种能够动态权衡复杂度与成本的难度自适应框架。

To address the above challenges, we propose Difficulty-Aware Agentic Orchestration (DAAO), which can intelligently generate workflows according to the characteristics of each query. DAAO has three core capabilities:

  • (1) Learning to capture the difficulty of each query from posterior knowledge, without relying on manual labels;
  • (2) Dynamically creating workflows that match the predicted difficulty of each query;
  • (3) Assigning LLMs to workflow components to maximize the reasoning ability of the Multi-agent system.

为解决上述挑战,我们提出难度感知智能体编排(DAAO),它能够根据每个查询的特征智能生成工作流。 DAAO 具备三项核心能力:

  • (1) 从后验知识中学习捕获每个查询的难度,而不依赖人工标签;
  • (2) 动态创建与每个查询预测难度相匹配的工作流;
  • (3) 为工作流组件分配 LLM,以最大化多智能体系统的推理能力。

Technically, we define query difficulty as a learnable policy. Unlike previous methods, LLMs have little knowledge about workflow generation, and manually creating query-workflow pairs requires much human effort, which goes against automatic workflow generation. To address this, We use a reward-like mechanism to update the policy. When a workflow successfully solves a query, we slightly lower its predicted difficulty, allowing future workflows to be simpler. If a workflow fails, we increase the predicted difficulty to encourage more complex and capable workflows.

在技术上,我们把查询难度定义为一种可学习策略。 与以往方法不同,LLM 对工作流生成知之甚少,而人工创建查询—工作流配对需要大量人力,这与自动生成工作流的目标相悖。 为此,我们使用一种类似奖励的机制更新策略。 当某个工作流成功解决查询时,我们会略微降低其预测难度,使未来的工作流可以更简单。 如果工作流失败,我们则提高预测难度,以鼓励生成更复杂、能力更强的工作流。

In addition, we model multi-agent workflow generation on the agentic net, a probabilistic, continuous agentic architecture distribution that encompasses a vast number of possible multi-agent candidates. To enhance efficiency and adaptability, we incorporate a cost- and performance-aware LLM router that dynamically assigns heterogeneous models to different operators according to query difficulty and resource constraints. During training, a controller network samples multi-agent architectures conditioned on the input query and updates its policy through feedback signals. During inference, for different queries, DAAO samples a suitable multi-agent system delivering satisfactory resolution and appropriate inference resources.

此外,我们在智能体网络上对多智能体工作流生成进行建模;智能体网络是一种概率化、连续的智能体架构分布,涵盖大量可能的多智能体候选方案。 为了提高效率和适应性,我们引入兼顾成本与性能的 LLM 路由器,根据查询难度和资源约束,动态地把异构模型分配给不同算子。 训练期间,控制器网络以输入查询为条件采样多智能体架构,并通过反馈信号更新其策略。 推理期间,DAAO 针对不同查询采样适合的多智能体系统,在提供令人满意的解答质量的同时使用适当的推理资源。

Our key contributions are as follows:

  • Query-Level Difficulty Estimation for Workflow Adaptation. We propose generating adaptive workflow strategies guided by query difficulty. The framework learns to represent the latent difficulty space of queries, leveraging workflow feedback to adjust the strategies.
  • Dynamic Workflow Generation. We propose DAAO, a difficulty-aware framework that dynamically generates workflows and realizes LLM heterogeneity based on query difficulty, domain, and features, while achieving performance-cost balance.
  • Experimental Validation. We conduct comprehensive evaluations on six widely adopted benchmarks, covering diverse use cases in code generation (HumanEval, MBPP), mathematical reasoning (GSM8K, MATH), knowledge and reasoning understanding (MMLU) and diverse tool usage (GAIA). Empirical results demonstrate that DAAO is (1) highly performing, surpassing existing automated orchestration methods by 3.5%15.2% and recent LLM routing methods by 3.2%10.2%; (2) economical, outperforming the SOTA baseline MasRouter on the MATH benchmark with 65% of the training cost and 41% of the inference cost; (3) inductive, demonstrating strong generalization to unseen LLM backbones and transferability across diverse datasets.

我们的主要贡献如下:

  • 用于工作流自适应的查询级难度估计。 我们提出由查询难度引导生成自适应工作流策略。该框架学习表示查询的潜在难度空间,并利用工作流反馈调整策略。
  • 动态工作流生成。 我们提出 DAAO,这是一种难度感知框架,它根据查询难度、领域和特征动态生成工作流并实现 LLM 异构协作,同时兼顾性能与成本。
  • 实验验证。 我们在六个广泛采用的基准上开展综合评测,覆盖代码生成(HumanEval、MBPP)、数学推理(GSM8K、MATH)、知识与推理理解(MMLU)以及多样化工具使用(GAIA)等应用场景。实验结果表明,DAAO (1) 性能出色,比现有自动编排方法高出 3.5%15.2%,比近期 LLM 路由方法高出 3.2%10.2%(2) 经济高效,在 MATH 基准上仅使用 65% 的训练成本和 41% 的推理成本便超越 SOTA 基线 MasRouter;(3) 具备归纳能力,对未见过的 LLM 骨干展现出强泛化性,并能在不同数据集之间迁移。

Automated Agentic Workflows

The development of agentic workflows has evolved from manual configurations to automated systems, with the latter offering improved adaptability and task performance. Early approaches to automation focus on optimizing prompt structures and inter-agent communication protocols, thereby enhancing the robustness of workflows across a variety of tasks. More recent systems, such as ADAS and AFlow, leverage code-based representations to enable real-time structural adaptation and communication strategy refinement based on environmental feedback. MaAS further introduces query-specific multi-agent composition using a supernet-like architecture.

智能体工作流已从手工配置发展到自动化系统,后者提供了更好的适应性和任务性能。 早期自动化方法侧重于优化提示结构和智能体间通信协议,从而增强工作流在多种任务上的稳健性。 较新的 ADAS 和 AFlow 等系统采用基于代码的表示,根据环境反馈实现实时结构自适应和通信策略改进。 MaAS 进一步使用类似超网的架构,引入查询特定的多智能体组合。

Despite these advances, current frameworks still face two major limitations. First, most multi-agent frameworks remain LLM-homogeneous, relying on a single backbone model (e.g., GPT-4o-mini) for all agents and thus missing the benefits of heterogeneous collaboration across models. Second, they lack complexity diversity: most systems adopt uniformly complex workflows optimized for accuracy, ignoring that real-world queries vary widely in difficulty.

尽管取得了这些进展,当前框架仍面临两项主要局限。 首先,大多数多智能体框架仍然是 LLM 同构的,所有智能体都依赖单一骨干模型(例如 GPT-4o-mini),因而无法获得跨模型异构协作的收益。 其次,它们缺少复杂度多样性:大多数系统采用为准确率优化的统一复杂工作流,却忽视了现实查询在难度上的巨大差异。

Difficulty-Aware Reasoning

Recent advances in the reasoning domain of large language models increasingly emphasize difficulty-aware mechanisms to address the limitations of uniform reward signals across heterogeneous tasks, particularly in mathematical reasoning where problem complexity varies widely. These methods dynamically adjust learning objectives based on task difficulty estimates, prioritizing deeper exploration for challenging problems while promoting efficiency on simpler ones. However, the model itself lacks intrinsic knowledge of the difficulty of multi-agent workflows, making it unable to align the difficulty of queries with that of multi-agent workflows. To address this, we propose incorporating difficulty awareness into automatic workflow generation, resolving the perception of workflow difficulty for queries and enhancing workflow adaptability.

大语言模型推理领域的近期进展越来越重视难度感知机制,以解决异构任务使用统一奖励信号的局限,尤其是在问题复杂度差异很大的数学推理中。 这些方法根据任务难度估计动态调整学习目标,对困难问题优先开展更深入的探索,同时提高简单问题的处理效率。 然而,模型本身缺乏关于多智能体工作流难度的内在知识,因此无法把查询难度与多智能体工作流难度对齐。 为此,我们提出把难度感知融入自动工作流生成,解决查询对工作流难度的感知问题,并增强工作流适应性。

3. Methodology

3.1 Overview

Figure 1 illustrates our Difficulty-Aware Agentic Orchestration (DAAO), which generates query-specific agentic workflows across domains and difficulty levels. Our key contribution is a standalone query difficulty estimator Nθd that provides an explicit, calibrated difficulty signal for each input. Unlike prior controller networks that score architectures without reliably assessing the query’s difficulty, Nθd—instantiated as a variational autoencoder (VAE) with a learned difficulty head—encodes the query into a latent representation z and outputs a scalar difficulty d(0,1). This difficulty estimate conditions (i) a layered operator allocator Nθo that selects an appropriate subset of agentic operators and workflow depth, and (ii) a cost-aware LLM router Nθm that assigns backbone models by balancing reasoning needs with computational budget. The three modules together yield a customized multi-stage workflow per query. After execution, we evaluate the output quality and use the success signal to update Nθd and refine Nθo / Nθm, enabling continual improvement while keeping difficulty estimation central to workflow construction.

图1展示了我们的难度感知智能体编排(DAAO),它能够跨领域和难度级别生成查询特定的智能体工作流。 我们的关键贡献是一个独立的查询难度估计器 Nθd,它为每个输入提供明确且经过校准的难度信号。 以往控制器网络只对架构评分,却不能可靠评估查询难度;与之不同,Nθd 由带可学习难度头的变分自编码器(VAE)实现,它把查询编码为潜在表示 z,并输出标量难度 d(0,1) 这一难度估计同时调节:(i) 分层的算子分配器 Nθo,用于选择适当的智能体算子子集和工作流深度;(ii) 成本感知 LLM 路由器 Nθm,通过权衡推理需求与计算预算来分配骨干模型。 三个模块共同为每个查询生成定制的多阶段工作流。 执行后,我们评估输出质量,并使用成功信号更新 Nθd、改进 Nθo / Nθm,从而持续提升系统,同时保持难度估计在工作流构建中的核心地位。

3.2 Preliminary

Agentic operator and workflow. This section formalizes the search space for difficulty-aware agentic workflow generation and the cost--utility objective optimized by our policy. Let M be the set of available large language models (LLMs) and S the set of collaboration protocols (e.g., Chain of Thought, Debate, Ensemble). The catalog of feasible operators is the subset OM×S. An agentic operator is a pair of one model and one protocol:

智能体算子与工作流。 本节形式化难度感知智能体工作流生成的搜索空间,以及由我们的策略优化的成本—效用目标。 M 为可用大语言模型(LLM)的集合,S 为协作协议(例如思维链、辩论和集成)的集合。 可行算子目录是子集 OM×S 一个智能体算子由一个模型和一种协议组成:

O={M,S},MM,SS,OO.

For example, {Qwen2-72B,Chain-of-Thought} denotes step-by-step reasoning on Qwen2-70B, whereas {GPT-4o-mini,Debate} configures turn-based multi-agent debate. An agentic workflow can be described as a Directed Acyclic Graph (DAG):

例如,{Qwen2-72B,Chain-of-Thought} 表示在 Qwen2-70B 上进行逐步推理,而 {GPT-4o-mini,Debate} 配置的是轮流发言的多智能体辩论。 智能体工作流可以描述为有向无环图(DAG):

G={V,E},VO,EV×V.

Here V collects instantiated operators (nodes) and E encodes directed dependencies (edges). We endow each workflow with a topological layering V=l=1LVl and restrict edges to go from earlier to later layers; i.e., if uVl and vVl, then l>l.

其中,V 收集实例化算子(节点),E 编码有向依赖关系(边)。 我们为每个工作流赋予拓扑分层 V=l=1LVl,并限制边只能从较早层指向较晚层;也就是说,如果 uVlvVl,则 l>l

Layered Policy. We define the layered selection policy of DAAO over the operator library O as

分层策略。 我们把 DAAO 在算子库 O 上的分层选择策略定义为

A={{πl(O)}OO}l=1L,πl(O)=P(OQ,z),OO.

Here z is the latent embedding produced by our difficulty estimator encoded from the input query Q and adaptively adjusted across layers l=1:L. In other words, z=fϕ(Q,H1:l1) is a learned state summary that encodes the query and the preceding layer-wise history H1:l1={Ak}k=1l1 of active operator sets (AkO). The policy induces a joint distribution over multi-layer operator configurations:

其中,z 是难度估计器根据输入查询 Q 编码得到的潜在嵌入,并在 l=1:L 各层之间自适应调整。 换言之,z=fϕ(Q,H1:l1) 是一个可学习的状态摘要,它编码查询以及先前各层活动算子集合的历史 H1:l1={Ak}k=1l1AkO)。 该策略在多层算子配置上诱导出联合分布:

P(GQ)=l=1LOO(πl(OQ,z))I[OAl].

Here G={V,E} is the DAG defined above, and the node set is the union of layerwise active sets, respecting the topological layering.

其中,G={V,E} 是上文定义的 DAG,节点集合是各层活动集合的并集,并遵循拓扑分层。

Optimization Objective. Given a benchmark dataset D containing queries Q and their oracle answers a, the objective of DAAO is to learn a query-conditioned policy that balances task utility and inference cost:

优化目标。 给定包含查询 Q 及其标准答案 a 的基准数据集 DDAAO 的目标是学习一种以查询为条件、能够权衡任务效用与推理成本的策略:

maxP(GQ)E(Q,a)DGP(GQ)[U(G;Q,a)λC(G;Q)],s.t.λ0.

Here P(GQ) is a distribution over query-specific workflows, U() and C() denote the utility (e.g., accuracy) and cost (e.g., token usage, latency) of executing workflow G on query Q, respectively, and λ is a trade-off coefficient that balances performance and cost. The outer expectation is taken over the (empirical) data distribution of queries and answers, while the inner expectation marginalizes the stochastic workflow GP(Q).

其中,P(GQ) 是查询特定工作流上的分布,U()C() 分别表示在查询 Q 上执行工作流 G 的效用(例如准确率)与成本(例如 token 用量、延迟),λ 是平衡性能与成本的权衡系数。 外层期望取自查询和答案的经验数据分布,内层期望则边缘化随机工作流 GP(Q)

3.3 Difficulty-Aware Agent Orchestration

Given a query Q, our DAAO builds a query-specific workflow by three difficulty-conditioned decisions produced by NθL (workflow depths), Nθo (operator allocation), and Nθm (LLM selection).

给定查询 Q,我们的 DAAO 通过由 NθL(工作流深度)、Nθo(算子分配)和 Nθm(LLM 选择)生成的三个难度条件决策,构建查询特定的工作流。

Difficulty-conditioned decisions. Each decision is a probability distribution whose logits are instantiated by the corresponding module and conditioned on the latent difficulty embedding z:

难度条件决策。 每个决策都是一个概率分布,其 logits 由相应模块实例化,并以潜在难度嵌入 z 为条件:

π(L)(LQ,z)workflow depth (NθL),πl(O)(OQ,l,z)operator allocation (Nθo),π(M)(MQ,O,z)model selection (Nθm).

Here z is produced by our proposed difficulty estimator Nθd, and a calibrated scalar d is decoded from z (more details in Section 3.4.) In practice, z parameterizes the logits of NθL/Nθo/Nθm, while d serves as a scalar hardness prior used for thresholding and capacity scaling. Higher d encourages larger-capacity workflows (e.g., more layers or activating more operators), whereas lower d promotes conservative workflows.

这里,z 由我们提出的难度估计器 Nθd 生成,并从 z 解码出经过校准的标量 d(更多细节见第 3.4 节)。 在实践中,z 参数化 NθL/Nθo/Nθm 的 logits,而 d 则作为用于阈值判断和容量缩放的标量难度先验。 较高的 d 会鼓励容量更大的工作流(例如更多层或激活更多算子),较低的 d 则会促使工作流采取更保守的配置。

3.4 Query Difficulty Estimator

To make workflow generation difficulty-aware and balance performance vs. cost per query, we propose a difficulty estimator that guides the subsequent modules. The difficulty estimator Nθd maps the input query Q to a k-dimensional latent difficulty representation zRk by using a variational autoencoder. To encode a given query Q, a lightweight embedding layer Eϕ produces a query embedding:

为了使工作流生成具备难度感知能力,并针对每个查询平衡性能与成本,我们提出一个用于指导后续模块的难度估计器。 难度估计器 Nθd 使用变分自编码器,将输入查询 Q 映射为 k 维潜在难度表示 zRk 为了编码给定查询 Q,轻量级嵌入层 Eϕ 生成查询嵌入:

x=Eϕ(Q)Rh.

where h is the embedding dimension (e.g., h=384). We then model a Gaussian posterior for the latent difficulty with diagonal covariance, which captures per-dimension uncertainty while remaining stable and efficient to train:

其中,h 是嵌入维度(例如 h=384)。 随后,我们使用对角协方差为潜在难度建模高斯后验,在保持训练稳定且高效的同时捕获各维度的不确定性:

μ(x)=Wμx+bμRk,logσ2(x)=Wσx+bσRk.

with layer weights Wμ,WσRk×h and bias bμ,bσRk, yielding the variational posterior (approximate posterior) over the latent difficulty z given the query embedding x:

其中层权重 Wμ,WσRk×h,偏置 bμ,bσRk,由此得到给定查询嵌入 x 时潜在难度 z 的变分后验(近似后验):

q(zx)=N(μ(x),diag(σ2(x))).

We sample z using the reparameterization:

我们使用重参数化对 z 进行采样:

z=μ(x)+σ(x)ε,εN(0,Ik).

where denotes elementwise multiplication. All stochastic nodes are reparameterized; gradients are taken w.r.t. μ, σ via the pathwise estimator. The latent zRk provides a rich difficulty embedding for downstream policies (depth, operator allocation, model selection), while we also decode an interpretable scalar difficulty d(0,1) as task difficulty. Concretely, a one-hidden-layer MLP maps z to d:

其中, 表示逐元素乘法。 所有随机节点均经过重参数化;梯度通过路径估计器对 μσ 求取。 潜变量 zRk 为下游策略(深度、算子分配、模型选择)提供丰富的难度嵌入,同时我们还将可解释的标量难度 d(0,1) 解码为任务难度。 具体而言,一个单隐藏层 MLP 将 z 映射到 d

d=sigmoid(WoReLU(Whz+bh)+bo)(0,1).

where WhRm×k, bhRm×1, WoR1×m and boR are the weights and biases of the hidden and output layers, respectively.

其中,WhRm×kbhRm×1WoR1×mboR 分别是隐藏层与输出层的权重和偏置。

We train our difficulty estimator Nθd with a difficulty-guided objective that aligns the decoded difficulty d with the observed outcome y{0,1} (solved y=1, not solved y=0), while regularizing the latent embedding z:

我们使用难度引导目标训练难度估计器 Nθd,在正则化潜在嵌入 z 的同时,使解码难度 d 与观测结果 y{0,1}(已解决时 y=1,未解决时 y=0)对齐:

Ldiff=Lcal(d,y)+λDKL(q(zx)p(z)),p(z)=N(0,I).

where, the KL term keeps the approximate posterior q(z|x) close to the standard normal prior p(z), stabilizing the latent space. We adopt a binary cross-entropy (BCE) as the difficulty-calibration term. Since a higher d denotes a harder query (thus lower success probability), we calibrate the predicted success probability as p^succ=1d and set:

其中,KL 项使近似后验 q(z|x) 接近标准正态先验 p(z),从而稳定潜在空间。 我们采用二元交叉熵(BCE)作为难度校准项。 由于较高的 d 表示查询更难(因而成功概率更低),我们将预测成功概率校准为 p^succ=1d,并设:

Lcal(d,y)=BCE(p^succ,y)=ylog(1d)(1y)logd.

The coefficient λ>0 balances calibration and regularization.

系数 λ>0 用于平衡校准与正则化。

3.5 Agentic Operator Allocator

Given a query Q, this module constructs a directed acyclic workflow G={V,E} from a candidate operator pool OM×S, targeting difficulty-aware orchestration that balances performance and cost.

给定查询 Q,该模块从候选算子池 OM×S 构建有向无环工作流 G={V,E},目标是实现能够平衡性能与成本的难度感知编排。

Depth adaptation. Let Lmax denote the maximum depth. We set

深度自适应。Lmax 表示最大深度。 我们设

L=max{1,dLmax},

so that easier queries yield shallower graphs while harder ones trigger deeper chains.

从而使较容易的查询生成较浅的图,而较困难的查询触发更深的链。

Layer-wise MoE selection. We select operators layer by layer using a lightweight MoE gate and factorize the joint selection over layers as an autoregressive process:

逐层 MoE 选择。 我们使用轻量级 MoE 门控逐层选择算子,并将跨层联合选择分解为自回归过程:

Nθo(GQ,z,O)=l=1Lπl(O)(VlQ,z,V<l),V<l:={V1,,Vl1}.

Here, V<l:={V1,,Vl1} denotes the history (all previously chosen operator sets), and πl() is the layer-l Mixture-of-Experts (MoE) policy that outputs a subset Vl. This factorization means “choose the current layer conditioned on all previous choices V<l, enabling difficulty-aware z, query context-dependent Q routing.”

这里,V<l:={V1,,Vl1} 表示历史(此前选择的所有算子集合),πl() 是输出子集 Vl 的第 l 层混合专家(MoE)策略。 这种分解表示“以此前所有选择 V<l 为条件选择当前层,从而实现难度感知的 z 与依赖查询上下文的 Q 路由。”

Scoring-to-selection with adaptive width. We instantiate πl(O) so that each layer’s width (number of operators) adapts to the available evidence. First, we translate the query difficulty context and the history into scalar compatibilities for all candidates:

从评分到自适应宽度选择。 我们实例化 πl(O),使每层宽度(算子数量)能够适应可用证据。 首先,我们将查询难度上下文与历史转换为所有候选项的标量相容性:

Si=FFN(zv(Q)OV1v(O)OVl1v(O)),OiO.

where v() is a lightweight embedding (e.g MiniLM or Sentence-BERT) and denotes concatenation. Larger Si means i-th operator Oi is more compatible with the current layer, given the accumulated context.

其中,v() 是轻量级嵌入(例如 MiniLM 或 Sentence-BERT), 表示拼接。 在给定累积上下文的情况下,较大的 Si 表示第 i 个算子 Oi 与当前层更相容。

We then convert scores into a subset using a cumulative-threshold decoder. Let S=[S1,,S|O|], and S(1)S(2)S(|O|) be the scores in descending order. Using a preset threshold τ, we determine the number of operators as:

随后,我们使用累积阈值解码器将分数转换为子集。 S=[S1,,S|O|],并令 S(1)S(2)S(|O|) 为按降序排列的分数。 使用预设阈值 τ,我们按如下方式确定算子数量:

t=min{r{1,,|O|}:i=1rS(i)>τ}.

where r is the prefix length (the number of top-ranked operators considered). Operators are activated in descending score order (S(1)S(2)) and the activation proceeds sequentially until the cumulative evidence exceeds τ. This rule yields an adaptive layer width—higher aggregate confidence activates more operators; lower confidence activates fewer—while enforcing a budget-like constraint via τ. Together, the score and threshold equations provide a concrete instantiation of the per-layer policy.

其中,r 是前缀长度(纳入考虑的高排名算子数量)。 算子按分数降序(S(1)S(2))激活,并依次进行,直至累积证据超过 τ 该规则产生自适应层宽:较高的总体置信度激活更多算子,较低的置信度激活较少算子,同时通过 τ 强制执行类似预算的约束。 分数方程与阈值方程共同给出了逐层策略的具体实例。

3.6 LLM Router

Inspired by prior work, we leverage model heterogeneity rather than enforcing a single-LLM workflow. After operator selection, each chosen operator O(i) (for i=1,,t) is paired with an LLM from a candidate set. We model the per-operator routing as

受以往工作的启发,我们利用模型异构性,而不是强制采用单一 LLM 工作流。 完成算子选择后,每个选定算子 O(i)i=1,,t)都会与候选集合中的一个 LLM 配对。 我们将逐算子路由建模为

Nθm({M(i)}i=1tQ,z,{O(i)}i=1t)=i=1tπ(M)(M(i)Q,z,O(i)).

where π(M)(|Q,z,O(i)) is the layer-agnostic LLM policy for the i-th selected operator. For each selected operator, we define a temperature-scaled softmax over LLM candidates indexed by m{1,,NM}:

其中,π(M)(|Q,z,O(i)) 是第 i 个选定算子的层无关 LLM 策略。 对于每个选定算子,我们在以 m{1,,NM} 为索引的 LLM 候选项上定义温度缩放 softmax:

π(M)(M(i)=MmQ,z,O(i))=exp(h^(i),e^m/T)u=1NMexp(h^(i),e^u/T).h(i)=FFNcomb(FFNq(Q)WzzFFNo(O(i)))Rd.

where h(i) is the combined contextual embedding of the query, difficulty, and operator.

其中,h(i) 是查询、难度与算子的组合上下文嵌入。

em=FFNm(Mm)Rd.

em is the projected embedding of candidate LLM Mm and T is the temperature parameter controlling the sharpness of the distribution. The dot product , measures cosine similarity after the embeddings are normalized.

em 是候选 LLM Mm 的投影嵌入,T 是控制分布尖锐程度的温度参数。 嵌入归一化后,点积 , 衡量余弦相似度。

This routeing policy enables the system to route operators to diverse LLMs based on query difficulty and operator context, promoting specialized and adaptive reasoning across the workflow.

该路由策略使系统能够根据查询难度与算子上下文将算子路由到不同的 LLM,从而在整个工作流中促进专门化和自适应推理。

表1:不同基线提示策略、单智能体方法、自动智能体工作流与 LLM 路由方法的性能比较。粗体表示最佳结果,下划线表示次佳结果。LLM 池同时包含轻量级和高容量模型,以支持多样化路由策略。
MethodLLMMMLUGSM8KMATHHumanEvalMBPPAvg.
Vanillagpt-4o-mini77.8187.4546.2985.7172.2073.89
qwen-2-72b80.2285.4046.1064.6573.9070.05
gemini-1.5-flash80.0486.7648.0082.6173.0074.08
llama-3.1-70b79.0886.6845.3780.7568.2072.01
CoTgpt-4o-mini78.4387.1046.4086.6969.6073.64
gemini-1.5-flash81.3586.4748.0081.3773.0074.04
ComplexCoTgpt-4o-mini81.0586.8946.5387.5875.8075.57
gemini-1.5-flash80.7486.0148.2880.1271.8073.39
SC(CoT)gpt-4o-mini81.0587.5747.9187.5873.0075.42
gemini-1.5-flash81.6687.5048.7380.7572.0074.13
ADASgpt-4o-mini79.5486.1243.1884.1968.1372.23
gemini-1.5-flash79.6886.0045.8980.6968.0072.05
AFlowgpt-4o-mini83.1091.1651.8290.9381.6779.73
gemini-1.5-flash82.3590.4352.0085.6976.0077.29
MaASgpt-4o-mini83.0192.3051.8292.8582.1780.43
gemini-1.5-flash83.4292.0052.2590.5582.6980.18
PromptLLMLLM Pool78.4388.6852.3086.3373.6075.86
RouteLLMLLM Pool81.0489.0051.0083.8572.6075.50
MasRouterLLM Pool84.2592.0052.4290.6284.0080.66
OursLLM Pool84.9094.4055.3794.6586.9583.26

4. Experiments

4.1 Experiment Setup

Benchmarks. We evaluate DAAO on six public benchmarks covering three domains: (1) math reasoning, GSM8K and MATH; (2) code generation, HumanEval and MBPP; GAIA. Additionally, we include MMLU, a benchmark covering 57 academic subjects, to assess general knowledge and multitask language understanding. For the MATH benchmark, we follow prior work in selecting a harder subset (617 problems). The dataset metric are in the appendix.

基准。 我们在覆盖三个领域的六个公开基准上评估 DAAO:(1)数学推理,包括 GSM8K 和 MATH;(2)代码生成,包括 HumanEval 和 MBPP;以及 GAIA。 此外,我们还纳入覆盖 57 个学科的 MMLU 基准,以评估通用知识与多任务语言理解能力。 对于 MATH 基准,我们遵循以往工作,选择了一个难度更高的子集(617 道题)。 数据集指标见附录。

Baselines. We compare DAAO with three of agentic baselines: (1) single-agent approaches, including CoT, ComplexCoT, Self-Consistency; (2) autonomous agentic workflows, including ADAS, AFlow and MaAS. (3) LLM routers, PromptLLM, RouteLLM and MasRouter.

基线。 我们将 DAAO 与三类智能体基线进行比较:(1)单智能体方法,包括 CoT、ComplexCoT 和 Self-Consistency;(2)自主智能体工作流,包括 ADAS、AFlow 和 MaAS。 (3)LLM 路由器,包括 PromptLLM、RouteLLM 和 MasRouter。

LLM Backbones. We select LLM Pool with varying sizes and capacities, including gpt-4o-mini-0718, gemini-1.5-flash, llama-3.1-70b, Qwen-2-72b. LLMs are accessed via APIs, with the temperature set to 1. We selected gpt-4o-mini-0718 and gemini-1.5-flash, which performed well in Vanilla, as the models for other baselines.

LLM 骨干模型。 我们选择由不同规模和能力模型组成的 LLM 池,包括 gpt-4o-mini-0718、gemini-1.5-flash、llama-3.1-70b 和 Qwen-2-72b。 这些 LLM 通过 API 访问,温度设为 1。 我们选用在 Vanilla 中表现良好的 gpt-4o-mini-0718 和 gemini-1.5-flash 作为其他基线所使用的模型。

Implementation Details. Building upon established methodologies in workflow automation, we divide each dataset into training and test sets using a train:test ratio of 1:4. We initialize the feasible space of operator nodes with the following operators: CoT, LLM-Debate, Review, Ensemble, ReAct, Self-Consistency, Testing. Detailed instructions are in the appendix. We set the max number of layers as Lmax = 5, the cost penalty coefficient λ as λ{1e3,5e3,1e2}, the sampling times K = 4 and threshold τ = 0.3. To ensure robust results, we conducted each experiment three times and reported the average performance.

实现细节。 基于工作流自动化中的既有方法,我们按 1:4 的训练集与测试集比例划分每个数据集。 我们使用以下算子初始化算子节点的可行空间:CoT、LLM-Debate、Review、Ensemble、ReAct、Self-Consistency 和 Testing。 详细说明见附录。 我们将最大层数设为 Lmax = 5,将成本惩罚系数 λ 设为 λ{1e3,5e3,1e2},采样次数 K = 4,阈值 τ = 0.3。 为确保结果稳健,我们将每项实验运行三次并报告平均性能。

4.2 Performance Analysis

High-performing.

The experimental results in 表1 demonstrate that DAAO effectively constructs high-performing agentic workflows. Compared to existing automated orchestration methods, DAAO achieves an average accuracy improvement of 3.5%15.2%, and outperforms recent LLM routing methods by 3.2%10.2%. On the MATH benchmark, DAAO attains a best-in-class score of 55.37%, surpassing the second-best method, MasRouter, by 2.95%. Across five datasets, DAAO consistently outperforms all baselines, highlighting its versatility and robustness.

表1 的实验结果表明,DAAO 能够有效构建高性能智能体工作流。 与现有自动编排方法相比,DAAO 的平均准确率提升 3.5%15.2%,并比近期 LLM 路由方法高出 3.2%10.2% 在 MATH 基准上,DAAO 取得 55.37% 的最佳成绩,比次佳方法 MasRouter 高 2.95%。 在五个数据集上,DAAO 始终优于所有基线,体现出其通用性与稳健性。

tbl:daao-gaia further compares DAAO with existing automated systems on the GAIA benchmark—a challenging, high-complexity evaluation suite for multi-agent systems in realistic, multimodal, and tool-augmented settings. Unlike traditional benchmarks focused on static question answering or single-step reasoning, GAIA tasks require multi-step planning, cross-modal understanding, and tool interaction (e.g., web browsing, file system access). While AFlow uses a fixed workflow and MaAS does not fully exploit LLM specialization, DAAO dynamically generates query-specific workflows and allocates tasks to LLMs based on domain expertise. As a result, DAAO outperforms AFlow and MaAS by 17.97% and 8.33%, respectively, demonstrating its effectiveness in complex, real-world scenarios.

tbl:daao-gaia 进一步在 GAIA 基准上比较了 DAAO 与现有自动化系统;GAIA 是面向真实、多模态、工具增强场景中多智能体系统的高难度、高复杂度评估套件。 与聚焦静态问答或单步推理的传统基准不同,GAIA 任务要求多步规划、跨模态理解和工具交互(例如网页浏览和文件系统访问)。 AFlow 使用固定工作流,MaAS 未能充分利用 LLM 的专门能力,而 DAAO 动态生成查询特定工作流,并依据领域专长将任务分配给 LLM。 因此,DAAO 分别比 AFlow 和 MaAS 高出 17.97% 和 8.33%,证明了它在复杂真实场景中的有效性。

表2:GAIA 基准上的性能比较。结果涵盖三个难度级别,最后一列给出平均分;最佳结果以粗体表示。
MethodLevel 1Level 2Level 3Avg.
GPT-4o-mini7.534.4004.65
ADAS13.984.4006.69
AFlow10.758.814.088.00
MaAS20.4518.616.2517.64
Ours30.4224.008.5025.97
表3:MATH 基准上的训练、推理与总成本(美元),以及相应准确率。我们的方法成本最低且准确率最高。AFlow 和 MaAS 使用 GPT-4o-mini,其他方法使用 LLM 池。
MethodTrainingInferenceOverallAcc.
AFlow22.501.6624.1651.82
MaAS3.380.423.8051.82
MasRouter3.560.654.2152.42
Ours2.340.272.6155.37
Cost-effective.

We emphasize the cost-efficiency of our agentic automation framework across two key dimensions: training expenditure and inference overhead. We compare against AFlow and MaAS, where AFlow represents the state-of-the-art (SOTA) among task-level frameworks, and MaAS is the SOTA among query-level frameworks. As shown in 表3, AFlow incurs a substantial training cost of $22.50 and inference cost of $1.66, totaling $24.16. In contrast, our method significantly reduces these costs to $2.34 for training and $0.27 for inference—only 10.4% and 16.3% of AFlow's respective costs. MasRouter adopts a collaborative paradigm, assigning multiple LLMs to role-play in handling a query. However, it suffers from two drawbacks: (1) redundant participation of LLMs in each collaborative step, and (2) lack of adaptation for easy queries, leading to excessive cost without proportional performance gains. Notably, our method not only reduces cost but also achieves the highest accuracy of 55.37%, outperforming both AFlow and MaAS.

我们从训练开销与推理开销两个关键维度强调智能体自动化框架的成本效率。 我们与 AFlow 和 MaAS 进行比较,其中 AFlow 代表任务级框架中的当前最佳方法,MaAS 则是查询级框架中的当前最佳方法。 表3 所示,AFlow 的训练成本高达 22.50 美元,推理成本为 1.66 美元,总计 24.16 美元。 相比之下,我们的方法将训练成本显著降至 2.34 美元,将推理成本降至 0.27 美元,分别仅为 AFlow 相应成本的 10.4% 和 16.3%。 MasRouter 采用协作范式,为多个 LLM 分配角色来处理查询。 然而,它存在两个缺点:(1)每个协作步骤都有冗余 LLM 参与;(2)无法适应简单查询,因而产生过高成本,却没有相应的性能收益。 值得注意的是,我们的方法不仅降低了成本,还取得了最高的 55.37% 准确率,优于 AFlow 和 MaAS。

This cost-efficiency is attributed to two strategies: (1) Our difficulty-awareness strategy, which generates adaptive workflows for queries, employing simple workflows for easy queries while allocating more resources to the generation of workflows for more complex queries; (2) Our adaptive model selection strategy, which dynamically leverages more affordable models (such as LLaMA-3.1 or Qwen-2-72B) when sufficient, rather than defaulting to high-cost models like GPT-4o-mini.

这种成本效率来自两项策略:(1)我们的难度感知策略为查询生成自适应工作流,对简单查询采用简单工作流,同时为更复杂查询的工作流生成分配更多资源;(2)我们的自适应模型选择策略在能力足够时动态使用价格更低的模型(如 LLaMA-3.1 或 Qwen-2-72B),而不是默认使用 GPT-4o-mini 等高成本模型。

Workflows generated by DAAO for queries of different difficulty
图2:DAAO 生成的工作流可视化。颜色表示分配给每个算子的不同模型。

4.3 Case Study

As shown in 图2, DAAO generates different workflows for queries of varying difficulty. For simple queries, it produces streamlined workflows, sometimes using only a single operator. For medium or difficult queries, it constructs deeper and more complex workflows by exploring a broader combination of operators. This demonstrates DAAO’s difficulty-aware paradigm: selecting economical workflows for simple queries to enable rapid completion, while leveraging sophisticated workflows for complex queries to meet higher demands.

图2 所示,DAAO 会为不同难度的查询生成不同工作流。 对于简单查询,它生成精简工作流,有时仅使用一个算子。 对于中等或困难查询,它通过探索更广泛的算子组合来构建更深、更复杂的工作流。 这体现了 DAAO 的难度感知范式:为简单查询选择经济型工作流以快速完成任务,同时为复杂查询使用更精细的工作流来满足更高要求。

表4:跨领域优化性能。
Train onTest onPerf.
MATHMATH55.37
MATHGSM8K95.44
MATH+GSM8KMATH56.42
MATH+GSM8KGSM8K95.70
HumanEvalHumanEval94.65
HumanEvalMATH54.46
HumanEval+MATHHumanEval95.00
HumanEval+MATHMATH55.50

4.4 Inductive Ability Analysis

Cross-domain Optimization.

We present the performance results of our cross-domain training experiments (see 表4), evaluating the impact of multi-domain joint optimization on generalization. We observe that single-domain training achieves baseline performance on the MATH dataset, with strong transfer to GSM8K, primarily due to their shared mathematical reasoning requirements. Moreover, since MATH problems are generally more challenging than those in GSM8K, training on MATH equips the framework with advanced problem-solving skills that effectively generalize to the relatively simpler GSM8K. In contrast, we find that single-domain training on HumanEval yields high fidelity on code generation (94.65%) but limited transfer to MATH (54.46%), underscoring domain-specific overfitting. Notably, we achieve modest improvements across target tasks (approximately 0.35%–1.05%) through joint training (e.g., MATH+GSM8K and HumanEval+MATH), without inducing catastrophic forgetting, indicating that our simultaneous exposure to multiple domains promotes shared representation learning and enhances model robustness.

我们给出跨领域训练实验的性能结果(见 表4),评估多领域联合优化对泛化能力的影响。 我们观察到,单领域训练在 MATH 数据集上取得基线性能,并能很好地迁移到 GSM8K,这主要是因为二者具有共同的数学推理需求。 此外,由于 MATH 问题通常比 GSM8K 问题更具挑战性,在 MATH 上训练可使框架掌握高级问题求解技能,并有效泛化到相对简单的 GSM8K。 相比之下,我们发现,在 HumanEval 上进行单领域训练可在代码生成上取得较高保真度(94.65%),但向 MATH 的迁移能力有限(54.46%),这凸显了领域特定过拟合。 值得注意的是,通过联合训练(例如 MATH+GSM8K 和 HumanEval+MATH),我们在目标任务上取得了适度提升(约 0.35%–1.05%),且没有引发灾难性遗忘,这表明同时接触多个领域能够促进共享表示学习并增强模型稳健性。

Overall, our multi-domain setup not only preserves intra-domain proficiency but also slightly boosts cross-domain generalization. Furthermore, within the same domain, training on more complex benchmark datasets can further enhance the framework's ability to generate workflows for complex queries.

总体而言,我们的多领域设置不仅保留了领域内能力,还略微提升了跨领域泛化。 此外,在同一领域内,使用更复杂的基准数据集进行训练,可以进一步增强框架为复杂查询生成工作流的能力。

Distribution of LLM selections on MATH and MMLU
图3:DAAO 在 MATH 和 MMLU 基准上的 LLM 选择分布。
LLM Router Analysis.

In this section, we validate that DAAO does not exhibit a preference for any particular LLM and demonstrate its ability to generalize well to unseen LLMs without requiring extensive pretraining. 图3 illustrates the distribution of LLMs selected by DAAO on the MATH and MMLU datasets before and after the addition of DeepSeek-v3, with the new model being chosen 29% and 15% of the time, respectively. By intelligently selecting models that match the difficulty and domain of each query, DAAO improved the accuracy on MATH from 55.37% to 56.20% and increased the accuracy on MMLU from 84.90% to 85.66%.

在本节中,我们验证 DAAO 不偏好任何特定 LLM,并证明它无需大量预训练即可很好地泛化到未见过的 LLM。 图3 展示了加入 DeepSeek-v3 前后,DAAO 在 MATH 和 MMLU 数据集上选择 LLM 的分布;新模型分别有 29% 和 15% 的概率被选中。 通过智能选择与每个查询的难度和领域相匹配的模型,DAAO 将 MATH 准确率从 55.37% 提升到 56.20%,并将 MMLU 准确率从 84.90% 提升到 85.66%。

表5:DAAO 在 HumanEval 和 MATH 上的消融研究。报告性能(Pass@1 或 Accuracy)及相应推理成本。w/o DA 移除难度感知模块;w/o LS 禁用 LLM 选择;w/o C(·) 移除成本感知组件。
DatasetHumanEvalMATH
MetricPass@1 (%)Cost (10⁻³ $)Accuracy (%)Cost (10⁻³ $)
Vanilla94.651.1055.370.55
w/o DA92.211.6452.180.88
w/o LS92.691.3853.240.79
w/o C(·)94.721.8855.401.00

4.5 Framework Analysis

Ablation Study.

We conduct an ablation study on three key components of our DAAO framework: (1) w/o DA, removing the difficulty-aware module; and (2) w/o LS, removing the LLM selector and routing all subtasks to a fixed LLM;(3) w/o C(), eliminating the cost constraint in the optimization objective. As shown in 表5, removing the difficulty-aware module leads to the largest drop in both accuracy and efficiency, especially on the MATH dataset. This highlights the importance of adaptive reasoning control based on estimated query difficulty (e.g., dynamically adjusting the number of reasoning layers instead of using a fixed number). Removing the LLM router slightly affects accuracy, but leads to a notable increase in inference cost, as it prevents the system from using lightweight models when appropriate. Removing C() does not significantly impact the performance, but it disrupts the adaptive capability of DAAO to query difficulty. Overall, the results demonstrate that both components are crucial for balancing performance and cost in multi-step reasoning tasks.

我们对 DAAO 框架的三个关键组件进行消融研究:(1)w/o DA,移除难度感知模块;(2)w/o LS,移除 LLM 选择器并将所有子任务路由至固定 LLM;(3)w/o C(),移除优化目标中的成本约束。 表5 所示,移除难度感知模块会导致准确率和效率下降最多,在 MATH 数据集上尤其明显。 这突显了依据估计查询难度进行自适应推理控制的重要性(例如动态调整推理层数,而不是使用固定层数)。 移除 LLM 路由器对准确率影响较小,但会显著增加推理成本,因为系统无法在适当情况下使用轻量级模型。 移除 C() 不会显著影响性能,但会破坏 DAAO 针对查询难度进行自适应的能力。 总体而言,结果表明,这两个组件对于在多步推理任务中平衡性能与成本至关重要。

Sensitivity analysis of DAAO on HumanEval
图4:DAAO 在 HumanEval 上的敏感性分析。单查询成本(右)与性能(左)的单位分别为 103 美元和 Pass@1(%)。
表6:HumanEval 和 GSM8K 上不同阈值 P 对应的性能(%)与平均成本(103 美元)。
DatasetMetric0.10.20.30.40.50.60.7
HumanEvalPerf.92.8093.6094.6594.4294.8094.7794.80
Cost0.860.941.101.291.281.782.30
GSM8KPerf.91.9993.4694.4094.3494.7094.7594.40
Cost0.400.450.500.590.680.770.96
Sensitivity Analysis.

We analyzed the sensitivity of DAAO to four core parameters: the maximum number of layers in the agentic supernet Lmax in the depth equation, the cost penalty coefficient λ in the optimization objective, the sampling count K and the threshold τ in the threshold equation. The results are shown in 图4 and 表6. For the parameter Lmax, we observed a significant performance improvement when Lmax increased from 4 to 5 (from 92.9% to 94.6%). However, further increases in Lmax only yielded marginal performance gains while significantly increasing the inference cost per query. Considering both performance and cost, we selected Lmax = 5. For the parameter λ, we found that larger λ values led DAAO to favor more cost-efficient solutions, but with a slight performance degradation. For the parameter K, we note that performance is suboptimal with highest variance when K = 2. Increasing K to 4 effectively achieves a satisfactory low-variance estimation. For the threshold τ, as shown in 表6, performance improves as the threshold τ increases. However, the gain stops growing beyond 0.3. At the same time, a higher threshold τ raises inference costs because more operators are activated in each layer. Therefore, we set the threshold τ to 0.3 to balance performance and efficiency.

我们分析了 DAAO 对四个核心参数的敏感性:深度方程中智能体超网的最大层数 Lmax、优化目标中的成本惩罚系数 λ、采样次数 K,以及阈值方程中的阈值 τ 结果见 图4表6 对于参数 Lmax,我们观察到,当 Lmax 从 4 增加到 5 时,性能显著提升(从 92.9% 提高到 94.6%)。 然而,继续增大 Lmax 只会带来边际性能提升,同时显著增加每个查询的推理成本。 综合考虑性能与成本,我们选择 Lmax = 5。 对于参数 λ,我们发现较大的 λ 会使 DAAO 偏向成本效率更高的方案,但性能会略有下降。 对于参数 K,我们注意到,当 K = 2 时性能欠佳且方差最高。 K 增加到 4,可有效获得令人满意的低方差估计。 对于阈值 τ,如 表6 所示,性能会随着阈值 τ 增大而提升。 然而,超过 0.3 后,增益不再增长。 与此同时,更高的阈值 τ 会激活每层更多算子,从而提高推理成本。 因此,我们将阈值 τ 设为 0.3,以平衡性能与效率。

5. Conclusion

In this work, we propose DAAO, a difficulty-aware agentic orchestration framework that dynamically adapts reasoning workflows to query complexity and domain. By estimating query difficulty, allocating modular operators, and routing to heterogeneous LLMs, DAAO builds flexible and cost-efficient workflows. It moves beyond one-size-fits-all designs by leveraging complementary LLM strengths and adapting workflow depth per query. Experiments across six benchmarks show that DAAO outperforms existing multi-agent and routing systems, achieving up to 11.21% higher accuracy with up to 36% lower cost. These results highlight the value of difficulty-guided modular orchestration for scalable LLM agents. Future work includes extending DAAO to multi-modal queries and incorporating real-time feedback.

在本工作中,我们提出 DAAO,这是一种难度感知智能体编排框架,可根据查询复杂度和领域动态调整推理工作流。 通过估计查询难度、分配模块化算子并路由至异构 LLM,DAAO 构建出灵活且成本高效的工作流。 它利用不同 LLM 的互补优势,并针对每个查询调整工作流深度,从而超越一刀切的设计。 六个基准上的实验表明,DAAO 优于现有多智能体系统和路由系统,准确率最高提高 11.21%,成本最多降低 36%。 这些结果凸显了难度引导模块化编排对于可扩展 LLM 智能体的价值。 未来工作包括将 DAAO 扩展到多模态查询,并纳入实时反馈。