Skip to main content
Generation metrics evaluate the quality of your LLM’s responses using an LLM-as-a-judge approach.

Quick Reference


SafetyMetric (Faithfulness)

Measures: Whether responses are grounded in retrieved contexts, preventing hallucinations.

Basic Usage

Configuration


AlignmentMetric (Helpfulness)

Measures: Whether responses are useful, detailed, and clear.

Basic Usage


ResponseRelevancy

Measures: Whether the response actually answers the question asked.

Basic Usage


When to Use Each Metric

1. SafetyMetric
  • Factual accuracy is critical
  • Compliance/legal requirements apply
  • Working in high-stakes domains
2. AlignmentMetric
  • User experience is priority
  • Optimizing for helpfulness
  • Balancing detail vs brevity
3. ResponseRelevancy
  • Ensuring on-topic responses
  • Building Q&A systems
  • Quality assurance for chatbots