Metrics
Metrics
In MixedVoices, metrics help you evaluate and analyze your voice agent's performance. Each metric can be either binary (PASS/FAIL) or continuous (0-10 scale), allowing for both strict checks and nuanced performance evaluation.
Built-in Metrics
MixedVoices comes with several pre-defined metrics that cover common evaluation needs:
from mixedvoices.metrics import (
empathy, # Measures emotional intelligence and response appropriateness
hallucination, # Checks for made-up information
conciseness, # Evaluates response brevity and clarity
context_awareness, # Assesses understanding of conversation context
adaptive_qa, # Measures ability to handle follow-up questions
objection_handling, # Evaluates handling of customer objections
scheduling, # Assesses appointment scheduling accuracy
verbatim_repetition, # Checks for unnecessary repetition
)
# Get all default metrics at once
from mixedvoices.metrics import get_all_default_metrics
metrics = get_all_default_metrics()Creating Custom Metrics
You can create custom metrics to evaluate specific aspects of your agent's performance:
Using Metrics in Projects
Metrics can be added when creating a project or updated later:
Example: Metric Set
Evaluation with Metrics
When creating an evaluator, you can choose which metrics to use. Check Agent Evaluation for more details.
Tips
Creating Effective Metrics
Clear Definitions: Make metric definitions specific and measurable
Appropriate Scoring: Choose binary for pass/fail requirements, continuous for nuanced evaluation
Prompt Awareness: Use
include_prompt=Truefor metrics that need to check against agent knowledgeConsistent Naming: Use lowercase, descriptive names without spaces
Last updated