Back to series
· 15 min read

Agent Evaluation Methods and Benchmarks


I. Why Do Agents Need a Dedicated Evaluation System?

Traditional LLM evaluation usually focuses on the model's output itself, such as whether the text is accurate, fluent, and meets expectations. But an Agent does not just generate text; it also needs to understand goals, make plans, call tools, maintain state, and continuously adjust its strategy based on execution results.

Even if an Agent's final answer appears correct, it may still have the following problems:

  • It called the wrong tool but happened to get the correct answer.
  • It performed unnecessary operations, wasting a large number of tokens and computational resources.
  • It did not verify the tool execution result and directly claimed that the task was complete.
  • In a multi-step task, the earlier steps were correct, but the final critical step failed.
  • It performs well on simple tasks but cannot complete tasks in complex environments.
  • It bypasses permission restrictions in order to complete the task, creating security risks.

Therefore, Agent evaluation cannot look only at the final answer; it must also evaluate the entire execution process.

1. Core Objectives of Agent Evaluation

Evaluation objective Core question Focus
Task completion capability Did it complete the user's goal? Success rate, completion rate
Reasoning and planning Did it make a reasonable plan? Plan quality, reasonableness of steps
Tool use Did it call tools correctly? Tool selection, parameter accuracy
State management Did it correctly maintain task state? State consistency, memory usage
Execution efficiency Did it complete the task at a lower cost? Latency, tokens, number of calls
Robustness Can it continue executing when facing exceptions? Recovery rate, fault tolerance
Security Did it comply with permissions and security boundaries? Privilege escalation rate, policy violation rate
Interpretability Can the execution process be traced? Logs, trajectories, decision rationale

2. Differences Between Agent Evaluation and Traditional LLM Evaluation

Dimension Traditional LLM evaluation Agent evaluation
Evaluation target Single model output Complete task execution process
Input Prompt Goal, environment, tools, and state
Output Text or structured result Results, tool calls, and state changes
Evaluation focus Correctness, relevance Completion, execution correctness
Execution process Usually does not involve external operations May involve multiple tools and systems
Failure types Incorrect answer, format error Planning error, tool error, state error
Evaluation method Static datasets Static testing and dynamic environment testing

The core difference is: LLM evaluation focuses on whether the model says the right thing, while Agent evaluation must also focus on whether it does the right thing.

II. Overall Framework for Agent Evaluation

Agent execution usually includes multiple stages, and each stage may have different types of problems.

For example, a data analysis Agent needs to complete the following:

  1. Understand the user's data analysis requirements.
  2. Find the target dataset.
  3. Call data processing tools.
  4. Perform statistical analysis.
  5. Validate the analysis results.
  6. Generate the final report.

If only the final report is checked, it is impossible to determine whether the Agent selected the data correctly or performed the correct calculations, nor is it possible to detect anomalies in the intermediate process.

Therefore, an evaluation system covering the complete execution chain needs to be established.

1. End-to-End Evaluation Structure

flowchart TD
    A["User task"] --> B["Task understanding evaluation"]
    B --> C["Planning and reasoning evaluation"]
    C --> D["Tool selection evaluation"]
    D --> E["Tool execution evaluation"]
    E --> F["State management evaluation"]
    F --> G["Result validation evaluation"]
    G --> H["Final task evaluation"]

    H --> I["Overall scoring and analysis"]

    style A fill:#DCEFE5,stroke:#4F8B70,color:#24563F
    style B fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
    style C fill:#EAE8FA,stroke:#A49BD5,color:#51477D
    style D fill:#EAF3EC,stroke:#83A995,color:#315D49
    style E fill:#EAF3EC,stroke:#83A995,color:#315D49
    style F fill:#F5F8F4,stroke:#B5CBBB,color:#40594A
    style G fill:#F7F4E8,stroke:#C7B77A,color:#675A2D
    style H fill:#DCEFE5,stroke:#4F8B70,color:#24563F
    style I fill:#E5F0E9,stroke:#83A995,color:#315D49

2. Three-Layer Evaluation Model

Agent evaluation can be divided into three layers.

First layer: Outcome Evaluation

