Structured Outputs

Key idea: A model can return the right information in a shape your code can't read. Enforce a schema so every reply parses, and describe the tricky fields so the values come back right.

Could the app use it?

Run a setting to add it here

  1. Run Plain words. The model got the information, so why couldn't the app read a single reply?
  2. Run Schema in prompt on Fast, then on Smart. Why does spelling out the shape work for one model and not the other?
  3. Run Enforced on Smart. Every reply parses, so what went wrong in the ones marked wrong?
  4. Run Enforced + descriptions. What did one line per field fix that the schema alone couldn't?
SchemaoffEmail12 sales emailsModelextracts the orderministral-8bReplytext the model sentApp codeJSON.parse + checksSaved orderright values?
Press Run to watch it run

Results

Run the emails to see each reply.

Behind the scenes

Run it and every email, the model's reply, and what the app made of it will show up here.