Skip to content

Glossary: Building with LLMs Basics

Validate and retry

A pattern for models without structured output: ask for JSON, check it yourself, and on failure ask again with the error message, with a cap on attempts.

Where the book teaches it

Related terms

Structured outputValidationError