Focuses on whether the task ultimately succeeds.

For example:

  • Was a correct analysis report generated?
  • Was the booking successfully completed?
  • Was the target file modified correctly?
  • Were query results meeting the requirements obtained?

Level Two: Process Evaluation

This focuses on how the Agent completes the task.

For example:

  • Was the task broken down correctly?
  • Was the right tool selected?
  • Were the correct parameters used?
  • Was the necessary result verification performed?
  • Were there any unnecessary repeated calls?

Level Three: System Evaluation

This focuses on the Agent's overall performance in a real operating environment.

For example:

  • What is the average response time?
  • How many tokens does each task consume?
  • What is the concurrency capability?
  • Can it recover when a tool fails?
  • Are there any calls that exceed its permissions?

These three levels complement one another; no single metric can replace a complete evaluation.

III. Core Evaluation Metrics for Agents

Agent evaluation metrics need to be designed according to the task type, but they can generally be developed across six dimensions: task success rate, execution quality, tool use, efficiency, robustness, and safety.

1. Task Success Rate

Task success rate is one of the most important baseline metrics.

It represents the proportion of tasks the Agent successfully completes.

TSR=\frac{N_{\text{success}}}{N_{\text{total}}}

Where:

  • N_{\text{success}}: the number of successfully completed tasks.
  • N_{\text{total}}: the total number of test tasks.

For example, if 100 tasks are tested and the Agent successfully completes 82 of them:

TSR=\frac{82}{100}=82\%

Note, however, that the task success rate must have clear criteria for determining success.

For data query tasks, you can check whether the query results are correct; for file operation tasks, you can check the file contents and file system state; for complex research tasks, you may need to combine fact verification with human scoring.

You cannot judge a task as successful merely because the Agent claims it has completed it.

2. Task Completion

Some tasks cannot simply be classified as success or failure.

For example, a user requests:

  • Query three databases.
  • Aggregate the data.
  • Generate an analysis report.
  • Export a CSV file.

If the Agent completes the first three items but fails to export the file, the task is not a complete failure, but it is not fully complete either.

A weighted completion score can be used:

Completion=\frac{\sum_{i=1}^{n}w_i s_i}{\sum_{i=1}^{n}w_i}

Where:

  • w_i: the importance weight of the subtask.
  • s_i: the completion status of the subtask, which can be 0 or 1, or a continuous score.

For example:

Subtask Weight Completion
Query data 20% 1
Data aggregation 30% 1
Generate report 30% 1
Export file 20% 0

The final completion score is:

Completion=0.2+0.3+0.3=80\%

This approach is better suited to complex, multi-step Agents.

3. Tool Accuracy

Tool accuracy evaluates whether the Agent correctly selects tools, fills in parameters, and follows invocation constraints.

It can be broken down into three metrics:

Tool selection accuracy:

ToolSelectionAccuracy= \frac{N_{\text{correct tool}}}{N_{\text{tool decisions}}}

Parameter accuracy:

ParameterAccuracy= \frac{N_{\text{correct parameters}}}{N_{\text{parameters evaluated}}}

Tool execution success rate:

ToolExecutionSuccess= \frac{N_{\text{successful calls}}}{N_{\text{total calls}}}

It is important to distinguish:

  • Choosing the right tool does not mean the parameters are correct.
  • Correct parameters do not mean the tool executed successfully.
  • Successful tool execution does not mean the task goal has been achieved.

For example, the Agent may correctly select the database query tool, but if the SQL conditions are wrong, the final result will still be incorrect.

4. Planning Quality

Planning quality evaluates whether the Agent has formulated reasonable execution steps.

Key concerns:

  • Is the task correctly decomposed?
  • Are necessary steps missing?
  • Are there unnecessary steps?
  • Are dependencies between steps correct?
  • Are failure recovery and result validation considered?

Scoring can be manual or structured.

For example, using a 1–5 scale:

Score Criteria
1 The plan is seriously flawed and the task cannot be completed
2 Multiple key steps are missing
3 Basically reasonable, but clearly redundant
4 Complete plan with reasonable steps
5 Complete and concise plan that also considers exception handling

