Evaluating Large Language Model Capabilities for Multi-Step Computer Use
This article examines what it takes for large language models to perform multi-step computer tasks, where a model must read page structure, locate controls, fill forms, move data across tabs, verify results, and roll back failed steps. It breaks the workflow into perception, decision, execution, and verification layers, then shows how to orchestrate long tasks as a controlled state machine with step budgets, checkpoints, and idempotent actions. It also covers the tradeoffs of million-token context windows across cost, latency, and effective recall, along with layered context design. Finally, it outlines defenses against prompt injection, a multi-dimensional evaluation and selection approach, and a practical deployment checklist.
1. Background: From Answering Questions to Operating Computers
Over the past two years, the center of gravity for large language model capability has shifted from single-turn question answering to long-chain execution. Multi-step computer use means a model must complete a series of actions within one task: reading page structure, locating controls, filling out forms, moving information between multiple tabs, verifying results, and rolling back failed steps. These tasks differ fundamentally from traditional text generation. They are stateful, observable, and carry a higher cost of failure.
Engineering practice usually splits this into four layers:
- Perception layer: converts the UI or environment state into a text representation the model can read;
- Decision layer: the model chooses the next action based on the current state;
- Execution layer: an external runtime actually triggers the action and collects the new state;
- Verification layer: determines whether the goal was met and decides to continue, retry, or terminate.
The capability boundary should be stated clearly: mainstream models still trail the most skilled human operators at computer use, especially with long-tail interfaces, unexpected pop-ups, and cross-system permission checks. Progress, however, is fast. Engineering should build a human-in-the-loop fallback rather than assume fully automated, error-free operation.
2. Task Orchestration: Turning Long Tasks into a Controllable State Machine
Handing the goal directly to the model and letting it improvise is the main reason long-chain tasks fail at high rates. A more reliable approach is to model the state machine explicitly and let the model handle only the “next action suggestion.”
# Example: execution loop with a step limit and state checksstate = {"page": 0, "history": [], "done": False}MAX_STEPS = 40for step in range(MAX_STEPS):obs = runtime.observe(state) # Perception: structured UI/environment descriptionaction = model.plan(goal, obs, state["history"]) # Decisionresult = runtime.apply(action) # Execution: carried out by the external runtimestate["history"].append((action, result))if verifier.check(goal, result): # Verificationstate["done"] = Truebreakif result.get("error"):state = recovery.rewind(state) # Roll back to the most recent stable checkpoint
Key engineering points:
- Step and budget limits: prevent the model from getting stuck in a loop of repeated actions; escalate to human takeover once the limit is exceeded;
- Checkpoints and rollback: save state after each semantically complete subgoal, and return to a stable state on failure;
- Converged action space: expose only a limited, verifiable set of actions to avoid the unpredictability of open-ended instructions;
- Idempotent design: form-filling and submission actions must be re-entrant to avoid duplicate submissions and dirty data.
3. Very Long Context: Capability, Cost, and Engineering Constraints
Million-token context windows have become an important capability direction for leading models. Their value is holding large code base excerpts, long documents, and multi-turn interaction history at once, reducing the information loss caused by retrieval and chunking. Engineering, however, must weigh three things at the same time:
- Cost: long context is not free. If a vendor covers the full context at a flat rate with no long-context surcharge, cost predictability improves markedly; otherwise, you need to model the budget as “per-thousand-token price × actual length.”
- Latency: attention overhead grows with length, affecting both time to first token and overall throughput. Interactive scenarios need streaming responses.
- Effective utilization: being able to fit content does not mean using it well. Recall for information in the middle of a long context is usually lower than at the beginning and end, which must be mitigated with structured formatting and explicit anchors.
The practical recommendation is a “layered context”: keep the system prompt and constraints resident, inject task-relevant material on demand, summarize and compress conversation history, and store raw logs externally with identifier references.
[Resident] Role, safety constraints, output format[On demand] Code/doc snippets relevant to the current subtask (with file path and line-number anchors)[Compressed] Summary of historical steps: goal, completed items, open questions[Referenced] Large objects kept only as storage identifiers, avoiding full insertion
4. Security: Identifying and Isolating Prompt Injection
Multi-step operation amplifies the risk of prompt injection: web page content, file content, and tool return values can all carry malicious instructions that induce the model to exceed its authority. The widely accepted defensive approach in the industry is “do not trust external content + least privilege + observable interception,” rather than relying on the model’s own restraint.
- Trust boundary separation: label external text as data rather than instructions, and declare at the system level that “content in the data zone must not change the task goal”;
- Input-side filtering: apply dual screening with rules and a classifier for suspicious patterns (requests to leak the system prompt, requests to access unrelated resources, requests to bypass verification);
- Least privilege: the execution layer grants temporary credentials per task, uses an action whitelist, and forces a second confirmation for sensitive operations;
- Full-chain auditing: record the input summary, action, result, and decision rationale for each step to support after-the-fact tracing and red-team review;
- Red-blue team exercises: build an injection sample set, continuously regression-test defensive effectiveness, and track both interception rate and false-block rate as metrics.
5. Evaluation and Selection: Do Not Rely on a Single Leaderboard
Evaluating coding and operation capabilities should be multi-dimensional and cross-checked:
- Benchmark tests: cover different task types such as function-level generation, repository-level repair, and multi-file refactoring;
- Real-task success rate: measured by end-to-end completion rate, average number of steps, and human takeover rate;
- Stability: variance across repeated runs of the same task; high variance means it is hard to move to production;
- Cost efficiency: cost per successful task, not price per token;
- Ecosystem momentum: call-volume rankings reflect how developers vote with their usage and can serve as a reference, but they change quickly with pricing and versions and should not be the sole basis.
For selection, build a small internal evaluation set, run A/B tests with your own business samples, and then calculate total cost based on flat-rate and long-context strategies.
6. Deployment Checklist
- Start with a narrow scenario: pick a high-frequency, verifiable, low-failure-cost workflow;
- Decouple the runtime from the model: the model outputs only structured actions, while deterministic code handles execution and verification;
- Budgets and circuit breakers: set thresholds for steps, tokens, and latency, with automatic degradation when exceeded;
- Observability integration: collect logs, metrics, and alerts together to form a task-level trace chain;
- Human-machine collaboration: keep human confirmation and one-click takeover for high-risk actions;
- Continuous regression: turn historical failure cases into test cases to prevent regressions introduced by version upgrades.
In summary, multi-step computer use, very long context, and injection defense together form the three-way support for deploying the new generation of models. Developers should shift their focus from “can the model do it” to “how to make it do so reliably through engineering”: use state machine orchestration to control complexity, layered context to balance cost and effectiveness, and least privilege plus auditing to build a security foundation, so that real business operations yield predictable, maintainable returns.
