/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Every Way to Get Structured Output from LLMs
(www.boundaryml.com)
169 points
constantinum
| 1 comments |
18 Jun 24 04:01 UTC
|
HN request time: 0s
|
source
Show context
CraftingLinks
◴[
18 Jun 24 06:55 UTC
]
No.
40714816
[source]
▶
>>40713952 (OP)
#
We just use openai function calls (tools) and then use Pydantic to verify the JSON. When validation fails we try the prompt again.
replies(2):
>>40714832
#
>>40715169
#
1.
knallfrosch
◴[
18 Jun 24 07:52 UTC
]
No.
40715169
[source]
▶
>>40714816
#
Same here. I send a JSON schema along with the prompt to ChatGPT as function_call and then verify with NodeJS + Ajv against the same schema again.
ID:
GO
↑