Why Markdown is the best format to feed an LLM
If you've ever pasted a page's HTML into a prompt, you've seen the problem: most of the tokens are navigation, scripts and class names. The model has to dig for the content, and you pay for every token it ignores.
What we measured
We took 500 question-answer pairs grounded in real web pages and gave each model the same page three ways: raw HTML, extracted plain text, and Quotient's Markdown.
- Markdown used 67% fewer tokens than raw HTML on average
- Answer accuracy improved by 9 to 14 points depending on the model
- Plain text lost tables and lists, which hurt questions about specs and prices
Why structure matters
Headings, lists and tables carry meaning. Markdown keeps that structure in a form models have seen billions of times during training, without the noise of HTML attributes.
Jules Ellis
Research, Quotient