Skip to main content
Metric definitions describe what to measure and how. Roark comes with built-in system metrics that work out of the box, and you can create your own custom metrics tailored to your business needs.

Creating Custom Metrics

Custom metrics let you measure anything specific to your use case — task completion, compliance checks, quality scoring, or business KPIs. You author them in Studio’s Author mode, which walks you through choosing an engine, output type, and instructions, with a test rail for validating against real calls.

Custom Metric Types

Write a natural-language prompt describing what to measure. Roark Prism — our evaluation model optimized for voice AI — scores each call against your prompt and returns a typed result.
Best for subjective assessments, business logic, and anything that requires understanding conversational context.

Configuration Steps

1

Define the Metric in Studio

Open Studio in Author mode. Name your metric, pick an engine (LLM Judge, Pattern, or Formula — locked after the first save), choose an output type, and describe what it measures. For LLM Judge metrics, write the evaluation prompt. For formulas, build the expression from existing metrics.
2

Test Against Real Calls

Use the test rail in Studio to run your metric against representative calls and validate it produces the results you expect. Iterate until you’re satisfied.
3

Add to a Collector or Run Plan

Attach the metric to a collector for automated collection on incoming calls, or to a simulation run plan for testing.

SDK Reference

All API endpoints require authentication. Generate an API key to get started.

Create a Metric Definition

Create a new custom metric definition using the SDK: Parameters: Type-specific fields: Example: Create a BOOLEAN metric
Example: Create a SCALE metric

List Metric Definitions

Retrieve all available metric definitions for your project:

Get Call Metrics

Retrieve all metrics for a specific call:
The response groups metrics by definition, with each metric containing an array of values:

Understanding Metric Values

Confidence Scores:
  • All metrics include a confidence field (0-1)
  • Deterministic metrics (like word count, duration) have confidence = 1.0
  • AI-powered metrics include the model’s confidence level
Value Reasoning:
  • For AI-computed metrics, the valueReasoning field provides explanation
  • Useful for understanding why a metric was scored a certain way
  • Example: “The agent verified identity using two-factor authentication as mentioned in segment 3”
Segment Context:
  • When context is SEGMENT, the segment field contains the specific utterance
  • When context is SEGMENT_RANGE, both fromSegment and toSegment are included
  • All segment objects include the full text and timing information

Best Practices

Use the built-in system metrics first — they cover performance, sentiment, interruptions, compliance, and more with no setup. Add custom metrics for business-specific needs.
Always validate custom metrics in Studio on representative calls before attaching them to collectors.
Instead of creating one complex LLM prompt that tries to measure everything, break it into focused metrics and combine them with a formula.
Track both agent and customer metrics for complete conversation understanding.

What’s Next

System Metrics Reference

Browse all 65+ built-in metrics powered by specialized models

Studio

Author and test metrics interactively before deploying

Thresholds

Define pass/fail criteria for your metrics

Collectors

Automate metric collection with conditions-based rules