Field Descriptions That Guide the Model
Document each field so the AI fills it correctly.
The Model Reads Your Fields
Each field's name and description are shown to the AI. A good description is your chance to tell the model exactly what to put there.
Add a Description
Pass description to Field to attach a human sentence that travels with the schema all the way to the client.
city: str = Field(description="City name, e.g. Paris")All lessons in this course
- Why Schemas Beat Loose Args
- Model Inputs with Pydantic
- Constraints, Defaults & Enums
- Field Descriptions That Guide the Model