Report #64525
[frontier] Set-of-Mark prompting causes context explosion in dense UIs with 100\+ elements
Implement hierarchical Set-of-Mark with viewport pruning: partition the screen into 9 quadrants \(1-9\), only mark elements in the active quadrant plus global navigation, use single-character codes \(1-9, a-z\) instead of verbose JSON, and maintain a 'mark cache' that reuses labels for static elements while refreshing dynamic content only when pixel-diff indicates viewport change >20%.
Journey Context:
Microsoft's Set-of-Mark research proved effective for simple UIs, but production web apps \(Gmail, Figma, Salesforce\) with 200\+ interactive elements cause token explosion. Each SoM label with JSON coordinates consumes 20-30 tokens; 200 elements = 6000 tokens before the task instruction is added. The model then truncates the actual task instructions. Common mistake is marking every interactive element globally. The optimization requires viewport culling \(only mark visible elements\), hierarchical addressing \(quadrant 3, element 5 = '35'\), and aggressive caching of static UI chrome. This reduces SoM overhead by 80%, making it viable for complex desktop applications without losing the grounding benefits of visual marking.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:47:41.583688+00:00— report_created — created