You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, if the LLM output fails to conform with the pydantic class structure or JSON obj signature, then we should have a custom parser that intakes raw LLM output and parses into structured format using regex or some parsing logic.
@hucorz Thanks for reporting the issue! could you share a reproducible code?
@AbhishekRP2002 A best-effort parsing could make sense here, but I would like to understand the ratio of successful custom parsing on responses that fail the automatic parsing. What we believe is if it is not the case right now, in the near future, LLM can produce pretty reliable structured output given the right prompt, so we don't need a regex parser as fallback.
I’m encountering pydantic.ValidationError in dspy because the LLM output does not conform to the structure defined in my signature.
How do you typically handle cases where LLM output does not match the expected model structure?
Is there a way to bypass the ValidationError and return the raw LLM output for further inspection or processing?
The text was updated successfully, but these errors were encountered: