Skip to content
Dev.to

HTML vs Markdown vs SOM: Which Format Should Your...

Every AI agent that browses the web faces the same question: how do you represent a web page to a language model? The default answer, raw HTML, is expensive and slow. A typical page dumps 30,000+ tokens into your context window, most of it CSS classes and layout divs. But what are the actual alternatives? And do they work? We ran WebTaskBench, 100 tasks across GPT-4o and Claude Sonnet 4, to find out. The results surprised us. The Three Representations When an agent needs to understand a web page
Read original on dev.to
0
0

Comment

Sign in to join the discussion.

Loading comments…

Related

Liked this? Start your own feed.

Your own feed is waiting.
0
0