News for hackers. Stuff that matters.
Re:Native JSON Output from GPT-4 by bel423 on Wednesday June 14, 2023 @08:30PM (#36334864)
Did people really struggle with getting JSON outputs from GPT4. You can literally do it zero shot by just saying match this typescript type.

GPT3.5 would output perfect JSON with a single example.

I have no idea why people are talking about this like it’s a new development.

Re:Native JSON Output from GPT-4 by brolumir on Wednesday June 14, 2023 @08:34PM (#36334894)
Unfortunately, in practice that works only most of the time. At least in our experience (and the article says something similar) sometimes ChatGPT would return something completely different when JSON-formatted response would be expected.
Re:Native JSON Output from GPT-4 by blamy on Wednesday June 14, 2023 @09:04PM (#36335099)
I've been using the same prompts for months and have never seen this happen on 3.5-turbo let alone 4.

https://gist.github.com/BLamy/244eec016beb9ad8ed48cf61fd2054...

Re:Native JSON Output from GPT-4 by tornato7 on Wednesday June 14, 2023 @09:12PM (#36335163)
In my experience if you set the temperature to zero it works 99.9% of the time, and then you can just add retry logic for the remaining 0.1%