Planning quality should not evaluate only whether the text is clearly expressed; more importantly, it should assess whether the plan can be executed in a real environment.

5. Execution Efficiency

Agents usually need to call models and tools multiple times, so execution efficiency is very important.

Common metrics include:

Metric Meaning
Average Latency Average task duration
P50 Latency Median duration
P95 Latency 95th percentile duration
Token Consumption Average token consumption
Tool Calls Average number of tool calls
Cost per Task Average cost per task
Steps per Task Number of execution steps per task

For example:

AverageLatency= \frac{\sum_{i=1}^{n}Latency_i}{n}

In production environments, P95 and P99 are often more valuable than average latency because they reflect the execution of long-tail tasks.

However, one cannot simply assume that fewer tool calls is always better.

For high-risk tasks, one additional validation may significantly improve reliability. Therefore, efficiency metrics must be analyzed together with task success rate and safety.

6. Robustness

Robustness measures how stable the Agent is when facing anomalies and environmental changes.

Tests should cover:

  • Model timeout.
  • Tool call failure.
  • Tool returning abnormal data.
  • Network interruption.
  • Incomplete context information.
  • Changes in external data.
  • Crash midway through multi-step execution.
  • User changes the task objective.

An exception recovery success rate can be defined:

RecoveryRate= \frac{N_{\text{recovered failures}}} {N_{\text{recoverable failures}}}

Here, the denominator counts only theoretically recoverable failures; permanent business errors must not be included.

Robustness can also be measured by the change in success rate before and after perturbation:

Robustness= \frac{SuccessRate_{\text{perturbed}}} {SuccessRate_{\text{normal}}}

The closer this ratio is to 1, the smaller the Agent's performance degradation under the specified perturbation conditions.

7. Safety

Safety is an indispensable part of Agent evaluation.

This is especially true for Agents that can perform file operations, database modifications, code execution, payments, and external API calls.

Common metrics include:

  • Rate of unauthorized tool calls.
  • Number of successful unauthorized operations.
  • Sensitive information leakage rate.
  • Prompt Injection attack success rate.
  • Approval bypass rate for high-risk operations.
  • Proportion of untrusted data executed as instructions.

For high-risk behaviors, it is not enough to calculate only an average safety score.

For example, a single unauthorized transfer can constitute a serious incident, so critical safety constraints should use hard pass conditions.

IV. Main Methods for Agent Evaluation

Agent evaluation cannot rely on only one method. Different methods are suitable for different testing objectives.

1. Rule-based Evaluation

Rule-based evaluation judges task results using predefined conditions.

For example:

  • Does the JSON conform to the Schema?
  • Was the specified tool called?
  • Was the target file generated?
  • Did the database records change as expected?
  • Is the final amount correct?
  • Was the maximum number of calls respected?

Example:

def evaluate_result(result):
    checks = {
        "has_answer": bool(result.get("answer")),
        "has_status": result.get("status") == "success",
        "has_reference": bool(result.get("references")),
    }

    score = sum(checks.values()) / len(checks)

    return {
        "score": score,
        "checks": checks,
        "passed": all(checks.values()),
    }

Advantages:

  • Stable results.
  • Easy to automate.
  • Low scoring cost.
  • Suitable for structured tasks.

Disadvantages:

  • Difficult to evaluate open-ended tasks.
  • Limited rule coverage.
  • Prone to cases where only surface conditions are met while actual quality is low.

Suitable for format checks, data validation, tool parameter checks, and explicit business rules.

2. Reference Answer Evaluation (Reference-based Evaluation)

This method compares the Agent output with a standard answer.

For example:

Question: What is the capital of France?

Standard answer: Paris

Agent output: Paris

Evaluation result: Correct

Applicable to:

  • Knowledge Q&A.
  • Information extraction.
  • Classification tasks.
  • Structured output.
  • Fixed computation tasks.

Common metrics include:

Exact Match

EM= \begin{cases} 1,& \text{the prediction exactly matches the standard answer}\\ 0,& \text{otherwise} \end{cases}

Precision

Precision=\frac{TP}{TP+FP}

