Structured output
Real situations from building agents - with the answer and why.
- You need reliable JSON from the model to feed a downstream service.
- About 2% of responses come back as JSON with a trailing comma or a stray note before the object, and your pipeline crashes on them.
- You need three fields from the model.
- The model hit the token limit halfway through a JSON object.
- Your classifier uses DeepSeek’s JSON mode.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.