Is Email

Evaluates whether input text is a valid email address, checking for standard formatting and a valid top-level domain.

Is Email checks whether a piece of text is a properly formatted email address. Run it wherever a model or user input is expected to produce a valid email.

What it does

Is Email is a deterministic, rule-based eval using a regex pattern designed for email validation. It checks the provided text against standard email formatting.

Input

Required InputTypeDescription
textstringThe content to check for email validity

Output

FieldTypeDescription
ResultPass / FailPass means the text is a valid email address; Fail means it’s not
ReasonstringA plain-language explanation of the evaluation

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(
    "is_email",
    text="john.doe@example.com",
    model="turing_flash",
)

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

const result = await evaluate(
  "is_email",
  {
    text: "john.doe@example.com"
  },
  { modelName: "turing_flash" }
);

console.log(result);

When to use

Run Is Email wherever a field or extracted value needs to be a valid email address.

  • Text outputs from form-filling or data-extraction agents that populate an email field
  • Data validation pipelines, before an extracted address is used to send mail or stored as a record
  • Structured extraction tasks, to confirm a parsed field is actually a well-formed email rather than a partial match

What to do when Is Email fails

Review the input text to identify formatting issues. Common problems include a missing ”@” symbol, incorrect domain names, or invalid characters.

Consider revising the input to ensure it meets the standard email format.

Was this page helpful?

Questions & Discussion