top | item 36334864

(no title)

bel423 | 2 years ago

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.

discuss

order

brolumir|2 years ago

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.

tornato7|2 years ago

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%