This evaluation template checks whether a text contains unnecessary apologies or excessively apologetic language. It helps ensure AI responses maintain an appropriately confident and professional tone without defaulting to overly apologetic phrasing.

Interface Usage

result = evaluator.evaluate(
    eval_templates="no_apologies", 
    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")

# Check for unnecessary apologies in text
result = evaluator.evaluate(
    eval_templates="no_apologies", 
    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
no_apologies = result.eval_results[0].metrics[0].value
reason = result.eval_results[0].reason

print(f"No unnecessary apologies: {no_apologies}")
print(f"Reason: {reason}")

Example Output

True
The text does not contain any apologetic language or expressions of regret. It maintains a professional and respectful tone without resorting to unnecessary apologies. There are no phrases like "I'm sorry," "I apologize," or other similar expressions that would indicate the writer is apologizing for something.

Troubleshooting

If you encounter issues with this evaluation:

  • This evaluation looks for explicit apologies (“sorry,” “apologize,” etc.) as well as excessively deferential language
  • Some contexts legitimately require apologies - this evaluation is best used when checking for unnecessary apologetic language
  • The evaluation may not catch subtle or implicit forms of apologetic language
  • Consider cultural context, as norms around apologies vary globally
  • is-polite: Ensures communication remains respectful even without apologies
  • tone: Provides broader assessment of communication style and confidence
  • cultural-sensitivity: Evaluates awareness of and respect for diverse cultural norms around apologies