Pydantic magic. How are you utilizing it?

Hey Champs

I’m curious if you are using Pydantic somehow in your LLM apps development and if so, for which use-cases?

I’m personally using it to validate JSON output: in terms of structure and also sometimes quality/relevancy of the responses.

For those who are unfamiliar with Pydantic, here’s an example of its usage with openai library: https://github.com/TonySimonovsky/llm_app_cookbook/blob/main/Pydantic-Instructor/pydantic_instructor_answer_assessment.ipynb

1 Like