LLM optimization for websites: cut what the model must read

This page is about optimising a website so language models can use it, not about quantising a model. If you came looking for inference cost, this is the other meaning of the phrase.

Scan a URL freeNo account, no card. You get the score and the fix list.

Your business

Products, services and policies

What is missing

Details a customer needs

A clearer answer

Information you can publish

Services page, bytes an agent reads
89.6%
docs/demo/agent-before-after-document.md (13,581 → 1,412 bytes)
Tokens saved on the same page
9.7×
docs/demo/agent-before-after-document.md

What optimising for an LLM actually means

A language model consuming your page is not browsing. It issues one HTTP request, receives bytes, converts them to tokens, and spends part of a finite context window on the result. Optimisation is therefore mostly subtraction: sending the same facts in far fewer tokens, with the important ones first.

PropertyWhy it decides the outcomeHow to check it
FetchableA blocked request cannot be optimisedRequest the URL as an agent would
Parseable without JSThe fetch runs no JavaScriptRead the raw response, not the DOM
SmallContext is finite and sharedCompare bytes with and without negotiation
Front-loadedTruncation and summarisation cut the tailFind the offset of the first real fact

What subtraction is worth

On the reference document capture, a services page went from 13,581 bytes to 1,412 and its first fact moved from character 10,152 to line 8. On the commerce capture, a product page went from 91,226 bytes to 1,315 with the first fact moving from character 23,185 to line 4. The facts were identical in both cases; only the packaging changed.

The two are quoted separately on purpose. A product page and a services page carry different amounts of chrome, so there is no honest single number between them, and a vendor quoting one average across all site types is telling you about their sample rather than about yours.

How the subtraction happens

Content negotiation, done at the edge. A request asking for markdown receives markdown assembled from values you already store; browsers and search crawlers receive exactly what they received before.

middleware.ts
import { gateway } from '@rebilder/gateway'

export default gateway({
  source: { kind: 'document', resolve: myPages },
})

What this does not do

Frequently asked questions

What is LLM optimization?

In a website context, making pages that language models can retrieve and afford to read: reachable without a blocked fetch, parseable without JavaScript, small in tokens, and front-loaded with the facts. In a machine-learning context the same phrase means making models cheaper to run, which is unrelated.

How do I optimize my website for LLMs?

Check that agent fetches are not blocked, serve the facts without requiring JavaScript, answer Accept: text/markdown so the response is a fraction of the HTML size, and move the first substantive fact to the top of each template.

How many tokens should a page be?

Fewer than it is now, in almost every case. There is no universal target because pages differ; the useful measurement is your own before-and-after, since that is the number that reflects your templates rather than someone else’s sample.

Does this require changing my CMS?

No. It runs as middleware in front of whatever you already have, and the SDK is free, unmetered and self-hostable with no framework dependency in the core.