I am providing this Pydantic model
class Occasion(BaseModel):
values: list[Literal["party", "vacation", "everyday", "work", "evening"]] = Field(
default_factory=list,
description="Occasion to wear the apparel. Could take values from 'party', 'vacation', 'everyday', 'work', 'evening'"
)
but when I debugged the prompt being passed to the LLM, it was this
you MUST return the actual complete content as the final answer, not a summary.\nEnsure your final answer contains only the content in the following format: {\n "category": {\n "values": List[Literal]\n},\n "occasion": {\n "values": List[Literal]\n}
The detailed information present in the pydantic model is lost, including the Literal values which act as enum. This results in LLM returning arbitrary values, not following the enum.