Function
Content Validation
Evaluate your LLM models on their ability to validate text based on various criteria.
Content validation refers to the ability to evaluate and validate text output from LLM models based on various criteria. This includes validating text based on output format and length.
Evaluation Type | Description | Required Args |
---|---|---|
IsJson | Check if entire text is valid JSON | text |
IsEmail | Check if entire text is a valid email | text |
NoValidLinks | Check for invalid URLs/links | text |
ContainsValidLink | Check if text contains valid URL/link | text |
OneLine | Check if text is a single line | text |
JsonSchemeValidation | Validate JSON against a schema | actual_json expected_json |
LengthLessThan | Check if text length is less than value | text |
LengthGreaterThan | Check if text length is greater than value | text |
LengthBetween | Check if text length is between min and max values | text |
Evaluation Type | Description | Required Configuration |
---|---|---|
IsJson | Check if entire text is valid JSON | None |
IsEmail | Check if entire text is a valid email | None |
NoValidLinks | Check for invalid URLs/links | None |
ContainsValidLink | Check if text contains valid URL/link | None |
OneLine | Check if text is a single line | None |
JsonSchemeValidation | Validate JSON against a schema | schema : JSON schema object to validate against |
LengthLessThan | Check if text length is less than value | max_length : Maximum allowed length |
LengthGreaterThan | Check if text length is greater than value | min_length : Minimum required length |
LengthBetween | Check if text length is between min and max values | 1. min_length : Minimum length 2. max_length : Maximum length |