Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indeed! But seemingly only for the actual object representation - it's a start, and I wonder if JSON is uniquely suited to LLMs because it's so text-first.


I think JSON is preferred because it adds more complexity.


I think it works because json is verbose and reinforces what everything is in each record.


From this point of view XML offers all that and named brackets.


True. Even better with inline attributes.


I Wanna Be <![CDATA[ Sung to the tune of “I Wanna Be Sedated”, with apologies to The Ramones. ]]>

https://donhopkins.medium.com/i-wanna-be-cdata-3406e14d4f21


Hey, at least they didn't use yaml-rpc.


toml-rpc anyone? :)


I understand those with experience have found that XML works better because it's more redundant.


Is it the redundancy? Or is it because markup is a more natural way to annotate language, which obviously is what LLMs are all about?

Genuinely curious, I don’t know the answer. But intuitively JSON is nice for easy to read payloads for transport but to be able to provide rich context around specific parts of text seems right up XML’s alley?


The lack of inline context is a failing of JSON and a very useful feature of XML.

Two simple but useful examples would be inline markup to define a series of numbers as a date or telephone number or a particular phrase tagged as being a different language from the main document. Inline semantic tags would let LLMs better understand the context of those tokens. JSON can't really do that while it's a native aspect of XML.


Or is is because most text in existence is XML - or more specifically HTML.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: