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…
You just hallucinated the content is AI generated.
Why XML tags are so fundamental to Claude
21–30 of 160 posts
Re: Why XML tags are so fundamental to Claude
#22Total 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
word-break: break-all;
Re: Why XML tags are so fundamental to Claude
#23I 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…
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?
Re: Why XML tags are so fundamental to Claude
#24Total 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
Re: Why XML tags are so fundamental to Claude
#25This 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…
Re: Why XML tags are so fundamental to Claude
#26Re: Why XML tags are so fundamental to Claude
#27I 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…
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?
Re: Why XML tags are so fundamental to Claude
#28The 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 which XML is superior to quotation marks in scenarios requiring the type of disambiguation quotation marks provide.
Rather, the example XML tags shown seem to be serving as a shorthand for notating sections of the prompt ("treat this part of the prompt in this particular way"). That's useful, but seems to be addressing concerns that are separate from those contemplated by the author.
Re: Why XML tags are so fundamental to Claude
#29Re: Why XML tags are so fundamental to Claude
#30To be realistic, this design needs more weirdly sexual etsy garbage, “one weird tip,” and “punch the monkey”