Posts about pydantic
1 post
-
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.