Here is the list of validators supported by guardrails.
I.
As of today, let's quickly walk through a couple of these validators to give you a better understanding
of how they function and ensure the integrity of our outputs.
First, we have the valid range validator.
This is crucial when our LLM outputs numerical data.
It checks that the numbers like user's age are within a sensible bracket, say 18 to 65 for adult services.
If the LLM suggests someone is 120 years old, a valid range will flag this as an error based on our
specifications.
Next is the regex match validator.
It's all about format compliance.
If our LLM generates an email address, regex match ensures it fits a standard email pattern.
This is how we maintain professional and correct communication formats in our outputs, and there is
also a Also a validator for PII filter.
In today's world, protecting personally identifiable information is non-negotiable.
The PII filter scans our LMS output for sensitive data like Social Security numbers, and reacts them
to maintain privacy and compliance with regulations.
Validators come in various forms, each tailored to its specific needs.
Some require specific arguments for execution.
For instance, the valid range validator needs minimum maximum bounds.
Others leverage metadata additional parameters to enhance their functionality.
In instances where built in validators fall short, we have the flexibility to craft custom validators.
Whether it's simple function or a sophisticated class inheriting from the validator base class, custom
validators empower us to define validation processes according to our unique requirements.
Mhm.