AI engineering glossary · Prompt context engineering
What is output repair?
Output repair (also called JSON repair): Fixing a malformed or invalid model reply, either with simple code such as closing a missing bracket, or by sending the error back to the model and asking it to correct itself. It raises success rates when formats are not strictly enforced.
Output repair: an example
A reply misses the closing brace; the code adds it, or re-prompts with 'Invalid JSON: unterminated object. Return corrected JSON.'
Related terms
More Prompt context engineering terms
- Parallel tool calls
- Plan-and-Solve prompting
- Position bias
- Presence penalty
- Program-aided language models
- Prompt
- Prompt caching
- Prompt chaining
Where you learn it
Output repair is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.