When Retry Helps (and When It Can't)
Great for format errors; useless for missing data.
The Retry Reflex
When a model's output fails validation, the tempting move is to just try again. Sometimes that works beautifully. Sometimes it burns tokens and latency for nothing.
As an architect, your job is to know which failure you are looking at before you wire up a retry loop. Retry is a precision tool, not a blanket safety net.
This lesson draws a hard line: retry is excellent for format and structural errors, and useless when the needed information is simply absent from the source.
Two Very Different Failures
Extraction and structured-output pipelines fail in two fundamentally different ways:
- Format / structural / arithmetic errors — the answer exists in the source, but the model rendered it wrong: invalid JSON, a missing required field it actually had data for, a total that doesn't add up.
- Absent information — the source document simply does not contain the value. There is nothing to extract.
Retry-with-feedback can fix the first class. It cannot conjure data that was never there. Confusing the two is a classic anti-pattern.
All lessons in this course
- When Retry Helps (and When It Can't)
- Retry-with-Feedback Prompts
- Self-Correction
- Multi-Pass & Independent Review