Recall

Recall=\frac{TP}{TP+FN}

F1 Score

F1=2\times\frac{Precision\times Recall}

Note that an Agent's answer may have multiple correct expressions, so exact string matching cannot be used for all tasks.

3. LLM-as-a-Judge (using a large model for evaluation)

For open-ended tasks, it is difficult to prepare a single standard answer in advance.

For example:

  • Is the research report complete?
  • Are the analysis conclusions well-founded?
  • Is the task planning reasonable?
  • Does the response meet the user's requirements?
  • Is the tool usage strategy appropriate?

In this case, another large model can be used as the evaluator.

Basic process:

flowchart TD
    A["Agent executes the task"] --> B["Collect final results and execution trace"]
    B --> C["Build evaluation Prompt"]
    C --> D["Judge model scores"]
    D --> E["Output score and rationale"]
    E --> F["Aggregate evaluation report"]

    style A fill:#DCEFE5,stroke:#4F8B70,color:#24563F
    style B fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
    style C fill:#EAE8FA,stroke:#A49BD5,color:#51477D
    style D fill:#EAF3EC,stroke:#83A995,color:#315D49
    style E fill:#F5F8F4,stroke:#B5CBBB,color:#40594A
    style F fill:#E5F0E9,stroke:#83A995,color:#315D49

The Judge can score along multiple dimensions:

Dimension Scoring Criteria
Correctness Whether facts and conclusions are correct
Completeness Whether all requirements are covered
Relevance Whether it stays focused on the task objective
Reasoning Whether the reasoning process is sound
Tool Usage Whether tools are used correctly
Instruction Following Whether user instructions are followed

For example, the evaluation Prompt can be designed as:

You are a strict Agent evaluator.

Please evaluate the Agent's execution result according to the following criteria:

1. Whether the task objective was completed.
2. Whether the facts are accurate.
3. Whether any key requirements were omitted.
4. Whether tool calls were reasonable.
5. Whether there are conclusions without evidence.

Please output JSON:

{
  "correctness": 1-5,
  "completeness": 1-5,
  "tool_usage": 1-5,
  "instruction_following": 1-5,
  "overall_score": 1-5,
  "reason": "scoring rationale",
  "critical_errors": []
}

The advantage of LLM-as-a-Judge is that it can evaluate complex semantic quality, but it also has clear limitations:

  • The evaluator model itself may hallucinate.
  • It has preferences regarding expression style.
  • It tends to favor longer, more detailed answers.
  • It may be influenced by the output of the model being evaluated.
  • Scores may differ across different Judge models.

Therefore, fixed scoring criteria, structured output, and manual sample review should be used.

For critical business facts, programmatic verification should be combined where possible, rather than trusting the Judge entirely.

4. Human Evaluation

Human evaluation involves professionals or domain experts judging the Agent's performance.

Applicable to:

  • Task quality evaluation in professional domains such as healthcare and law.
  • Complex research reports.
  • High-risk decisions.
  • User experience evaluation.
  • Open-ended tasks that Judge models cannot reliably assess.

Human evaluation can use:

Single-sample scoring: Independently score the execution result of one Agent.

Pairwise comparison: Compare the outputs of two Agents and choose the better result.

Blind evaluation: Hide model identities and versions to reduce subjective bias.

Pairwise comparison is often used in model iteration:

Task: Analyze a company's business situation

Agent A: Output result A
Agent B: Output result B

Evaluators compare them based on factual accuracy, completeness, and readability.

Human evaluation is higher quality, but it is more costly and slower, and different evaluators may apply different standards.

In engineering practice, automated evaluation is usually the primary approach, supplemented by manual sample review.

5. Trajectory Evaluation

This is a very important method in Agent evaluation.

It checks not only the final result but also every action the Agent takes during execution.

A typical execution trajectory may include:

Step 1: Understand the user's goal
Step 2: Create a task plan
Step 3: Call the search tool
Step 4: Read the search results
Step 5: Call the database tool
Step 6: Analyze the data
Step 7: Verify the results
Step 8: Output the final answer

