instructor
instructor copied to clipboard
Pydantic includes URLs with validation errors which aren't useful for the LLM
Is your feature request related to a problem? Please describe.
Pydantic includes a URL by default to look up more information on the error which isn't useful for the LLM and also takes up token space.
1 validation error for Boop
name
Value error, 'bla' is not a valid boop. [type=value_error, input_value='bla', input_type=str]
For further information visit https://errors.pydantic.dev/2.6/v/value_error
Describe the solution you'd like
It'd be nice to have more control over what happens here. Pydantic let's you dump the errors if you catch the exception via errors(
and then specify include_url
. It feels like the default should be to not include that.
Describe alternatives you've considered Just giving more control over the reask flow could let people solve this themselves.
Totally agree.
Throwing data+garbage to the Model is not very smart/economical.
I tried to open the discussion here regarding that, but it seems like only Issues are attended (or maybe I don't know how to use Github :o)
happy to take a PR