Are Pydantic Field descriptions passed into the prompt? #317
-
I'm trying to figure out if it's worth prompt engineering via the Pydantic Field Descriptions - thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello! Yes, it is, depends how you do it, for sure will leave things more clear. Let me give you an example: class Chart(Contract): This will always give you better results |
Beta Was this translation helpful? Give feedback.
-
That clears it up - thank you! |
Beta Was this translation helpful? Give feedback.
Hello!
Yes, it is, depends how you do it, for sure will leave things more clear. Let me give you an example:
class Chart(Contract):
classification: Literal["line", "bar", "pie"] = Field(description="The type of the chart")
description: str = Field(description="Description of the chart")
coordinates: List[XYCoordinate] = Field(description="The x-axis and y-axis present in the chart. Will be multiple")
gdp_variation: str = Field(description="Description of the gdp variation")
This will always give you better results