Trajectory evaluation focuses on:

  • Did it choose the right actions?
  • Did it omit key steps?
  • Did it call tools repeatedly?
  • Did it continue to use erroneous information after an incorrect result?
  • Did it handle tool exceptions correctly?
  • Did it stop promptly after completing the task?

Note that a correct Agent does not necessarily have only one fixed execution trajectory.

Different tools and different plans may all complete the same task. Therefore, an Agent cannot be required to strictly reproduce a particular reference trajectory.

A more reasonable approach is to evaluate key actions, necessary constraints, and the final state.

6. Counterfactual Evaluation

Counterfactual evaluation changes task conditions or the environment to check whether the Agent can still execute correctly.

For example:

  • The search tool suddenly becomes unavailable.
  • The database returns partial data.
  • The user changes the task requirements midway.
  • A tool returns outdated information.
  • A key step fails during execution.
  • The process restarts halfway through task execution.

By comparing performance in normal and perturbed environments, we can understand the Agent's robustness and recovery capability.

V. Agent Benchmark: What Is a Benchmark Test?

A Benchmark is a standardized set of test tasks, environments, evaluation rules, and metrics.

Its purpose is to enable comparison of different Agents, models, and architectures under relatively uniform conditions.

A complete Agent Benchmark usually includes:

  1. Test task set.
  2. Test environment.
  3. Tools and resources.
  4. Initial task state.
  5. Success criteria.
  6. Execution limits and budget.
  7. Scoring rules.
  8. Test results and reports.

1. Basic Structure of a Benchmark

flowchart TD
    A["Benchmark dataset"] --> B["Task definition"]
    B --> C["Environment initialization"]
    C --> D["Agent execution"]
    D --> E["Record execution trace"]
    E --> F["Automated evaluation"]
    F --> G["Manual sample review"]
    G --> H["Calculate comprehensive metrics"]
    H --> I["Generate Benchmark report"]

    style A fill:#DCEFE5,stroke:#4F8B70,color:#24563F
    style B fill:#E0F0FE,stroke:#93BCE8,color:#1E4976
    style C fill:#F5F8F4,stroke:#B5CBBB,color:#40594A
    style D fill:#EAE8FA,stroke:#A49BD5,color:#51477D
    style E fill:#EAF3EC,stroke:#83A995,color:#315D49
    style F fill:#F7F4E8,stroke:#C7B77A,color:#675A2D
    style G fill:#F5F8F4,stroke:#B5CBBB,color:#40594A
    style H fill:#EAF3EC,stroke:#83A995,color:#315D49
    style I fill:#E5F0E9,stroke:#83A995,color:#315D49

2. Benchmark Categories

Based on the evaluation target, they can be divided into the following categories:

Type Evaluation content Typical tasks
General Agent Benchmark General task execution capability Search, planning, tool use
Web Agent Benchmark Browser interaction capability Webpage operations, form filling
Coding Agent Benchmark Programming and software engineering capability Bug fixing, feature implementation
Research Agent Benchmark Information research and synthesis capability Multi-source search, report generation
Tool-use Benchmark Tool-use capability API selection, parameter generation
Multi-Agent Benchmark Multi-Agent collaboration Role division, communication and coordination
Long-horizon Benchmark Long-horizon task capability Multi-stage tasks, sustained execution
Safety Benchmark Safety and permission boundaries Unauthorized operations, Prompt Injection

Different Benchmarks focus on different capabilities; a high score on a single test set cannot be directly equated with an Agent's overall capability.

VI. Introduction to Mainstream Agent Benchmarks

The following are representative Benchmarks in Agent research and engineering practice. Their task designs and evaluation focuses differ.

1. GAIA

GAIA (General AI Assistants) mainly evaluates the ability of general AI assistants to solve complex real-world problems.

It emphasizes whether a task is actually completed, not merely generating a plausible-looking answer.

Main characteristics:

  • Involves multi-step reasoning.
  • Requires search and information integration.
  • May involve multimodal inputs such as files and images.
  • Emphasizes tool use and external information retrieval.
  • Requires completing tasks with real-world significance.

The value of GAIA lies in testing whether an Agent can combine multiple capabilities to solve real, complex problems.

