by zora_goron · 2y ago · 0 comments
>> “you've tried response_format: "json" and function calling and been disappointed by the results”
Can anyone share any examples of disappointments or issues with these techniques? Overall I’ve been pretty happy with JSON mode via OpenAI API so I’m curious to hear about any drawbacks with it.
forcing those parts to be json, can be hard and unnecessarily constrain the model. e.g. https://www.promptfiddle.com/Chain-of-Thought-KcSBh
try pressing run tests and you'll see what i mean! this method or doing chain of thought works a bit better
- Return a single object instead of an array of objects
- Return an array of a single object instead of just the object
On the other hand I personally haven't seen it give malformed JSON; the JSON is well-formed but not compliant with the schema we specified.
fyi, we actually fix those specific errors in our parser :)