Structured outputs is a feature of AI APIs that forces an LLM to answer with JSON that follows a schema you define: which fields go in, of what type and which are required. The model still writes token by token, but it can only write what the schema allows. The shape is guaranteed; being correct is not.
📥State and questions→📦One request→🏷️Values and probabilities
Put it to the test
A question from the app. Pick an answer.
Jev is an AI model that does not write: it picks an option or gives a score, with probabilities.
Jev always answers with the type you asked for. So is it always right?
What is guaranteed is the format: it picks a valid option. Being the right one is another matter.
That is why it gives its probability: when unsure, your code can ask a person or an LLM for help.
High confidence does not certify being right. A probability is not a promise.
If your schema asks for an "area" field that is sales, support or billing, in strict mode the LLM returns one of the three, never "Sales!!" or a paragraph. You still have to handle the cases where the model refuses or the answer gets cut off. And whether it picked the right area is another matter: you check that by testing with real cases.
It is not the same as JSON mode
In the OpenAI API, JSON mode only ensures the answer is valid JSON, of any shape. Structured outputs also ensure it follows your schema. Other providers have something similar with other names and rules: check the docs of the one you use.
Structured outputs or a deciding model
It is useful when the answer has several fields or free text: pulling the data out of an invoice, or a classification with an explanation next to it. If you only need to choose between fixed options or a yes or no, a deciding model, like the Decisions API or Jev, also returns the probability of each option. For those answers, OpenAI recommends its Decisions API.