Live data from Hacker News

Why XML tags are so fundamental to Claude

glthr.com

51–60 of 160 posts

Re: Why XML tags are so fundamental to Claude

#51
I am unconvinced.

To me it seems like handling symbols that start and end sequences that could contain further start and end symbols is a difficult case.

Humans can't do this very well either, we use visual aids such as indentation, synax hilighting or resort to just plain counting of levels.

Obviously it's easy to throw parameters and training at the problem, you can easily synthetically generate all the XML training data you want.

I can't help but think that training data should have a metadata token per content token. A way to encode the known information about each token that is not represented in the literal text.

Especially tagging tokens explicitly as fiction, code, code from a known working project, something generated by itself, something provided by the user.

While it might be fighting the bitter lesson, I think for explicitly structured data there should be benefits. I'd even go as far to suggest the metadata could handle nesting if it contained dimensions that performed rope operations to keep track of the depth.

If you had such a metadata stream per token there's also the possibility of fine tuning instruction models to only follow instructions with a 'said by user' metadata, and then at inference time filter out that particular metadata signal from all other inputs.

It seems like that would make prompt injection much harder.

Re: Why XML tags are so fundamental to Claude

#53

> 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.

If you think XML is old tech, wait until you hear of EDI, still powering Walmart and Amazon logistics. XML came in like a wrecking ball with its self-documenting promise designed to replace that cryptic pesky payload called EDI. XML promised to solve world hunger. It spawned SOAP, XML over RPC, DOM, DTD, the heyday was beautiful and Microsoft was leading the charge. C# was also right around this time. Consulting firms were bloomed charged with delivering the asynchronous revolution, the loosely coupled messaging promises of XML. I think it succeeded and it’s now quietly in the halls of warehouse having a beer or two with its older cousin the Electronic Data Interchange aka EDI.

Re: Why XML tags are so fundamental to Claude

#54
post #51

I am unconvinced. To me it seems like handling symbols that start and end sequences that could contain further start and end symbols is a difficult case. Humans can't do this very well either, we use visual aids such as indentation, synax hilighting or resort to just plain counting of levels. Obviously it's easy to throw parameters and training at the problem, you can easily synthetically generate all the XML trainin…

Transformers look like perfect tech for keeping track of how deep and inside of what we are at the moment.

Re: Why XML tags are so fundamental to Claude

#58

Amazing how an entire profession that until yesterday would pride itself on precision, clarity (in thought and in writing), efficiency, and formality, has now descended into complete quackery.

Are you talking about the office of the president of the united states?

This vague posting is kind dumb.

Re: Why XML tags are so fundamental to Claude

#59
post #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.

XML has been "spooky old technology" for over a decade now. It's heyday was something like 2002. 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.

20 years old means 1980!

Re: Why XML tags are so fundamental to Claude

#60
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…

XML is a bit more special/first class to Claude because it uses XML for tool calling:

                                                        
      /path/to/file             
      100                          
      50                            
    
I'm sure Claude can handle any delimiter and pseudo markup you throw at it, but one benefit of XML delimiters over quotation marks is that you repeat the delimiter name at the end, which I'd imagine might help if its contents are long (it certainly helps humans).
Post reply on HN