This evaluation template assesses whether a text demonstrates politeness, respect, and appropriate social etiquette. It checks for the presence of courteous language, absence of rudeness, and adherence to social norms in communication.

Interface Usage

result = evaluator.evaluate(
    eval_templates="is_polite", 
    inputs={
        "input": "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)

Python SDK Usage

from futureagi import Evaluator

# Initialize the evaluator
evaluator = Evaluator(api_key="your_api_key")

# Evaluate whether text demonstrates politeness
result = evaluator.evaluate(
    eval_templates="is_polite", 
    inputs={
        "input": "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"
)

# Access the result
is_polite = result.eval_results[0].metrics[0].value
reason = result.eval_results[0].reason

print(f"Is polite: {is_polite}")
print(f"Reason: {reason}")

Example Output

True
The message demonstrates high politeness through its formal greeting ("Dear Sir"), well-wishing ("hope this email finds you well"), respectful language, and considerate phrasing that acknowledges the recipient's time ("whenever you have a free moment"). The tone is deferential and courteous throughout, showing proper etiquette and respect for the recipient.

Troubleshooting

If you encounter issues with this evaluation:

  • Politeness standards can vary across cultures and contexts - the evaluation generally uses Western business communication norms
  • Short or technical communications might be neutral rather than explicitly polite
  • This evaluation focuses on the presence of polite elements and absence of impolite ones
  • Consider cultural context when interpreting results, as politeness norms vary globally
  • tone: Provides a broader assessment of communication style beyond just politeness
  • cultural-sensitivity: Evaluates awareness of and respect for diverse cultural norms
  • no-apologies: Specifically checks for unnecessary apologetic language
  • toxicity: Identifies hostile or offensive language (opposite of politeness)