Model Agent Benchmarking with a Fixed Execution Framework
A controlled evaluation method for comparing AI agent models by keeping the execution framework, tasks, environment, context, and acceptance criteria unchanged. The article presents a reusable benchmark workflow, key metrics, retry analysis methods, common pitfalls, and practical implementation recommendations.
1. Background and Problem Definition
In an AI agent application, the model is only one part of the execution pipeline. The same model can produce very different results when used with different execution frameworks, browser environments, or acceptance criteria. As a result, looking only at whether a task was completed makes it difficult to determine whether performance differences come from the model or from the surrounding system.
Lightweight models offer lower inference costs and faster response times, making them suitable for high-frequency automation scenarios. However, their performance in multi-step planning, long-context retention, and reliable tool use must be evaluated systematically. The approach described in this article is to keep the execution framework fixed, replace only the model, and observe the differences attributable to the model itself.
2. Controlling Variables: The Core of Reliable Evaluation
The credibility of a horizontal model benchmark depends on controlling the variables. The following elements should generally remain unchanged:
- Execution framework: Keep the scheduling logic, prompt templates, tool registration, timeout settings, and retry policies consistent.
- Tasks and materials: Use exactly the same task descriptions, input files, page snapshots, and data samples.
- Context: Keep the system prompt, historical message length, and memory injection method consistent.
- Runtime environment: Use the same browser version, network conditions, concurrency level, and random seed, if supported.
- Acceptance criteria: Use the same scripts or manual standards to determine task completion, and lock them before testing begins.
Only by replacing the model variable can results be reasonably attributed to model performance. If the execution framework itself has defects, all models will be affected, making the conclusions unreliable.
2.1 Task Design Considerations
Tasks should cover representative steps from real-world scenarios, such as page navigation, form completion, information extraction, multi-page workflows, and result validation. Each task needs a clearly defined starting point, end state, and observable success signal.
Avoid ambiguous descriptions such as “organize the page content,” which cannot be evaluated objectively. A better task would be: “Extract all values in the third column of the table and write them to the specified file.”
2.2 Acceptance Criteria
Acceptance checks should be automated whenever possible. Assertions can be used to verify file contents, page element states, or API responses.
For aspects that require human judgment, prepare scoring guidelines in advance. Multiple reviewers should score the results independently, with a final result determined through agreement.
3. Building the Evaluation Framework
The following example illustrates a general evaluation loop. The code shows the overall structure only; specific interfaces should be replaced according to the execution environment.
MODELS = ["model_a", "model_b", "model_c", "model_d"]TASKS = load_tasks("tasks/") # All models use the same task setFIXED_CONFIG = load_config("eval.yaml") # Framework configuration remains unchangedresults = []for model in MODELS:for task in TASKS:for run_id in range(RUNS_PER_TASK):env = prepare_clean_env(task) # Reset the browser and files before each runtrace = run_agent(model=model,task=task,config=FIXED_CONFIG,env=env,)verdict = check_acceptance(task, env) # Apply the same acceptance criteriaresults.append({"model": model,"task": task.id,"run": run_id,"passed": verdict.passed,"retries": trace.retry_count,"duration_s": trace.duration_s,"failure_type": verdict.failure_type,})save_report(results)
Three implementation details are particularly important:
- Reset the environment before every run to prevent caches or residual files from affecting later results.
- Run each task multiple times because a single result can be highly affected by chance.
- Record every action, return value, and retry reason in the logs to support post-run analysis.
4. Evaluation Metrics
Completion rate alone is not enough to reveal the differences between models. It is useful to record the following metrics together:
- Completion rate: The proportion of runs that pass the acceptance checks.
- End-to-end duration: The time from task initiation to the end of acceptance checks. Model inference time and tool execution time should be separated; otherwise, it is difficult to identify the actual bottleneck.
- Retry count: The total number of retries triggered during each task. Retries are not necessarily a problem, but an unusually high count often indicates instability in output formatting, tool parameters, or state assessment.
- Failure type distribution: Examples include format errors, invalid tool-call parameters, incorrect page-state judgments, premature termination, and exceeding the step limit.
- Result quality: For open-ended tasks, use scoring criteria to measure the completeness and accuracy of the output.
These metrics are related. Runs with long durations and many retries often concentrate on a small number of complex tasks. Cross-analyzing failure types with task categories can help identify improvement priorities more quickly.
5. How to Interpret Retry Data
Retry count is an important signal for assessing model stability, but it should be interpreted carefully.
First, distinguish the source of each retry. A parsing failure caused by an incorrectly formatted model response requires a completely different solution from a retry caused by an intermittent environment timeout. These cases should be counted separately.
Second, examine whether the model converges after a retry. If the task completes reliably after retrying, the model may have some ability to self-correct. If the same step continues to fail, inspect the prompt and tool definitions for ambiguity.
Third, set a reasonable retry limit. Unlimited retries increase cost and can conceal the actual failure pattern. The limit should be defined before evaluation begins and applied consistently to every model.
6. Common Pitfalls
- Treating the result of a single run as a final conclusion. Agent tasks are inherently variable and require an adequate sample size.
- Changing prompts during evaluation without recording or synchronizing the changes. This makes the comparison unfair.
- Comparing only the final result while ignoring the execution process. Two models may both complete a task, but one may use fewer steps and make fewer incorrect actions, resulting in a meaningful difference in practical usability.
- Blaming the model for framework problems, or vice versa. First verify the framework and confirm that all models can run basic cases correctly under the same conditions.
7. Practical Recommendations
- Define the evaluation objective first. Model selection, regression testing, and capability exploration have different priorities, so metric weights should be adjusted accordingly.
- Build a task library and label task difficulty, covering at least simple, medium, and complex levels.
- Fix the framework version and configuration files, and assign a version identifier to every evaluation.
- Produce a structured report for each evaluation, including a configuration snapshot, raw logs, and summary tables.
- After upgrading the framework, rerun a set of baseline cases to confirm that environmental changes have not introduced new sources of bias.
With this process, teams can turn model selection from an experience-based judgment into a reproducible, data-driven decision. The evaluation method is independent of any specific model and can be reused to compare new model versions.
