Fair AI Agent Evaluation: Comparing Models in a Fixed Framework with a Multi-Role UI Example
Evaluating AI agents fairly requires strict control over variables. This article introduces an agent evaluation methodology using a multi-role collaboration UI as a test case. It details how to design evaluation variables, collect process metrics, attribute failures, and structure test records to help teams accurately compare different models within a consistent framework.
1. Why Evaluate Models in a Fixed Framework?
The outcome of an AI agent task is jointly determined by three factors: the model’s reasoning capability, the scheduling logic of the execution framework, and the stability of the external environment. If the framework, prompts, tool sets, and acceptance criteria all change simultaneously when comparing different models, the final differences cannot be accurately attributed. A conclusion that “Model A is faster than Model B” might simply be due to differences in the framework’s retry strategy or browser session management.
Therefore, the first principle of horizontal evaluation is controlling variables. Only swap the model while keeping all other elements consistent, including task descriptions, input materials, context window size, tool permissions, browser environment, and acceptance rules. Only then can differences be reasonably attributed to the model itself, or at least to the combination of the model and the framework.
2. Designing Evaluation Variables
Beyond fixing variables, we must clearly define the value ranges for each variable. A common practice is to divide them into four categories:
- Task variables: Requirement documents, feature lists, and acceptance conditions. Tasks should be complex enough to expose the model’s capabilities in planning, decomposition, and self-correction.
- Environment variables: Context budget, token limit per task, tool call limit, and timeout. Budgets should be set uniformly to prevent a model from gaining an advantage simply because it has more available resources.
- Execution variables: Whether human intervention is allowed, maximum repair rounds, and retention rules for screenshots and logs.
- Observation variables: Process metrics to be recorded, detailed in the next section.
For instance, you can set the same context limit and task budget for all participating models, and allow only one repair round. These constraints are written into an evaluation configuration file, which is read for every run to ensure reproducibility.
harness: fixed-agent-runnertask: multi-role-collab-uicontext_limit: 262144task_budget: 200000viewports:desktop: [1440, 1000]mobile: [390, 844]repair_rounds: 1artifacts: [code, screenshots, logs, review, metrics]
3. Process Metrics: What to Look for Beyond Completion
Most evaluations focus only on “whether it is completed” and “how good the final result looks.” However, for engineering implementation, process data is often more valuable. The following metrics are worth recording long-term:
- Action turns: The number of decisions and operations issued by the model from receiving the task to producing a runnable version. Excessive turns usually indicate rough planning or insufficient utilization of tool feedback.
- Tool call quality: Total tool calls, failed calls, and parameter errors. Incorrect parameters are easier to spot than incorrect conclusions and better reflect the model’s understanding of interface contracts.
- Auto-retry counts: Includes both framework internal retries and server-side model retries. These significantly increase time consumption but are often masked by the final result.
- End-to-end time: It is necessary to differentiate between pure generation time, service response wait time, and manual wait time; otherwise, it is impossible to identify the bottleneck.
- Context usage rate: The proportion of context occupied as the task progresses. When approaching the limit, models tend to forget early constraints, manifesting as feature regressions or style inconsistencies.
These metrics must be automatically collected during runtime, not retroactively filled in by memory.
4. Failure and Retry Attribution
Failure does not equal insufficient model capability. A single failure might stem from several causes:
- Model output non-compliance: For example, generated code fails to compile, or tool call formats are incorrect.
- Service layer exceptions: Rate limiting, timeouts, and connection drops. These issues are unrelated to model capability but directly extend total time.
- Framework policy issues: Default backoff strategies being too conservative, or inappropriate retry conditions causing the same error to be repeatedly attempted.
- Overly strict acceptance criteria: Some checks demand rendering details that exceed the reasonable scope of the task itself.
During attribution, first examine the error types in the logs, then determine if they occurred on the model side, service side, or framework side. Clear attribution gives a clear direction for subsequent improvements. For example, if multiple failures stem from the same type of service exception, adjusting backoff parameters is more effective than switching models.
5. Complex Task Design Example
Using a multi-role collaboration UI as an example, let’s illustrate how to design highly discriminative tasks. Such systems typically include the following modules:
- Project overview: Displays project status, owners, and member relationships.
- Material panel: Supports drag-and-drop sorting; materials can be attached to specific screen locations.
- Comment positioning: Comments must be bound to the coordinate area of a material and remain intact after version switching.
- Version and approval: Supports version switching, approval, and rejection; approval status requires persistence.
- Publish preview: Displays different visible content based on user roles.
The difficulty of such tasks lies in state management and interaction details. State must not be lost upon page refresh; dragged positions must sync with the data model; different role permissions must take effect at both the UI and API levels. Input materials can use publicly licensed images to avoid copyright issues.
During acceptance, you can check across two viewports: Desktop typically uses a widescreen size, while mobile uses a common smartphone width. Inspection items include whether the layout overflows, whether key operations are reachable, and whether data remains consistent after a refresh. Save first-version screenshots for each viewport for subsequent visual consistency comparisons.
6. Record Template and Review Method
After each run, it is recommended to produce a structured record for horizontal comparison. Below is a general template:
{"run_id": "2026-11-24-01","model_slot": "candidate-a","completed": true,"wall_clock_seconds": 0,"action_turns": 0,"tool_calls": {"total": 0, "failed": 0},"auto_retries": 0,"manual_restarts": 0,"context_peak_ratio": 0.0,"failure_category": null,"artifacts": ["code", "screenshots", "logs", "review", "metrics"]}
During the review, besides comparing total time, you should also compare retry counts, failure category distributions, and average time per turn. If two models yield similar final results, process data often distinguishes their long-term usage costs.
7. Selection Recommendations
Horizontal evaluation in a fixed framework answers a practical question: for a specific type of task, which model configuration can reliably deliver at an acceptable cost. Selection should follow these steps:
- Define the most common task types in your business and construct an evaluation set accordingly.
- Fix the framework and environment, swap only the model, and ensure reproducibility for each run.
- Record both result metrics and process metrics; process metrics are used to explain result differences.
- Attribute failures, distinguishing between model issues, service issues, and framework issues.
- Decide on improvement directions based on attribution results, such as adjusting retry strategies, optimizing context management, or switching models.
Evaluation conclusions only hold under specific frameworks, specific tasks, and at a specific point in time. Model versions and service statuses change, so evaluations should be repeated periodically rather than treated as a one-time verdict.
