repair loop
Sending a model its invalid reply together with the precise validation errors and asking it to fix them.
In more detail
Name each problem with its path and rule, cap the number of retries, and log every failure with the evidence. A repair that still fails after the cap should become an error your code handles, not a guess.
Related terms
- structured output — Model output that must match a given schema, usually JSON Schema, either by asking in the prompt or by a provider feature that constrains decoding.
- JSON Schema — A standard vocabulary for describing the allowed shape of JSON data: which fields exist, their types, which are required and what values are allowed.
Taught in
- Structured Output — AI Engineering: LLM Apps, RAG & Agents
- Retrieval That Finds The Right Thing — AI Engineering: LLM Apps, RAG & Agents