Valid Links
Ensures that generated content contains valid hyperlinks. This evaluation helps maintain a high standard of quality by validating the presence and validity of links in generated content.
Validating the presence and validity of links in generated content is essential for ensuring that the content meets specific requirements and maintains a high standard of quality. The following evaluations help ensure that text adheres to link validation criteria:
1. Contains Valid Link
Definition: Evaluates whether the output text contains at least one valid hyperlink. It checks if the text includes a URL that adheres to standard URL formatting and is accessible.
Evaluation using Interface
input:
- text: The content column to check.
- output:
- result: Passed or Failed
Evaluation using Python SDK
Click here to learn how to setup evaluation using the Python SDK.
Input Type | Parameter | Type | Description |
---|---|---|---|
Required Inputs | text | string | The content to be assessed for valid hyperlinks. |
Output | Type | Description |
---|---|---|
Score | bool | Returns 1.0 if the text contains at least one valid hyperlink, 0.0 otherwise. |
What to Do When Contains Valid Link Evaluation Fails:
If the evaluation fails, review the output text to identify the absence of valid links. Consider revising the content to include appropriate hyperlinks that meet the required standards. Providing clearer instructions or constraints in the input can help prevent this issue in future evaluations.
2. No Valid Links
Definition: Evaluates whether the output text does not contain any valid hyperlinks. It checks if the text is free from URLs that adhere to standard URL formatting.
Evaluation using Interface
input:
- text: The content column to check.
- output:
- result: Passed or Failed
Evaluation using Python SDK
Click here to learn how to setup evaluation using the Python SDK.
Input Type | Parameter | Type | Description |
---|---|---|---|
Required Inputs | text | string | The content to be assessed for valid links. |
Output | Type | Description |
---|---|---|
Score | bool | Returns 1.0 if the text does not contain any valid hyperlinks, 0.0 if it contains one or more valid links. |
What to Do When No Valid Links Evaluation Fails:
If the evaluation fails, review the output text to identify the presence of valid links. If the text contains URLs that meet the criteria for valid links, consider revising it to ensure compliance with the requirement of having no valid links. Providing clearer constraints in the input can help ensure adherence in future evaluations.