4 ms·
> necessary to get the model to behave Don't I know it. Despite my telling GPT-4 to ONLY respond as valid, well-formed JSON it keeps coming back with things l
by Zelphyr 3y ago
> necessary to get the model to behave
Don't I know it. Despite my telling GPT-4 to ONLY respond as valid, well-formed JSON it keeps coming back with things like, "I'm not able to process external files but if I could, this is what the JSON would look like: []"
- enobrev 3y agoWith a recent project, I was _moderately_ successful by providing a jsonschema to follow for the response. I still had to sanitize the json a bit, but the fixes were minor and the resulting data otherwise fit the schema well.
- hhh 3y agowhy don’t you use the new JSON mode?
- minimaxir 3y agotl;dr the JSON mode is functionally useless and is made completely redundant by function calling / structured data if you really really need JSON output.
- kristjansson 3y agoIt'll do that. Just look for the largest substring that's valid JSON in the response.