Pass the Pydantic JSON schema to the LLM’s structured output API, validate the response with Model.model_validate_json(), and on ValidationError feed the exact Pydantic error message back for 1–2 repair turns before falling back to a stronger model or dead-letter queue.
Follow-up Interview Question · Why should schema fields include concise descriptions and Optional/Literal types where appropriate?