News for hackers. Stuff that matters.
Re:Show HN: LLMs can generate valid JSON 100% of the time by msp26 on Tuesday August 15, 2023 @06:01AM (#37132041)
>I can make GPT4 return valid JSON simply by providing examples in the system message. This works nine times out of ten

But you can do both. For my current use case of extracting information from articles, I have a json schema + one/two example articles along with their correct answers. This increases token costs but 3.5 is so cheap that it doesn't matter and for 4 you can use batching to decrease token cost per article.

Re:Show HN: LLMs can generate valid JSON 100% of the time by vsrinivasan on Tuesday August 15, 2023 @07:23AM (#37132555)
Can you please explain what is batching ? any pointers?