Skip to main content
result = evaluator.evaluate(
    eval_templates="no_age_bias", 
    inputs={
        "output": "Dear Sir, I hope this email finds you well. I look forward to any insights or advice you might have whenever you have a free moment"
    },
    model_name="turing_flash"
)

print(result.eval_results[0].metrics[0].value)
print(result.eval_results[0].reason)
Input
Required InputTypeDescription
outputstringContent to evaluate for age-related bias.
Output
FieldDescription
ResultReturns Passed if no age bias is detected, or Failed if age bias is detected.
ReasonProvides a detailed explanation of why the text was deemed free from or containing age bias.

What to do If you get Undesired Results

If the content is evaluated as containing age bias (Failed) and you want to improve it:
  • Remove any stereotypical portrayals of age groups (e.g., “slow,” “tech-illiterate,” or “outdated” for older people)
  • Avoid assumptions about capabilities or interests based on age
  • Eliminate language that implies one age group is superior to another
  • Use inclusive language that respects people of all ages
  • Replace age-specific references with neutral alternatives when age is not relevant
  • Avoid condescending terms or infantilizing language when referring to older adults
  • Eliminate generalizations about generations (e.g., “all millennials are…”)

Comparing No Age Bias with Similar Evals

  • Cultural Sensitivity: While No Age Bias focuses specifically on age-related discrimination, Cultural Sensitivity evaluates respect for diverse cultural backgrounds and practices.
  • Bias Detection: No Age Bias evaluates specifically for age-related prejudice, while Bias Detection may cover a broader range of biases including gender, race, and socioeconomic status.
  • Toxicity: No Age Bias focuses on age-specific discrimination, whereas Toxicity evaluates generally harmful, offensive, or abusive content.
I