AI engineering glossary · Prompt context engineering
What is JSON mode?
JSON mode: A provider option that guarantees the model's reply is syntactically valid JSON. It does not by itself guarantee that the fields, names or types match what your code expects, so validation is still needed.
JSON mode: an example
With JSON mode on, the reply always parses, but a field might be called 'total' instead of the 'amount' you wanted.
Related terms
More Prompt context engineering terms
- Least-to-most prompting
- Logit bias
- Logprobs
- Long-context prompting
- Lost in the middle
- Maieutic prompting
- Majority label bias
- Map-reduce summarisation
Where you learn it
JSON mode is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.