CSE Roadmap

Specialist tier · about 5 hours · 4 parts

Part 2 of 4 · 14 min read

Definitions

Covers: Definitions; The pipeline; Results; Design rules; Interview questions, with the follow-ups; Common mistakes; What the example does not do.

Definitions

Multimodal model (LMM)

  • Multimodal model: a model that takes more than one kind of input (text, images, audio). A generative one is a large multimodal model.

DOM and accessibility tree

  • DOM: the page's element tree. Accessibility tree: a platform-provided list of interface elements, roles and names.

Grounding

  • Grounding: mapping an instruction ("click Save") to the exact element or screen location.

Set-of-mark prompting

  • Set-of-mark: drawing numbered boxes on a screenshot so the model answers with a mark number rather than coordinates.

Action space

  • Action space: the actions the agent may take (click, type, scroll, select), made available to the planner.

Explicit and implicit planning

  • Explicit: plan the whole sequence from the first state. Implicit: choose each action after seeing the latest state.

Normalised cross-correlation

  • Normalised cross-correlation (NCC): a score from -1 to 1 for how well a template matches an image window, ignoring brightness and contrast.

The pipeline

AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTo1MGJjZWY3NC1iODg2LTQzYzgtOGNkNS01NzZmMTcwOGVhNjYAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaKcOeZlNU01wH6wsxzP1Mo0AAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDpiNjhhM2VjOC1hNTI2LTRmZTgtOGZjMC1iODQ0MTEzM2JjOTNscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoZSvMoPG4A25zLBYYFueCHgAAAZljYm9yomdhY3Rpb25zgqJmYWN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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQJsdqM4T8s+NFF1CQxgX5pYaR1h5ijLs8FHA7mzUtCzbqtZSxvNtDPJtmxKhbDi1KLAPI6/q+u0nUJpNWtg1O4c=Template-matching grounder: click accuracy against button size, shrinking and noise (synthetic screens)Share of clicks inside the right button (80 trials per cell); pixel noise 0.1button sizeshrink 1xshrink 2xshrink 4xshrink 8x11 px1.000.990.230.0118 px1.001.000.880.2625 px1.001.001.000.8132 px1.001.001.000.99Matcher assuming aligned pixels (18 px buttons): shrink 2x 0.78 (phase search 1.00),shrink 4x 0.33 (phase search 0.88).Pixel noise, 18 px buttonsshrink 1xshrink 2xshrink 4xnoise 0.051.001.000.97noise 0.21.000.990.60noise 0.40.990.810.47Click lands in the button: size against coordinate error (pixels)error 2error 4error 8error 1611 px0.990.690.260.0718 px1.000.950.550.1825 px1.001.000.780.3232 px1.001.000.910.47Rounding coordinates to a coarse grid adds error of about0.58 px (2x shrink), 1.15 px (4x), 2.31 px (8x).Small targets break first: hitting an 11 px button 90% of the time needs coordinate error under about 3 px; a 32 px button tolerates about 8 px.This grounder is a pixel matcher given the exact template, not a language model. It shows what resolution and noise take away from any screenshot reader.It also shows why marks, zoom crops and element lists help: they turn precise coordinates into a choice among labelled candidates.
How resolution, button size and noise limit a screenshot grounder.

Results

