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 InputTypeDescription
textstringThe content to be assessed for invalid links.
Output
FieldDescription
ResultReturns Passed if the text contains no invalid hyperlinks, Failed if one or more invalid links are detected.
ReasonProvides a detailed explanation of the link validation assessment.

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.

  • 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?

Questions & Discussion