Are there output formats that are more reliable (better adherence to the schema, easier to get parse-able output) or cheaper (fewer tokens) than JSON? YAML has its own problems and TOML isn't widely adopted, but they both seem like they would be easier to generate.What have folks tried?
marquesine|1 month ago
https://github.com/toon-format/toon
koakuma-chan|1 month ago
prats226|1 month ago
greiskul|1 month ago
So maybe an interesting file to have the LLM generate is instead of the final file, a program that creates the final file? Now there is the problem of security of course, the program the LLM generates would need to be sandboxed properly, and time constrained to prevent DOS attacks or explosive output sizes, not to mention the cpu usage of the final result, but quality wise, would it be better?
kaaloo|1 month ago
tlarkworthy|1 month ago
XML is better for code, and for code parts in particular I enforce a cdata[[ part so there LLM is pretty free to do anything without escaping.
OpenAI API lets you do regex structured output and it's much better than JSON for code.
psadri|1 month ago
orbital-decay|1 month ago
max2|1 month ago