No Invalid Links

Evaluates whether output text is free from invalid hyperlinks, checking all URLs against standard formatting rules.

No Invalid Links checks whether every URL in a response is properly formatted, catching malformed or broken links before they reach a user. Run it wherever a response might include links.

What it does

No Invalid Links is a deterministic, rule-based eval. It scans the provided text and checks that any URLs present pass standard formatting validation.

Input

Required InputTypeDescription
textstringThe content to be assessed for invalid links

Output

FieldTypeDescription
ResultPass / FailPass means the text contains no invalid hyperlinks; Fail means one or more invalid links were detected
ReasonstringA plain-language explanation of the link validation assessment

Run it from code

Call evaluate() with the template name and the eval’s required inputs. It returns the score and the reason.

Note

Before running: install the SDK and set FI_API_KEY / FI_SECRET_KEY. The model argument in the snippets is the evaluator model Future AGI uses to run the eval; turing_flash is a fast default.

from fi.evals import evaluate

result = evaluate(
    "no_invalid_links",
    text="This is a text without any links",
    model="turing_flash",
)

print(result.score)
print(result.reason)
import { evaluate } from "@future-agi/ai-evaluation";

const result = await evaluate(
  "no_invalid_links",
  {
    text: "This is a text without any links"
  },
  { modelName: "turing_flash" }
);

console.log(result);

When to use

Run No Invalid Links wherever a response might contain URLs that need to be well-formed.

  • Text outputs like support replies or generated articles that reference external resources
  • Content pipelines that publish model output directly, where a broken link would reach the reader
  • Regression checks after a prompt or retrieval change, to confirm links stay well-formed

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.

Was this page helpful?

Questions & Discussion