Computer-Use and Browser Agents › Evaluation on real interfaces

Michael BrenndoerferDecember 1, 202610 min read
Language AI HandbookAll chapters
Part 49 of 67Long-Horizon Agents and Interoperability
Chapter 373Computer-Use and Browser Agents › Evaluation on real interfaces
Reading section 9 of 15 · Evaluation on real interfaces · 10 minSection 9 of 15 · 10 min

Section 9 of 15 · 10 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

A benchmark should show what was counted as success and which parts of the environment it varied. WebArena uses evaluators tied to intent and resulting interface state for its simulated website tasks. OSWorld describes execution-based evaluation for its environment. Build the check around the user’s requested state rather than the model’s report that the goal was achieved.

Outcome evaluation inspects resulting state. For this mock, success requires task 2 to have state archived. Stronger predicates can check that other records retain their expected values and duplicate writes did not occur.

Trajectory evaluation checks how the state was reached. Count stale proposals, invalid references, denials and unexpected side effects. If a target was resolved but rejected for policy reasons, record that separately from grounding failure. An episode that reaches its final state through an unauthorized intermediate mutation still has a problem.

Robustness evaluation repeats the same task on versions with controlled changes. Vary labels and ordering separately when you want to isolate which change caused a failure. When a coverage fixture changes both together, it supports an observation about that combined variant. Compare fixture results with separately measured workloads. Passing two synthetic cases does not estimate success on the tasks a deployed client encounters.

Metrics that matter

Give every rate a unit and denominator. Task success divides completed tasks by attempted tasks under a stated budget and retry rule. A stale rate divides stale proposals by the eligible actions counted. Grounding accuracy needs verified intended targets and a clear treatment of abstention. A rate for allowed writes needs the relevant authorized operations as its denominator.

A model can succeed on one of several attempts. Report how many and whether the environment is reset between attempts. State whether later attempts benefit from feedback. Also keep latency by component, the number of human approvals, and any costs needed to interpret completion. Use the same workload and validation rule for each compared system.

Design the perturbations and the denominators together

Start with one frozen reference task and vary one factor at a time when the attribution matters. For example, compare a change in label wording at the same button position, and separately compare the same labels with the controls reordered. If both changes occur together, the experiment still answers whether the policy survives the combined variant. It cannot estimate the effects independently. The fixture below combines the changes so a label-aware policy has an authored resolution and a positional policy has a measurable failure.

Include a no-change control, such as the same interface rebuilt with fresh local element IDs. A policy should re-resolve current references even when the labels look identical. If an environment offers stable handles, specify what makes them stable and when the wrapper considers them invalid. For a warm restart test, the interesting signal can be whether the action is rejected after the environment has changed while the cached observation still exists.

For permission evaluation, construct paired cases that have the same visible state and action but different trusted grants. On one case the archive target is authorized. On the other it is not. A successful denial in the second case is the desired outcome, not a task failure to average away. Record both unauthorized change attempts and actual unauthorized effects. A system that correctly denies an attempt still gives you evidence about the policy’s proposal behavior.

The task metric gives an episode-level verdict, while the action metrics operate over a trajectory. A variant with one success after three actions and another with one failure after twelve actions cannot be pooled into a meaningful “13 good clicks” count. Separate rates by the event’s opportunity to occur, and show raw counts for small fixtures. Report the termination reason with the number of proposals processed.

Isolated failure-mode checks for a local task fixture.
Test conditionExpected guard or behaviorCheck at the end
Correct target on the current viewResolve and accept permitted actionsTarget task has the expected status
Reference from an earlier epochReject and issue a fresh view before the next proposalEarlier action made no change
Current reference for an already disabled controlReject despite an otherwise appropriate task grantExisting task status is preserved
Current archive on a different taskDeny a write outside the grantNo unauthorized record changed
Fixed position under a reordered dialogObserve repeated wrong outcomes and enforce a budgetArchive remains incomplete
Scope-limited compound taskResolve both permitted effects independentlyVerify both target records

Before evaluating a real model, pin the version and record the policy input. If the model or wrapper sees a user’s chosen notion of completion differently on two runs, the comparison is underspecified. The prompt can ask the policy for a stop action, but the environment must compute the official task outcome. For a compound task, record each required postcondition and any state that must remain unchanged. Otherwise a policy can finish only a subset and still look correct in a coarse success metric.

When a run ends, record the state known to the application. That matters independently of whether the agent emitted a final answer. A failed transport can hide a successful write, while a fluent message can falsely claim completion. When the environment supplies a reversible operation, test the actual replay or undo behavior separately. In this mock, archive changes one field and has no undo action. A broader wrapper would need a documented restoration operation before claiming reversal.

Measure time at the correct boundary

Latency has multiple causes. A busy view can make rendering and extraction slow. A long observation can take the model more time to process. A remote browser can add a transport round trip, and an accepted operation can wait on a backend. Record these components with monotonic timing and identify where the bounds apply. A step budget limits the number of model proposals. A deadline limits total elapsed time. The first does not guarantee the second if a single observation or action can hang.

