Live data from Hacker News

Why XML tags are so fundamental to Claude

glthr.com

31–40 of 160 posts

Re: Why XML tags are so fundamental to Claude

#31

Total tangent, but what vagary of HTML (or the Brave Browser, which I'm using here) causes words to be split in very odd places? The "inspect" devtools certainly didn't show anything unusual to me. (Edit: Chrome, MS Edge, and Firefox do the same thing. I also notice they're all links; wonder if that has something to do with it.) https://i.imgur.com/HGa0i3m.png

CSS on the tags: word-break: break-all;

[deleted]

Re: Why XML tags are so fundamental to Claude

#33

Sounds like as 1. XML is the cleanest/best quality training data (especially compared to PDF/HTML) 2. It follows that a user providing semantic tags in XML format can get best training alignment (hence best results). Shame they haven't quantified this assertion here.

Makes sense

Re: Why XML tags are so fundamental to Claude

#34
post #28

The thesis here seems to be that delimiters provide important context for Claude, and for that putpose we should use XML. The article even references English's built-in delimiter, the quotation mark, which is reprented as a token for Claude, part of its training data. So are we sure the lesson isn't simply to leverage delimiters, such as quotation marks, in prompts, period? The article doesn't identify any way in whi…

Except quotation marks look like regular text. I regularly use quotes in prompts for, ya know, quotes.

Re: Why XML tags are so fundamental to Claude

#35
post #28

The thesis here seems to be that delimiters provide important context for Claude, and for that putpose we should use XML. The article even references English's built-in delimiter, the quotation mark, which is reprented as a token for Claude, part of its training data. So are we sure the lesson isn't simply to leverage delimiters, such as quotation marks, in prompts, period? The article doesn't identify any way in whi…

Except quotation marks look like regular text. I regularly use quotes in prompts for, ya know, quotes.

The GP isn't suggesting to literally use quotes as the delimiter when prompting LLMs. They're pointing out that we humans already use delimiters in our natural language (quotation marks to delimit quotes). They're suggesting that delimiters of any kind may be helpful in the context of LLM prompting, which to me makes intuitive sense. That Claude is using XML is merely a convention.

Re: Why XML tags are so fundamental to Claude

#36

That first image, “Structure Prompts with XML”, just screams AI-written. The bullet lists don’t line up, the numbering starts at (2), random bolding. Why would anyone trust hallucinated documentation for prompting? At least with AI-generated software documentation, the context is the code itself, being regurgitated into bulleted english. But for instructions on using the LLM itself, it seems pretty lazy to not hand-t…

There must be an OpenClaw YouTube video helping people post to hacker news, or something, because the front page is overrun with AI slop like this article, that makes no sense anyway. The author literally has no idea what any of this stuff means.

Re: Why XML tags are so fundamental to Claude

#37

This isn’t surprising: XML’s core purpose was to simplify SGML for a wider breadth of applications on the web. HTML also descended from SGML, and it’s hard to imagine a more deeply grooved structure in these models, given their training data. So if you want to annotate text with semantics in a way models will understand…

XML and HTML are SGMLs

HTML diverged from SGML pretty early on. Various standards over the years have attempted to specify it as an application of SGML but in practice almost nobody properly conformed to those standards. HTML5 gave up the pretence entirely.

Re: Why XML tags are so fundamental to Claude

#38

Total tangent, but what vagary of HTML (or the Brave Browser, which I'm using here) causes words to be split in very odd places? The "inspect" devtools certainly didn't show anything unusual to me. (Edit: Chrome, MS Edge, and Firefox do the same thing. I also notice they're all links; wonder if that has something to do with it.) https://i.imgur.com/HGa0i3m.png

It's an error in the site's CSS. CSS has way better methods, like splitting words correctly depending on the language and hyphenating it.

Although I can never remember the correct incantation, should be easy for LLMs.

Post reply on HN