A model's response is untrusted input to the rest of your program. Before it is shown to a user, written to a database or used to call a tool, check it in code: does it parse, does it match the schema, are the values in range, does it cite only allowed sources, does it leak anything it should not. A failed check can trigger a retry, a fallback or a refusal.
Simple automated checks also keep quality steady, for example confirming that a summary kept its key entities or that a rewrite followed the style guide. These guides cover validating responses before use, constraining model output when prompts alone fail, and adding output checks to summarization and style prompts.
7 guides
The library lists all guides with filters for topic, level, category and reading time.