For an end-to-end performance experiment, choose workload slices such as list lookup, form completion and a two-record update. Run multiple independent episodes with resettable state. Report the number of incomplete and denied episodes alongside their latencies, since measuring only fast successful runs can hide wasted time on failures. Report the policy version and environment version for every compared run. If operator assistance is required in one variant, record its time and decisions separately.

Choose how to count waiting. A model may ask the wrapper to re-observe instead of proposing a write. If you count those rounds in the episode budget, a slow-loading page consumes part of the same finite workload. If the adapter waits for a condition before reporting an observation, the task budget may remain unchanged, but elapsed time increases. Either policy can be suitable. The comparison must reveal which convention distributes the cost.

State identities and observation freshness

In the mock, rendering increments an epoch even if a screenshot or label list appears identical. That conservative choice makes a cached action reference unusable between responses. A real implementation might key an observation to a view, incremental document version or adapter-managed short-lived reference, depending on what it can trust. The returned status should indicate when a fresh observation is needed.

A check immediately before execution limits the use of known-old information. It does not ensure that the interface stays unchanged after the check. A real browser can react to timers, streaming data, other decisions by the user or backend writes. A local action map can give a truthful status about what it accepted and still leave the business result unknown. Where available, verify a record version at the mutation boundary and observe a source of state that reflects the actual outcome.

Watch the lifetime of cross-step conclusions. The agent may know it opened the correct task one step ago. If the page suddenly redirects to a search screen, that conclusion no longer establishes the current selection. A good trace shows whether the proposed record remained consistent across steps or relied on a stale implicit assumption. For an important write, record the verified current target near the operation rather than deriving it from old trace text alone.

A small harness

The label-based policy asks for one of two known confirmation labels. The position-based version chooses the second button in either view. The canonical view puts Archive second, while the reordered view puts Cancel second. Both use the same runtime grant and success predicate, so the difference is in target choice rather than write permission.

PythonIn [25]
CollapseExpand
def positional_policy(obs, history):
    if obs.page == "confirm":
        return Action(obs.epoch, "click", 1)
    return archive_policy(obs, history)
PythonIn [26]
CollapseExpand
def run_harness(policy):
    results = {}
    for variant in ("canonical", "reordered"):
        ok, trace = run_episode(
            MockApp(variant=variant), policy, archive_two, archived_two
        )
        results[variant] = {
            "success": ok,
            "actions": len(trace),
            "invalid": trace.count("invalid"),
            "stale": trace.count("stale"),
            "disabled": trace.count("disabled"),
            "denied": trace.count("denied"),
        }
    return results
PythonIn [27]
CollapseExpand
semantic_results = run_harness(archive_policy)

positional_results = run_harness(positional_policy)
ConsoleOut [28]
CollapseExpand
Semantic labels: {'canonical': {'success': True, 'actions': 3, 'invalid': 0, 'stale': 0, 'disabled': 0, 'denied': 0}, 'reordered': {'success': True, 'actions': 3, 'invalid': 0, 'stale': 0, 'disabled': 0, 'denied': 0}}
Fixed position: {'canonical': {'success': True, 'actions': 3, 'invalid': 0, 'stale': 0, 'disabled': 0, 'denied': 0}, 'reordered': {'success': False, 'actions': 12, 'invalid': 0, 'stale': 0, 'disabled': 0, 'denied': 0}}

The fixed-position policy loops in the reordered fixture until the step limit. Its proposals can have valid IDs and current epochs yet fail to complete the task. Invalid and stale action counts alone cannot diagnose grounding. The label policy succeeds in both authored conditions. It recognizes two known labels. A larger test should add unseen variants and preserve task identity and success meaning.

PythonIn [29]
CollapseExpand
import numpy as np

policy_names = ("Semantic labels", "Fixed position")
variant_names = ("Canonical view", "Reordered view")
OUTCOME_MATRIX = np.array(
    [
        [
            int(results[variant]["success"])
            for variant in ("canonical", "reordered")
        ]
        for results in (semantic_results, positional_results)
    ]
)
VisualizationOut [30]
CollapseExpand
A two-by-two result chart shows success in three conditions and budget exhaustion for the fixed-position policy in the reordered view.
A label-based policy succeeds in the canonical and reordered mocks. A fixed-position policy succeeds only in the canonical mock. Each cell is a single deterministic episode.

A separate check proposes Archive for the wrong task. The grant allows only task 2. Opening task 1 is an allowed read of the synthetic list. When the policy asks to archive it, execution returns a denial and task 1 stays open. This tests an authority boundary independently from whether the element was grounded correctly.

PythonIn [31]
CollapseExpand
def wrong_target_policy(obs, history):
    return choose(obs, "Open task 1" if obs.page == "tasks" else "Archive")


app = MockApp()

success, outcomes = run_episode(
    app, wrong_target_policy, archive_two, archived_two
)
ConsoleOut [32]
CollapseExpand
Out-of-scope change complete: False | outcomes: ('open', 'denied')
Task 1 still open: True

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy