No Invalid Links
Evaluates whether the output text does not contain any invalid hyperlinks. It checks if the text is free from URLs that fail standard URL formatting validation.
result = evaluator.evaluate(
eval_templates="no_invalid_links",
inputs={
"text": "This is a text without any links"
},
model_name="turing_flash"
)
print(result.eval_results[0].output)
print(result.eval_results[0].reason)import { Evaluator, Templates } from "@future-agi/ai-evaluation";
const evaluator = new Evaluator();
const result = await evaluator.evaluate(
"no_invalid_links",
{
text: "This is a text without any links"
},
{
modelName: "turing_flash",
}
);
console.log(result); | Input | |||
|---|---|---|---|
| Required Input | Type | Description | |
text | string | The content to be assessed for invalid links. |
| Output | ||
|---|---|---|
| Field | Description | |
| Result | Returns Passed if the text contains no invalid hyperlinks, Failed if one or more invalid links are detected. | |
| Reason | Provides a detailed explanation of the link validation assessment. |
What to Do When No Invalid Links Evaluation Fails
If the evaluation fails, review the output text to identify the presence of invalid links. If the text contains URLs that fail standard formatting validation, revise the content to remove or correct those links. Providing clearer constraints in the input can help ensure adherence in future evaluations.
Comparing No Invalid Links with Similar Evals
- Contains Valid Link: While No Invalid Links checks that the text is free from malformed URLs, Contains Valid Link verifies that at least one properly formatted URL is present.
Was this page helpful?