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
Why XML tags are so fundamental to Claude
41–50 of 160 posts
Re: Why XML tags are so fundamental to Claude
#42> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.
Re: Why XML tags are so fundamental to Claude
#43I think XML is good to know for prompting (similar to how was popular for outputs, you can do that for other sections). But I have had much better experience just writing JSON and using line breaks, colons, etc. to demarcate sections. E.g. instead of .... ..... .... ... .... {actual input} Just doing something like: ...instructions... input: .... output: {..json here} ...maybe further instructions... input: {actual i…
Re: Why XML tags are so fundamental to Claude
#44> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.
Nobody dares advertise the XML capabilities of their product (which back then everybody did), nobody considers it either hot new thing (like back then) or mature - just obsolete enterprise shit.
It's about as popular now as J2EE, except to people that think "10 years ago" means 1999.
Re: Why XML tags are so fundamental to Claude
#45Re: Why XML tags are so fundamental to Claude
#46> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.
For Web markup, as an industry we tried XHTML (HTML that was strictly XML) for a while, and that didn't stick, and now we have HTML5 which is much more lenient as it doesn't even require closing tags in some cases.
For data exchange, people vastly prefer JSON as an exchange format for its simplicity, or protobuf and friends for their efficiency.
As a configuration format, it has been vastly overtaken by YAML, TOML, and INI, due to their content-forward syntax.
Having said all this I know there are some popular tools that use XML like ClickHouse, Apple's launchd, ROS, etc. but these are relatively niche compared to (e.g.) HTML
Re: Why XML tags are so fundamental to Claude
#47I think XML is good to know for prompting (similar to how was popular for outputs, you can do that for other sections). But I have had much better experience just writing JSON and using line breaks, colons, etc. to demarcate sections. E.g. instead of .... ..... .... ... .... {actual input} Just doing something like: ...instructions... input: .... output: {..json here} ...maybe further instructions... input: {actual i…
I assume you are right too, JSON is a less verbose format which allows you to express any structure you can express in XML, and should be as easy for AI to parse. Although that probably depends on the training data too.
I recently asked AI why .md files are so prevalent with agentic AI and the answer is ... because .md files also express structure, like headers and lists.
Again, depends on what the AI has been trained on.
I would go with JSON, or some version of it which would also allow comments.
Re: Why XML tags are so fundamental to Claude
#48I think XML is good to know for prompting (similar to how was popular for outputs, you can do that for other sections). But I have had much better experience just writing JSON and using line breaks, colons, etc. to demarcate sections. E.g. instead of .... ..... .... ... .... {actual input} Just doing something like: ...instructions... input: .... output: {..json here} ...maybe further instructions... input: {actual i…
XML is much more readable than JSON, especially if your data has characters that are meaningful JSON syntax
But I'd be happy to hear about studies that show evidence for XML being more readable, than JSON.
Re: Why XML tags are so fundamental to Claude
#49Re: Why XML tags are so fundamental to Claude
#50Earlier quoted context omitted.
Could you clarify, do those tags need to be tags which exist and we need to lear about them and how to use them? Or we can put inside them whatever we want and just by virtue of being tags, Claude understands them in a special way?
They probably don’t need to be specific values. The model is fine tuned to see the tags as signals and then interprets them