Conversational Metric
The Conversational metric evaluates dialogue quality using Grice’s Maxims — principles of cooperative conversation that define effective communication. It accumulates scores across all interactions in a session and emits one session-level result, with optional uncertainty quantification via Bayesian mode.Overview
The metric assesses seven dimensions:
Each dimension produces a session-level
ConversationalScore with a mean and optional credible interval (ci_low, ci_high) in Bayesian mode. The interactions list preserves per-QA scores for debugging.
Installation
Basic Usage
Required Parameters
Optional Parameters
Statistical Modes
- Frequentist
- Bayesian
Returns a weighted mean per dimension.
ci_low and ci_high are None.Interaction Weights
EachBatch can carry an optional weight to control its contribution to the session aggregate:
Output Schema
ConversationalMetric
ConversationalScore
ConversationalInteraction
Grice’s Maxims Explained
Quality Maxim
Be truthful: Don’t say what you believe to be false or lack evidence for.Quantity Maxim
Be informative: Provide enough information, but not more than required.Relation Maxim
Be relevant: Make your contribution relevant to the conversation.Manner Maxim
Be clear: Avoid obscurity and ambiguity.Score Interpretation
Complete Example
Best Practices
Use Bayesian Mode for Small Sessions
Use Bayesian Mode for Small Sessions
If a session has fewer than 5-10 interactions, the frequentist mean can be misleading. Bayesian mode shows a CI, making it clear when more data is needed.
Include Observations
Include Observations
Add
observation to guide the judge on what to evaluate:Test Multi-Turn Conversations
Test Multi-Turn Conversations
Include sequences that test memory:
Next Steps
Statistical Modes
Frequentist vs Bayesian — when each matters
Context Metric
Evaluate context alignment
Humanity Metric
Emotional analysis of responses