Skip to main content

List Metrics

coval metrics list [OPTIONS]
OptionTypeDefaultDescription
--filterstringFilter expression (supports metric_type, metric_name, create_time)
--page-sizenumber50Results per page (1-100)
--order-bystringSort field, prefix with - for descending
--include-builtinflagInclude built-in metrics (e.g. Turn Count, Audio Duration)
Output columns: ID, NAME, TYPE, CREATED
coval metrics list

Get Metric

coval metrics get <metric_id>
ArgumentTypeRequiredDescription
metric_idstringYesThe metric ID
coval metrics get met_abc123

Create Metric

coval metrics create [OPTIONS]
OptionTypeRequiredDescription
--namestringYesMetric display name
--descriptionstringYesWhat this metric evaluates
--typestringYesMetric type (see below)
--promptstringNoLLM evaluation prompt (required for llm-binary, categorical, numerical and their audio variants)
--categoriesstringNoComma-separated categories (required for categorical, audio-categorical)
--min-valuenumberNoMinimum value (required for numerical, audio-numerical)
--max-valuenumberNoMaximum value (required for numerical, audio-numerical)
--regex-patternstringNoRegex pattern to match (required for regex)
--rolestringNoTranscript role to match against (optional for regex)
--match-modestringNopresence (default) or absence — absence returns 1 if pattern NOT found
--positionstringNoany (default), first, or last message of the role
--case-insensitivebooleanNoEnable case-insensitive matching
--metadata-field-typestringNoMetadata field type (required for metadata)
--metadata-field-keystringNoMetadata field key to extract (required for metadata)
--min-pause-duration-secondsnumberNoMinimum pause duration threshold (required for pause)

Metric Types

TypeDescriptionType-Specific Options
llm-binaryBinary (yes/no) LLM judgment--prompt
categoricalCategorical LLM judgment with defined options--prompt, --categories
numericalNumerical score from LLM judgment--prompt, --min-value, --max-value
audio-binaryBinary audio analysis--prompt
audio-categoricalCategorical audio analysis--prompt, --categories
audio-numericalNumerical audio analysis--prompt, --min-value, --max-value
toolcallTool call success verification
metadataExtract metadata field value--metadata-field-type, --metadata-field-key
regexMatch transcript against a regex pattern--regex-pattern, --role, --match-mode, --position, --case-insensitive
pauseAnalyze pause durations in audio--min-pause-duration-seconds

Examples

# LLM Binary
coval metrics create \
  --name "Issue Resolved" \
  --description "Did the agent resolve the customer issue?" \
  --type llm-binary \
  --prompt "Was the customer's issue fully resolved?"

# Categorical
coval metrics create \
  --name "Sentiment" \
  --description "Customer sentiment during the call" \
  --type categorical \
  --categories "positive,neutral,negative" \
  --prompt "What was the customer's overall sentiment?"

# Numerical
coval metrics create \
  --name "Professionalism Score" \
  --description "Rate the agent's professionalism" \
  --type numerical \
  --min-value 1 \
  --max-value 10 \
  --prompt "Rate the agent's professionalism on a scale of 1-10"

# Audio Binary
coval metrics create \
  --name "Background Noise" \
  --description "Is there excessive background noise?" \
  --type audio-binary \
  --prompt "Is there excessive background noise in the audio?"

# Audio Numerical
coval metrics create \
  --name "Audio Clarity" \
  --description "Rate the audio clarity" \
  --type audio-numerical \
  --min-value 1 \
  --max-value 5 \
  --prompt "Rate the audio clarity on a scale of 1-5"

# Tool Call
coval metrics create \
  --name "Tool Usage" \
  --description "Did the agent use the correct tool?" \
  --type toolcall

# Metadata
coval metrics create \
  --name "Response Time" \
  --description "Extract the response time from metadata" \
  --type metadata \
  --metadata-field-type "number" \
  --metadata-field-key "response_time_ms"

# Regex — basic pattern match
coval metrics create \
  --name "Greeting Check" \
  --description "Did the agent greet the customer?" \
  --type regex \
  --regex-pattern "(hello|hi|welcome|good morning)" \
  --role "agent" \
  --case-insensitive

# Regex — compliance (absence mode)
coval metrics create \
  --name "No Unauthorized Promises" \
  --description "Agent must not make unauthorized promises" \
  --type regex \
  --regex-pattern "(guarantee|promise|definitely)" \
  --role "agent" \
  --match-mode "absence" \
  --case-insensitive

# Regex — first message disclosure
coval metrics create \
  --name "Recording Disclosure" \
  --description "Agent must state recording disclosure in first message" \
  --type regex \
  --regex-pattern "this call may be recorded" \
  --role "agent" \
  --position "first" \
  --case-insensitive

# Pause
coval metrics create \
  --name "Long Pauses" \
  --description "Detect pauses longer than 3 seconds" \
  --type pause \
  --min-pause-duration-seconds 3.0

Update Metric

coval metrics update <metric_id> [OPTIONS]
ArgumentTypeRequiredDescription
metric_idstringYesThe metric ID to update
OptionTypeDescription
--namestringNew display name
--descriptionstringNew description
--promptstringNew evaluation prompt
coval metrics update met_abc123 --prompt "Updated evaluation prompt"

Delete Metric

coval metrics delete <metric_id>
ArgumentTypeRequiredDescription
metric_idstringYesThe metric ID to delete