Skip to main content

Humanity Metric

The Humanity metric evaluates the emotional depth and human-likeness of AI responses using the NRC Emotion Lexicon.

Overview

The metric analyzes eight emotion categories: Key metrics:
  • Emotional Entropy: Shannon entropy measuring emotional diversity
  • Spearman Correlation: Correlation with ground truth emotional distribution

Installation

Basic Usage

Parameters

Required Parameters

Optional Parameters

Output Schema

HumanityMetric

Understanding the Metrics

Emotional Entropy

Measures the diversity of emotions in a response using Shannon entropy:

Spearman Correlation

Measures how well the assistant’s emotional distribution matches the ground truth:

Complete Example

Visualization

Emotion Distribution Bar Chart

Entropy Distribution

Use Cases

Responses should show trust, anticipation, and appropriate empathy:
  • High trust for reliability
  • Joy for positive interactions
  • Some sadness/understanding for complaints
Should match user’s emotional tone appropriately:
  • High Spearman correlation with ground truth
  • Balanced emotional diversity
  • Appropriate expressions of care and support
May have lower emotional content (which is appropriate):
  • Low entropy is acceptable
  • Trust should still be present
  • Neutral emotional tone
Should show high emotional diversity:
  • High entropy (>2.0)
  • Varied emotions across interactions
  • Natural emotional range

Interpretation Guidelines

High Emotional Entropy (>2.0)

The response expresses a diverse range of emotions, appearing more natural and human-like. Good for:
  • Creative writing
  • Emotional support
  • Engaging conversation

Low Emotional Entropy (below 1.0)

The response is dominated by few emotions or is emotionally neutral. May be:
  • Appropriate for technical content
  • Concerning for empathetic contexts
  • Sign of robotic responses

Zero Entropy

Only one emotion detected or no emotional content. Could indicate:
  • Purely factual response (acceptable for technical queries)
  • Lack of appropriate emotional expression (concerning for support contexts)

Next Steps

BestOf Metric

Learn about assistant comparison

Metrics Overview

Explore all available metrics