The common sequence is: write a prompt, look at the output, notice it does not match what your code expects, then add a sentence to the prompt. Repeat. The failure is structural. When you describe the contract in prose, the model has to infer field names, types and optionality from natural language, and there is nothing stopping it from choosing a synonym. Practitioners hit this constantly: a field the application calls status comes back as current_state, and the parser breaks Agenta's structured output guide. The Vellum example is the canonical case: a prompt asking for JSON only still gets the object wrapped in Markdown backticks, because the model learned that JSON appears inside code fences Vellum.
Write the schema first and the ambiguity disappears. A JSON Schema is a vocabulary that describes data types, required fields, format constraints and validation rules, so it acts as a blueprint rather than a suggestion PromptLayer. Every decision the model would otherwise guess at is already made: the key is spelled status, its type is string, and its values come from a fixed list.
There is a second cost to the reverse order: retries. A validation failure means another API call, another chance to fail differently, and added latency in a pipeline that another program is waiting on. When the model is told the exact shape up front, most of those cycles never happen. Once you accept that, the schema stops being a validation artifact at the end of the pipeline and becomes the design document at the start.



