YAML is just as effective at communicating data structure to the model while using ~50% less tokens. I now convert all my JSON to YAML before feeding it to GPT API's
I would recommend the exact opposite, JSON is just as effective while using less tokens.
This example JSON:
{"glossary":{"title":"example glossary","GlossDiv":{"title":"S","GlossList":{"GlossEntry":{"ID":"SGML","SortAs":"SGML","GlossTerm":"Standard Generalized Markup Language","Acronym":"SGML","Abbrev":"ISO 8879:1986","GlossDef":{"para":"A meta-markup language, used to create markup languages such as DocBook.","GlossSeeAlso":["GML","XML"]},"GlossSee":"markup"}}}}}
Is 112 tokens, and the corresponding YAML (which I won't paste) is 206.
What am I missing?
I have absolutely no proof but sometimes feel like the responses I get are weaker if there is no white space in the structured data.