I'm a little bit out of the loop... How and why would you serve markdown content for LLMs?
4Brendan Long
Markdown has a lot fewer tokens since it's less verbose and is usually just the text in a page (on some pages the actual text is a minority of the bytes). LLM tooling typically requests the Markdown version of pages (with a fallback to HTML), and the easiest way to support that is with HTTP-to-Markdown processing like what Cloudflare does.
And people who write their blogs in Markdown anyway sometimes just serve that version. I assume that's what Gwern is doing, and I'm considering doing it this way too.
sometimes just serve that version. I assume that’s what Gwern is doing
Correct. I serve Markdown in two ways: first, every page includes the HTML-standardized metadata, which points to the Markdown file version of pages (using a simple template line: <link rel="alternate" type="text/markdown" href="https://gwern.net$url$.md" title="Markdown source of ‘$title-plain$’ page">); second, I support standard HTTP content-negotiation, so any HTTP request which header specifies anywhere in it that it would accept a text/markdown or text/plain result will th... (read more)