Benchmarking AI Agents on Real-World Tasks: Methodology and Practices

    This article presents a practical methodology for benchmarking AI agents on real-world tasks rather than static question sets. It covers how to build a task suite from anonymized interaction logs, how to combine checklist and code-based scoring, and why realistic workspaces with distractors are the main source of difficulty. It also explains multi-dimensional metrics such as completion rate, stability across repeated runs, cost per success, and safety compliance, and closes with actionable recommendations for running reproducible, auditable evaluations.

    1. Why Real-World Task Benchmarks Are Needed

    Over the past two years, agent evaluation has mostly relied on static question sets or single-tool-call tests. These setups share a common problem: task boundaries are clear, context is clean, and there are few distractors. As a result, scores tend to be inflated and correlate only weakly with real business scenarios.

    Real work has three defining traits: information is scattered across multiple heterogeneous files, some content is outdated or mutually contradictory, and the workspace may contain anomalous instructions that must be identified and rejected.

    A benchmark built for real-world tasks essentially addresses evaluation validity: whether a score can predict how an agent performs in a real workspace. The framework described below reflects a class of practices recently published in industry: jointly built by several research institutions and open-source communities, using tens of millions of anonymized real interaction records as source material. It forms a task suite of roughly one hundred tasks, covers more than ten models and multiple runtime frameworks, and has accumulated tens of thousands of scoring runs. This article abstracts it into a transferable methodology and does not refer to any specific product.

    2. Building the Task Suite: From Interaction Logs to Scorable Tasks

    2.1 Data Sources and Anonymization

    The starting point is a large corpus of anonymized interaction records. The key engineering effort is not collection but anonymization and reproducibility:

    • Remove all direct identifiers, and apply consistent pseudonymization to emails, accounts, and ticket numbers so that the same entity maps consistently across files. Otherwise the task loses solvability.
    • Preserve realistic distribution characteristics, such as long-tailed file counts, messy naming, and mixed formats.
    • Cluster frequently occurring operation patterns into task templates, then have humans write the acceptance criteria.

    2.2 Combining Scoring Methods

    No single scoring method can cover the diversity of real tasks, so a hybrid strategy is used in practice:

    • Checklist-based rule scoring: break each task into a set of decidable criteria and verify them one by one; security criteria must be included.
    • Code-based tests: for tasks with programmatically verifiable results (such as data transformation or spreadsheet computation), write test scripts that judge automatically.
    • Allocate the two by task type, and record pass/fail per criterion rather than emitting a single aggregate score.

    The benefit of this design is attributability: when a run fails, you know whether the agent “did not find the file” or “found it but modified the wrong field.”

    3. Workspace Reconstruction: The Main Source of Difficulty

    Each task comes with a workspace that closely resembles reality, with a median file count close to two hundred. Content spans emails, calendar exports, spreadsheets, chat logs, receipts, web archives, and documents. What actually separates models is distractor design:

    • Outdated records: versions with the same name but older timestamps, testing recency judgment.
    • Similar accounts and duplicate-name entities: testing entity disambiguation.
    • Contradictory information: two sources reach conflicting conclusions, testing whether the agent proactively asks for clarification instead of picking one arbitrarily.
    • Malicious instructions: privilege-escalating requests hidden inside file content, testing awareness of the boundary between instructions and data.

    This explains a common puzzle: models perform excellently on clean input, but completion rates drop sharply once workspace noise increases. Therefore an evaluation must report workspace size and the distribution of distractor types; otherwise scores are not comparable.

    4. Multi-Dimensional Metrics: Completion, Stability, and Safety

    4.1 Average Completion Rate and Confidence in Rankings

    Averaged across multiple runtime frameworks, top models cluster around a sixty percent completion rate, with only about one percentage point separating the top three. A gap of this magnitude is smaller than the variance introduced by runtime frameworks, so rankings should be read as “the same tier” rather than a strict ordering.

    4.2 Stability Revealed by Repeated Runs

    Statistics from repeated attempts on the same task are more informative than a single score:

    • Roughly three quarters of tasks succeed at least once.
    • Fewer than half succeed on all three attempts.

    The difference between the two is the “instability loss.” For production systems, the implication is that a single successful demo does not mean the agent is ready to ship; acceptance should be gated on the probability of consecutive successes.

    Illustrative stability statistics logic:

    1. def stability(task_runs, k=3):
    2. # task_runs: {task_id: [pass_bool, ...]} results of k runs per task
    3. at_least_once, all_pass = 0, 0
    4. for results in task_runs.values():
    5. s = sum(1 for r in results[:k] if r)
    6. if s >= 1:
    7. at_least_once += 1
    8. if s == k:
    9. all_pass += 1
    10. n = len(task_runs)
    11. return at_least_once / n, all_pass / n

    4.3 Cost Must Be Reported Alongside

    When completion rates are similar, per-run cost determines feasibility. In practice, estimated cost for the same task suite can differ by more than five times; a low-cost option may have a lower completion rate but a clear advantage in unit cost. A sensible approach is to introduce a “cost per success” metric:

    1. cost per success ≈ per-run cost / probability of consecutive success

    This metric avoids the misjudgment of “using the most expensive configuration to gain a fraction of a percentage point.”

    4.4 Open-Source vs. Proprietary Runtime Frameworks

    Average pass rates across frameworks show that the gap between open-source and proprietary options is within a few percentage points, and differences between frameworks are often larger than differences between models. The engineering conclusion: framework choices (context management, tool orchestration, failure retries) contribute non-negligibly to results. Fix the framework variable before comparing models.

    5. The Safety Dimension: The Most Overlooked Failure Mode

    Across all runs, about fifteen percent fail at least one safety check. More concerning, among runs that fully satisfy correctness criteria, roughly ten percent still fail safety requirements. In other words, “doing the task correctly” and “doing it correctly in a compliant way” are two different things.

    Safety criteria should cover at least:

    • Instruction–data isolation: do not execute privilege-escalating instructions that come from file content.
    • Least privilege: do not access resources outside the task scope.
    • Confirmation for irreversible actions: deletion, sending, and payment actions require explicit confirmation.
    • No leakage of sensitive information: do not echo credential-like information in output.

    6. Practical Recommendations

    1. Define acceptance criteria before choosing a model, and mandate security items in those criteria.
    2. Use repeated-run statistics to measure consecutive success rate, and set a launch threshold.
    3. Put cost in the same report and compute cost per success.
    4. Keep the workspace noise distribution consistent with real business, and version-control the task suite.
    5. Feed failure samples back as regression cases to form a continuous evaluation loop.

    In related practice at Baidu AI Cloud, this kind of evaluation typically relies on a container platform for environment isolation, object storage for workspace snapshots, and logging and monitoring services for run traces and metric dashboards, keeping evaluations reproducible and auditable.