Button size Full size Shrink 2x Shrink 4x Shrink 8x
11 px 1.00 0.99 0.23 0.01
18 px 1.00 1.00 0.88 0.26
25 px 1.00 1.00 1.00 0.81
32 px 1.00 1.00 1.00 0.99
18 px buttons Full size Shrink 2x Shrink 4x
Phase search, noise 0.05 1.00 1.00 0.97
Phase search, noise 0.1 1.00 1.00 0.88
Phase search, noise 0.2 1.00 0.99 0.60
Phase search, noise 0.4 0.99 0.81 0.47
Aligned-pixel template only, noise 0.1 1.00 0.78 0.33
Click error (pixels) 2 4 8 16
11 px button 0.99 0.69 0.26 0.07
18 px button 1.00 0.95 0.55 0.18
25 px button 1.00 1.00 0.78 0.32
32 px button 1.00 1.00 0.91 0.47
AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTo0NDdhMDY3Yy02MmMxLTRlODItYjViYS01OGRiMTFkODNmZTgAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaLNcTdMA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AAAAAAAPZYQMu+lJ5UBBIwGrZBWB8FF2+TYPxlA5PuamcIG47I8H8gKlmLXa1LqEwdyZJaLXH4wrh8zUO9er//Bw+s7ze1AHQ=Tokens, compounding errors and DOM coverage (arithmetic on assumed constants)Input tokens per step (28 px tiles, 4 characters per token, 150 elements, 30% interactive: all assumed)DOM, all 150 elements2,825DOM, interactive only848Screenshot 1280x8001,334Screenshot at half size345Screenshot at quarter size96Hybrid: filtered DOM + half screenshot1,193Ten-step task, input tokens and dollars at an assumed $3 per millionkeep every observationkeep only the latestdom filtered46,640 ($0.14)8,480 ($0.025)screenshot full73,370 ($0.22)13,340 ($0.04)screenshot half18,975 ($0.057)3,450 ($0.01)hybrid65,615 ($0.197)11,930 ($0.036)Task success: no retry / with retry (p = per-step success)p5 steps10 steps20 steps0.990.95 / 0.990.90 / 0.980.82 / 0.960.950.77 / 0.940.60 / 0.890.36 / 0.790.90.59 / 0.870.35 / 0.750.12 / 0.570.80.33 / 0.690.11 / 0.470.01 / 0.22DOM coverage and screenshot fallback50% in the DOMDOM only 0.49, hybrid 0.9380% in the DOMDOM only 0.78, hybrid 0.9695% in the DOMDOM only 0.93, hybrid 0.97100% in the DOMDOM only 0.98, hybrid 0.98Retry: a failure is noticed 80% of the time and retried once. DOM success 0.98 assumed; screenshot success 0.88 measured (18 px buttons, shrink 4x).
Tokens, compounding errors and DOM coverage.
Observation (assumed constants) Tokens per step Ten steps, keep all Ten steps, keep latest
DOM, interactive only 848 46,640 ($0.14) 8,480 ($0.025)
Screenshot 1280 x 800 1,334 73,370 ($0.22) 13,340 ($0.04)
Screenshot at half size 345 18,975 ($0.057) 3,450 ($0.01)
Hybrid (filtered DOM + half screenshot) 1,193 65,615 ($0.20) 11,930 ($0.036)
Per-step success 5 steps 10 steps 20 steps
0.99 (no retry / retry) 0.95 / 0.99 0.90 / 0.98 0.82 / 0.96
0.95 0.77 / 0.94 0.60 / 0.89 0.36 / 0.79
0.90 0.59 / 0.87 0.35 / 0.75 0.12 / 0.57
0.80 0.33 / 0.69 0.11 / 0.47 0.01 / 0.22
Share of targets in the DOM DOM only Hybrid (screenshot fallback 0.875)
50% 0.49 0.93
80% 0.78 0.96
95% 0.93 0.98
100% 0.98 0.98
  1. Resolution is a budget: shrinking a screenshot saves tokens and costs accuracy, and small targets pay first.
  2. Coordinates are fragile; choosing among marked elements is not.
  3. History dominates cost unless observations are dropped or summarised.
  4. Per-step reliability compounds, so verification and retry beat marginal model gains.
  5. The DOM is cheap and precise where it exists; a screenshot fallback covers the rest.

Design rules

  • Prefer text (DOM or accessibility tree) when it exposes the targets; add screenshots for visual or missing content.
  • Filter the DOM to interactive elements before sending it.
  • Annotate screenshots with marks and ask for a mark, not coordinates.
  • Size the screenshot to the smallest target you must hit; test at your real resolution.
  • Keep only the latest observation unless history is needed; summarise the rest.
  • Verify each action (expected change appeared) and retry once before escalating.
  • Set a token and step budget per task and log cost per task.
  • Sandbox, filter and confirm: isolated browser, redacted screenshots, least-privilege credentials, human approval for sensitive actions.
  • Treat page content as data, not instructions.

Interview questions, with the follow-ups

DOM, accessibility tree or screenshots for a web agent?

"The DOM is cheap and gives exact selectors, but it misses visual context and some widgets; screenshots work everywhere but cost tokens and lose fine detail. I filter the DOM to interactive elements and fall back to an annotated screenshot when the target is missing. In my arithmetic a filtered DOM was 848 tokens against 1,334 for a full screenshot, and a 50 percent DOM coverage cut DOM-only success to 0.49 while a hybrid held 0.93." Follow-up: "And on a desktop app?" Usually only screenshots or an OS accessibility API are available.

