Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Every Way to Get Structured Output from LLMs. Parent comment
- keys without strings
- coercing singular types -> arrays when the response requires an array
- removing any prefix or suffix tags
- picking the best of many JSON candidates in a string
- unescaped newlines + quotes so "afds"asdf" converts to "afds\"asdf"
In terms of models, honestly, we tried as bad as llama2, and it seems to work in quite a few use cases
- keys without strings
- coercing singular types -> arrays when the response requires an array
- removing any prefix or suffix tags
- picking the best of many JSON candidates in a string
- unescaped newlines + quotes so "afds"asdf" converts to "afds\"asdf"
In terms of models, honestly, we tried as bad as llama2, and it seems to work in quite a few use cases