So, if you only consider constrained decoding (JSON-Schema), performance decreases across the board vs. NL.
Given this result and the key sorting issue, I'd suggest avoiding using JSON-Schema, unless you really need to. JSON-Prompt seems like a better alternative.
Given this result and the key sorting issue, I'd suggest avoiding using JSON-Schema, unless you really need to. JSON-Prompt seems like a better alternative.
Comments
For now, there are no clear guidelines on where each method works better.
Your best bet is testing your LLM running your own evals.
and the github code: https://github.com/dylanjcastillo/blog/tree/main/_extras/gemini-structured-outputs