Ask a model for JSON and validate it, and the failure distribution is heavily skewed: most calls are fine, and a minority hand back something that does not parse or misses a required field. Three failure modes show up constantly once a pipeline is real: malformed parse, missing fields and ambiguous types such as a phone number returned as an integer that drops a leading zero the MLflow structured output guide.
The default response is to wrap the call in a retry. The problem is that a plain retry is the same prompt at the same temperature with roughly the same odds. You are paying for another round and hoping the dice land differently a practitioner writeup on feeding validation errors back into the retry. Retries also compound cost: a failure rate of 10 percent with two to three retries on average means paying 20 to 30 percent more for the same work, with end-to-end latency multiplied the Brightlume analysis of agent structured output failures.
That arithmetic is the argument for the wrapper. If a bad call out of every ten can be repaired by naming the one wrong field, the retry stops being a lottery ticket and becomes an edit.