It is suitable for evaluating general assistants, research Agents, and systems with tool-use capabilities.

2. AgentBench

AgentBench is a benchmark for evaluating the ability of LLMs to perform tasks as Agents in various environments.

It covers multiple interactive environments, such as:

  • Operating systems.
  • Databases.
  • Knowledge graphs.
  • Web shopping.
  • Web browsing.
  • Home environments.
  • Game environments.

It emphasizes the Agent's ability to interact with environments, not just static question-answering capability.

It is suitable for comparing the performance of different models and Agent architectures across various task environments.

3. WebArena

WebArena is a real-website interaction Benchmark for Web Agents.

It builds multiple interactive website environments to test whether an Agent can complete actual web tasks.

Typical tasks include:

  • Search for products.
  • Modify user profiles.
  • Create content.
  • Manage orders.
  • Interact with forums.
  • Query website information.

Its core value is using task completion as an important evaluation basis, rather than only checking whether the Agent generated a correct description of operations.

4. BrowserGym

BrowserGym is a unified environment and tool ecosystem for building and evaluating browser Agents.

It provides browser interaction tasks and evaluation infrastructure, and can support multiple Web Agent Benchmarks.

Key value:

  • Unified browser interaction interface.
  • Supports different task environments.
  • Facilitates comparison of different Agents.
  • Supports analysis of execution traces and task results.

BrowserGym is more of an evaluation infrastructure than a single task dataset.

5. OSWorld

OSWorld mainly evaluates an Agent's ability to execute tasks in a real computer operating system environment.

Tasks may include:

  • Operating desktop applications.
  • Editing documents.
  • Managing files.
  • Configuring the system.
  • Using office software.
  • Completing cross-application workflows.

It requires the Agent not only to understand the task, but also to accomplish the goal through real interface operations.

This type of test can reveal problems in an Agent's visual understanding, GUI grounding, action planning, and state verification.

6. SWE-bench

SWE-bench mainly evaluates an AI Agent's ability to solve real software engineering problems.

Test tasks usually come from Issues in real GitHub projects, requiring the Agent to understand the codebase, analyze the problem, and submit code changes.

It mainly examines:

  • Codebase understanding.
  • Problem localization.
  • Bug fixing.
  • Code modification.
  • Running tests.
  • Verification of the modification results.

It not only checks whether code can be generated, but also judges through tests whether the problem is truly solved.

For Coding Agents, SWE-bench is a very important evaluation direction.

7. SWE-bench Verified

SWE-bench Verified is a subset of SWE-bench that has been manually screened and verified.

Its purpose is to improve the quality of test tasks and reduce the ambiguity and testing issues that may exist in the original tasks.

When comparing Coding Agents, it is necessary to clarify whether SWE-bench, SWE-bench Verified, or another variant is being used; results from different versions must not be conflated.

8. Terminal-Bench

Terminal-Bench targets an Agent's task execution capability in terminal environments.

It mainly examines:

  • Command-line operations.
  • Environment configuration.
  • Software installation.
  • File handling.
  • Code execution.
  • System debugging.
  • Multi-step terminal tasks.

It can evaluate whether an Agent truly has the ability to complete engineering tasks through the terminal.

9. τ-bench (Tau-bench)

τ-bench mainly evaluates an Agent's ability to execute tasks in real business scenarios that have business rules and tool constraints.

It emphasizes:

  • Multi-turn interaction between the Agent and the user.
  • Tool invocation.
  • Compliance with business rules.
  • Changes in data state.
  • Correctness of task execution.

For example, in business environments such as retail and aviation, the Agent needs to complete order, query, or modification operations according to business rules.

This type of test is closer to the actual application scenarios of enterprise Agents than simple question answering.

10. Benchmark Comparison

Benchmark Core Focus Main Capabilities Evaluated
GAIA General assistant Complex problem solving
AgentBench General Agent Multi-environment interaction
WebArena Web Agent Web task execution
BrowserGym Browser environment Evaluation infrastructure for browser Agents
OSWorld Desktop Agent Operating system and GUI operations
SWE-bench Coding Agent Real software engineering tasks
SWE-bench Verified Coding Agent Manually verified code repair tasks
Terminal-Bench Terminal Agent Command-line task execution
τ-bench Business Agent Tool invocation and business rule compliance

