| ▲ | apwheele 5 hours ago | |||||||||||||||||||||||||||||||
I think XML is good to know for prompting (similar to how <think></think> 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
Just doing something like:
Use case document processing/extraction (both with Haiku and OpenAI models), the latter example works much better than the XML.N of 1 anecdote anyway for one use case. | ||||||||||||||||||||||||||||||||
| ▲ | galaxyLogic 3 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
XML helps because it a) Lets you to describe structures b) Make a clear context-change which make it clear you are not "talking in XML" you are "talking about XML". 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. | ||||||||||||||||||||||||||||||||
| ▲ | ekjhgkejhgk 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
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? | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | marxisttemp 3 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
XML is much more readable than JSON, especially if your data has characters that are meaningful JSON syntax | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||