Balancing Speed and Quality in Multi-Agent Task Execution
In multi-agent task execution, completion speed is often mistaken for capability. However, fast results do not guarantee accurate delivery, especially for compound tasks involving multi-step retrieval, data aggregation, metric calculation, and report generation. This article discusses why speed alone is an insufficient metric, introduces a four-dimensional evaluation model covering efficiency, quality, stability, and cost, and proposes a closed-loop "execute-validate-audit" architecture. It also explores the root causes of "correct overall conclusions with inaccurate breakdowns" and outlines a phased roadmap for building agent systems that deliver verifiable, traceable, and reproducible results within acceptable timeframes. The core principle: speed is an experience factor, but accuracy is the baseline.
Speed Is Not a Standalone Metric
The execution pipeline of a task-oriented agent typically includes task understanding, plan decomposition, tool invocation, data retrieval, computation and aggregation, result generation, and delivery validation. End-to-end latency is only one external indicator of this pipeline, influenced by concurrency strategy, cache hits, tool response times, retry counts, and model inference volume. A system that returns quickly may have an optimized pipeline—or it may simply have compressed validation steps, ignored error branches, or skipped granular dimensions.
To evaluate whether an agent truly “does the work,” at least four questions must be answered: Is the result correct? Is the structure compliant? Is the process traceable? Is repeated execution stable? Speed should be treated as an experience metric, not a substitute for quality. A more reasonable approach is to establish quality gates: first meet correctness and consistency requirements, then compare efficiency and cost. Otherwise, the faster a wrong result is delivered, the higher the rework cost.
A Four-Dimensional Evaluation Model
Dimension 1: Efficiency. Do not merely record total elapsed time. Break down phase-level latency, including plan generation, tool invocation, data retrieval, computation and aggregation, result generation, and validation review. Phase-level timing helps locate bottlenecks: Is tool latency high? Are retries excessive? Is validation blocking progress? Also record timeout rates, retry rates, and failure recovery time.
Dimension 2: Quality. Quality cannot be judged solely by whether the final text reads smoothly. Define a verifiable delivery contract that includes at least: field completeness, structural compliance, factual correctness, metric definition consistency, breakdown data accuracy, parent-child hierarchy aggregation consistency, and the explainable relationship between conclusions and underlying data. For report-type tasks, also verify that data sources, time windows, units, and deduplication rules are clearly specified.
Dimension 3: Stability. Under similar conditions, does the same input produce consistent results across repeated runs? Can the system recover from failures at breakpoints? Are fallback strategies available for tool anomalies? Are retries idempotent? A system with poor stability, even if occasionally fast, cannot enter production workflows.
Dimension 4: Cost and Observability. Track tool call counts, inference call volume, external resource consumption, and manual review time. Write plans, tool input/output parameters, validation results, and repair actions into audit logs. Observability is not an add-on—it is the foundation for diagnosing “correct overall, inaccurate in detail” issues.
Evaluation Sets and Scoring: Define Ground Truth Before Ranking
Evaluation sets should be stratified by task complexity: simple retrieval, multi-step computation, cross-source verification, breakdown statistics, report generation, and exception handling. Each task type requires ground truth that includes not only final answers but also field-level assertions and key intermediate results. For example, total amounts, line items, year-over-year and month-over-month changes, units, and time ranges in a report should all be verifiable; parent-child aggregations should satisfy consistency constraints; key conclusions should be traceable back to data evidence.
Scoring should adopt a “quality gate + weighted scoring” approach. Quality gates include: one-vote veto for structural non-compliance, one-vote veto for critical metric errors, and one-vote veto for data dimension conflicts. After passing the gates, score based on weighted criteria covering quality, efficiency, stability, and cost. This prevents systems that are fast but error-prone from dominating composite rankings. For manual review, combine sampling with key-item review: full inspection for high-risk fields, sampling for low-risk fields.
A Closed-Loop Execute-Validate-Audit Architecture
To ensure agents deliver usable results, adopt a closed-loop architecture: a planner decomposes tasks, executors invoke tools, a validator checks structure and metric assertions, an audit layer records evidence, and human reviewers handle high-risk exceptions. Key mechanisms include structured output contracts, timeout budgets, retry limits, idempotent tool calls, cross-validation, and data lineage recording.
Illustrative pseudocode:
task_result = planner.execute(task_spec)schema_report = validator.check_schema(task_result, output_contract)metric_report = validator.check_metrics(task_result, golden_metrics)consistency_report = validator.check_parent_child_totals(task_result)audit_log.write(task_spec, task_result, schema_report, metric_report, consistency_report)if not (schema_report.ok and metric_report.ok and consistency_report.ok):repaired = repair_or_review(task_result, schema_report, metric_report)audit_log.write_repair(repaired)return repairedreturn task_result
The point of this pseudocode is not the specific implementation but the principle: validation must happen before delivery, validation results must be recorded, and failures must enter repair or manual review—never be returned directly as “looks complete” results.
Root Causes of “Correct Overall, Inaccurate Breakdowns”
Breakdown data errors typically stem from several root causes: metric definitions not locked down (e.g., inconsistent statistical scope, time windows, or deduplication rules); aggregation levels mixed (e.g., totals and line items drawn from different data sources); unit conversion errors; outliers unhandled; and missing fields in tool responses silently filled in by model guessing. Countermeasures include establishing a data dictionary and metric definitions that specify the source, scope, unit, and update frequency of every field; running consistency checks on parent-child aggregations; performing cross-validation on key breakdowns; and prohibiting guessing for missing fields—instead, raise explicit errors or route to manual review.
For observability, general-purpose logging services, monitoring and alerting tools, and object storage can carry audit logs, evaluation artifacts, and regression reports. For example, on Baidu AI Cloud, these general-purpose capabilities can be combined to build an auditable execution pipeline, though the specific choice should align with your team’s existing infrastructure and compliance requirements.
Implementation Roadmap
Phase 1: Build a baseline evaluation set covering typical tasks and high-risk fields. Record phase-level latency and quality gate results.
Phase 2: Introduce structured contracts and automated assertions, breaking “overall correctness” into verifiable field-level checks.
Phase 3: Complete observability and regression mechanisms. Run every change against the fixed evaluation set, comparing quality and efficiency variations.
Phase 4: Establish a human-in-the-loop workflow where high-risk tasks require mandatory review and low-risk tasks are auto-approved.
The ultimate goal is not to chase the fastest single run, but to enable the system to stably deliver verifiable, traceable, and reproducible results within acceptable timeframes. Speed is an experience factor; accuracy is the baseline. Only by integrating validation, auditing, and regression into the main pipeline can multi-agent systems truly do the work on behalf of humans.
