3 ms·
I don't know if the XML is better than JSON thing still holds with this year's frontier models, but it was definitely a thing last year. Here's Anthropic's docu
by simonw 1y ago
I don't know if the XML is better than JSON thing still holds with this year's frontier models, but it was definitely a thing last year. Here's Anthropic's documentation about that: https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags https://docs.claude.com/en/docs/build-with-claude/prompt-eng...
Note that they don't actually suggest that the XML needs to be VALID!
My guess was that JSON requires more characters to be escaped than XML-ish syntax does, plus matching opening and closing tags makes it a little easier for the LLM not to lose track of which string corresponds to which key.
- bird0861 1y agothe Qwen team is still all in on XML and they make a good case for it
- roflcopter69 1y agoCan you please provide a source? I'd love to know their exact reasoning and/or evidence that XML is the way to go.
- bird0861 1y agoafaik this was true by Q3-30BA3B and Qwen Code's release; it caused some backends to have trouble doing tool calling