The choice of Benchmark should be determined by the target task. For example, when developing a browser automation Agent, prioritize WebArena; when developing a software engineering Agent, focus on SWE-bench and related test sets.

VII. How to Design Your Own Agent Benchmark?

Public Benchmarks can only reflect part of the capability and cannot fully cover the internal business of an enterprise.

For example, an enterprise knowledge base Agent may need to:

  • Retrieve internal documents.
  • Read data with restricted permissions.
  • Call enterprise APIs.
  • Generate reports.
  • Write to business systems.
  • Wait for human approval.

Public test sets do not necessarily include these scenarios, so you need to build your own business Benchmark.

1. Clarify the Test Objectives

First, clarify the capabilities to be verified.

For example:

Objective: Evaluate an enterprise knowledge base Agent

Core capabilities:
1. Correctly understand user questions
2. Retrieve relevant documents
3. Cite information sources correctly
4. Handle documents with restricted permissions
5. Invoke business tools
6. Generate accurate answers
7. Proactively state when information is insufficient

The test objectives must be clear; otherwise, evaluation metrics can easily become disconnected from real business objectives.

2. Build a Task Dataset

Each test task should contain a complete task definition.

Recommended data structure:

```json { "task_id": "agent_001", "category": "knowledge_retrieval", "difficulty": "medium", "input": { "query": "查询本季度销售额及同比变化" }, "environment": { "database": "sales_db", "tools": ["query_sales", "calculate_growth"] }, "constraints": [ "只能读取授权数据", "必须使用当前季度数据" ], "expected_result": { "required_fields": [ "sales_amount", "growth_rate" ] }, "evaluation": { "type": "rule_based", "success_condition": "result_matches_database" } } ```

The task dataset should cover different difficulty levels:

Difficulty Characteristics Example
Easy Single step, clear objective Query a single record
Medium Multiple steps, few dependencies Query and calculate the growth rate
Hard Multiple tools, complex dependencies Query, analyze and generate a report
Extremely hard Long horizon, anomalies and uncertainty Multi-system collaboration with approval handling

3. Design test scenarios

Test scenarios must not consist solely of normal tasks; they should also cover boundary conditions and exceptional cases.

It is recommended to cover at least the following types:

Test category Test content
Normal task Can a standard task be completed
Complex task Can a multi-step task be planned correctly
Boundary task Empty data, extremely large data, special characters
Exceptional task Tool timeout, API failure
Ambiguous task Unclear user intent
Adversarial task Prompt injection, malicious input
Permission task Unauthorized access and operations
Long-horizon task Interruption, recovery, sustained execution
Concurrent task Multiple tasks running simultaneously
Changing task User modifies the objective midway

The test set should cover the distribution of tasks found in real business settings as closely as possible, rather than selecting only the tasks that the Agent can easily complete.

4. Define verifiable success criteria

This is one of the most critical steps in designing a Benchmark.

Do not use only criteria such as:

The Agent output a reasonable explanation.

Instead, use objective, verifiable results wherever possible:

1. The database query results match the reference data.
2. All required fields are present.
3. The calculation error is within the allowed range.
4. The file is successfully written to the specified directory.
5. No unauthorized operation records exist.
6. The task status correctly transitions to SUCCEEDED.

For open-ended tasks that cannot be fully automated, use a Judge for scoring and validate it through manual sampling.

5. Set up the test environment

An Agent Benchmark must control environment variables as much as possible.

The following need to be fixed or recorded:

  • Model version.
  • System Prompt version.
  • Agent framework version.
  • Tool definitions and versions.
  • Test data version.
  • Initial environment state.
  • Model sampling parameters.
  • Maximum execution time.
  • Token budget.
  • Tool call budget.

For tasks that modify data, it is best to use an isolated sandbox or a resettable environment.

Otherwise, the state modified by a previous task may affect the next task, leading to unfair test results.

6. Establish a complete evaluation process