Why do computer-use agents fail, and how do you improve reliability?

"Errors compound: 0.95 per step is 0.60 after ten steps. Failures come from grounding (wrong element or coordinates), stale state and pop-ups. I narrow the choice with marks, verify each action's effect, retry once, and ask the user when confidence is low. In my toy, a check that caught 80 percent of failures lifted a 20-step task at 0.95 per step from 0.36 to 0.79." Follow-up: "What do you measure?" Success per step and per task, and which step types fail.

How do you control the cost and latency of a screenshot agent?

"Capture only when needed, shrink screenshots to the smallest size that still resolves the targets, drop old observations, cache the stable prefix and use a smaller model for routine steps. Keeping every screenshot makes tokens grow quadratically: 73,370 against 13,340 in my ten-step example." Follow-up: "What does shrinking cost?" In my experiment 18 px buttons stayed at 1.00 at 2x shrink but fell to 0.88 at 4x and 0.26 at 8x.

What are the security risks of a computer-use agent?

"Prompt injection through page content, credential exposure, third-party extensions, and screenshots that capture private data. I sandbox the browser, redact sensitive fields before storing captures, use short-lived least-privilege credentials, rate-limit, log actions, and require confirmation for sensitive actions." Follow-up: "Can the model be trusted to ignore injected text?" No; defences must be outside the model, such as permission checks on actions (earlier levels on guardrails).

Common mistakes

  • Sending the whole DOM instead of the interactive elements.
  • Asking a model for raw coordinates on small targets.
  • Shrinking screenshots without testing the smallest target.
  • Keeping every screenshot in the context.
  • No verification after an action.
  • Assuming the DOM covers every widget.
  • Letting page text act as instructions.
  • Reporting step accuracy as task accuracy.

What the example does not do

  • No language model: the grounder is a template matcher with the exact template; real models read text, handle layout and also err in ways unlike pixel noise.
  • Glyphs, not words: random binary patterns stand in for labels; real labels carry meaning, fonts and scale changes.
  • One screen at a time: no scrolling, pop-ups, dynamic content, drag, or multi-step state changes.
  • Independent steps in the compounding arithmetic; real failures correlate.
  • Assumed constants: tile size, characters per token, price, DOM success and failure-detection rates.
  • No security test, no real browser, no Playwright.
  • No audio or video; the module covers screens and images only.
  • Optional real experiment (I did not run this): pick a form-heavy site, run a Playwright agent three ways (DOM only, screenshot only, hybrid) on 30 tasks, and record success, steps, tokens and dollars.

Check yourself

Why does verifying every action matter more than a slightly better model? (Errors compound: at 0.95 per step, 20 steps succeed only 36 percent of the time. A check that notices 80 percent of failures and retries once lifts that to 79 percent.)

For the curious History is the hidden cost

Keeping every earlier screenshot in the context makes input tokens grow quadratically: a ten-step task used 73,370 tokens against 13,340 when only the latest was kept (about $0.22 against $0.04 at an assumed $3 per million). Small targets break first: with a pixel matcher, 11 px buttons failed once the screenshot was shrunk 4x. The matcher, the token constants and the screens are synthetic, so none of this measures a real multimodal model.

What you will use daily at work

Practice What it looks like
Prefer the DOM or accessibility tree when it exists Add a screenshot when it is incomplete or visual.
Keep only the latest observation Summarise the rest.
Verify each action's effect Then retry once.
Sandbox the agent and confirm sensitive actions Treat page content as untrusted input.

Draft: confirm which screenshot sizes and token costs your model provider documents, and your browser-automation tool's current limits.

