Posts about pydantic

1 post

  1. Validating LLM JSON output with Pydantic and a repair retry

    Treat model output as untrusted input: define a Pydantic schema, validate the JSON an LLM returns, and feed validation errors back for one bounded repair attempt.

    3 min read