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.

Level: intermediateTopic: Prompt context engineering

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.