What you must be able to say (one page)

  • What "multimodal" means here. A language model predicts the next token from text tokens; a multimodal model predicts it from text and image tokens (or other modalities). CLIP, trained on 400 million (image, text) pairs found on the internet, is an embedding model, not a generator, and embedding models like it are backbones of generative ones such as Flamingo and LLaVA.
  • A computer-use agent has three parts: an action planner (a model turning a task into interface actions), an action executor (Playwright for browsers, PyAutoGUI for desktops) and an interface representation (what the model sees). Planning is explicit (a full plan from the first state; good for static forms) or implicit (re-plan every step; good for dynamic pages such as flight booking).
  • Three ways to show the interface (see the token table in the results): text (the DOM, or accessibility APIs; cheap and precise, misses visual context and needs a text interface), image (screenshots; works with any interface, costs many tokens, loses small text) and hybrid (the usual recommendation for production web agents). Desktop and mobile apps often have no runtime text view, so screenshots are the only option. Set-of-mark prompting and OmniParser annotate the screenshot with numbered boxes so the model picks a mark instead of regressing coordinates.
  • Why a screenshot reader is fragile (my experiment). I generated synthetic screens of labelled buttons (glyph patterns stand in for text) and located a target with template matching, a pixel matcher given the exact template, not a language model. Clicks inside the correct button, at pixel noise 0.1 (80 trials per cell): 11 px buttons 1.00, 0.99, 0.23 and 0.01 at full size, 2x, 4x and 8x shrink; 18 px 1.00, 1.00, 0.88, 0.26; 25 px 1.00, 1.00, 1.00, 0.81; 32 px 1.00, 1.00, 1.00, 0.99. Small targets and low resolution break first.
  • Details matter. A matcher that assumed pixel-aligned buttons (18 px) fell to 0.78 at 2x shrink and 0.33 at 4x, against 1.00 and 0.88 when it searched over sub-pixel phases. Pixel noise at 18 px and 4x shrink: 0.97 at noise 0.05, 0.88 at 0.1, 0.60 at 0.2, 0.47 at 0.4. Each cell has 80 trials, so differences under about 5 points are not reliable.
  • Click precision. If the model outputs coordinates with Gaussian error sigma, P(hit) = erf(s / (2 sigma sqrt 2))^2 for a target of side s (checked by simulation, within 0.002). To hit an 11 px button 90 percent of the time you need sigma under about 3 px; a 32 px button tolerates about 8 px. Rounding to a grid of spacing f adds about f / sqrt 12 pixels (0.58 px at 2x, 1.15 at 4x, 2.31 at 8x). Marks, crops and element lists avoid this by turning coordinates into a choice.
  • Cost is a design constraint (treat cost as infrastructure: capture screenshots only when necessary and use smaller models for routine steps). With assumed constants (one token per 28 x 28 pixel tile, 4 characters per token, a page of 150 elements of which 30 percent are interactive): a 1280 x 800 screenshot is 1,334 tokens, at half size 345, at quarter size 96; the full DOM is about 2,825 tokens, the interactive-only DOM about 848, the hybrid (filtered DOM plus half-size screenshot) about 1,193.
  • History is the hidden cost. Keeping every earlier observation in the context makes input tokens grow quadratically: a ten-step task with full screenshots uses 73,370 tokens (about $0.22 at an assumed $3 per million) against 13,340 ($0.04) when only the latest is kept; half-size screenshots with only the latest use 3,450 ($0.01). Prompt caching (module 6) reduces the price of a repeated prefix but not the growth.
  • Errors compound. Task success is p^n for n independent steps: 0.95 per step gives 0.77 after 5, 0.60 after 10 and 0.36 after 20. With a check that notices 80 percent of failures and retries once, the same figures become 0.94, 0.89 and 0.79; at 0.99 per step, 20 steps give 0.82 without retries and 0.96 with them. Verification after each action is worth more than a slightly better model.
  • The DOM is not always there. If the DOM exposes only a share of targets (canvas widgets, custom components), DOM-only success falls with coverage: 0.49 at 50 percent coverage, 0.78 at 80, 0.93 at 95 (DOM success 0.98 assumed). A hybrid that falls back to a screenshot (0.875 in my experiment: 18 px buttons shrunk 4x) holds 0.927, 0.959, 0.975.
  • Security is part of the design: prompt injection through page HTML or rendered content, credential exposure, supply-chain risk from extensions. Common measures are sandboxing, filtering screenshots and DOM captures for sensitive data, audit logs, short-lived least-privilege credentials, rate limits and user confirmation for sensitive actions. I did not test any of this; the structure of my example cannot show it.
  • What to say in an interview: "I prefer the DOM or accessibility tree when it exists, add screenshots when it is incomplete or visual, annotate with marks so the model picks elements instead of coordinates, keep only the latest observation, verify every action's effect and retry once, budget tokens per task, and sandbox the agent and confirm sensitive actions."
  • Honest limits: synthetic screens with glyph labels, a pixel matcher rather than a multimodal model, no real pages, no DOM noise model beyond a coverage number, assumed token and price constants, and no test of any real agent's success rate.