📍 Join the 1st DeepEval meetup in SF, this Friday 5pm PT. RSVP on Luma →
💥 Introducing JevEval: Jev-as-a-Judge for LLM evaluation. Read the post →
Voice AgentsTiming

User Interruption

Beta
Multi-turn
Referenceless
Chatbot
Voice

The user interruption metric checks whether the caller starts speaking over your voice agent: either a false start, where the caller starts as the agent speaks and then backs off, or a talk-over, where the caller keeps going. It is Agent Interruption from the other side. It returns the share of the caller's lines that interrupted no one, between 0 and 1.

Callers cutting in often is a sign that the agent's replies run long or miss what the caller wants.

Required Arguments

To use the UserInterruptionMetric, you'll have to provide a ConversationalTestCase with at least one of:

  • audio on the test case, a 16-bit stereo WAV recording of the whole call*
  • audio on the caller's and agent's turns, each with a start_time

* Full call audio has to be a 16-bit stereo WAV, with the caller and agent on separate channels. Mono full call audio is ignored, because the two voices can't be told apart, and so is audio in any other format, such as MP3.

See How Is It Calculated for how each is used.

Usage

The UserInterruptionMetric() can be used for end-to-end evaluation of voice calls, such as ones produced by the ConversationSimulator in voice mode:

from deepeval import evaluate
from deepeval.dataset import ConversationalGolden
from deepeval.metrics import UserInterruptionMetric
from deepeval.simulator import ConversationSimulator
from deepeval.voice import ElevenLabsConnector, VoiceConfig


golden = ConversationalGolden(
    scenario="The user asks the agent to look up an order by its number.",
    expected_outcome="The agent reads back the order status.",
)

simulator = ConversationSimulator(
    voice_config=VoiceConfig(
        connector=ElevenLabsConnector(agent_id="your-agent-id"),
    )
)
test_cases = simulator.simulate([golden])

metric = UserInterruptionMetric(threshold=0.8)
evaluate(test_cases=test_cases, metrics=[metric])

There are THREE optional parameters specific to the UserInterruptionMetric, on top of the common voice metric parameters:

  • [Optional] use_speech_detection: a boolean which, when set to True, only counts the caller as talking when speech is detected, so background noise isn't mistaken for the caller cutting in. With per-turn audio it's also used to find the agent's speech. Defaulted to True.
  • [Optional] eval_mode: "deterministic" or "hybrid". In "hybrid", each interruption is double-checked by an audio decision model before it counts. Defaulted to the configured voice eval mode ("deterministic" unless set).
  • [Optional] audio_decision_model: the model that does the second check in "hybrid" mode. Defaulted to HumeDecisionModel().

As a standalone

You can also run the UserInterruptionMetric on a single test case as a standalone, one-off execution:

metric.measure(test_cases[0])

print(metric.score, metric.reason)
print(metric.score_breakdown)

See Events for what score_breakdown contains.

Events

Each caller line that cut into the agent shows up in score_breakdown. Here is what the example call returns:

{
    "eligible_turns": 4,
    "turns_with_events": 2,
    "events": [
        {
            "type": "false_start",
            "duration_seconds": 1.2,
            "start_time": 9.0,
            "mark": "range",
            "timing_source": "call_recording",
            "description": "Caller started over the agent, then stopped",
            "caller_start": 9.0,
            "caller_seconds": 1.2,
            "overlap_seconds": 1.2,
        },
        {
            "type": "talk_over",
            "duration_seconds": 2.6,
            "start_time": 13.4,
            "mark": "range",
            "timing_source": "call_recording",
            "description": "Caller talked over the agent for 2.6s",
            "caller_start": 13.4,
            "caller_seconds": 3.0,
            "overlap_seconds": 2.6,
        },
    ],
    "skipped": [],
    "timing_source": "call_recording",
}
FieldWhat it means
typeFalse start or talk-over. False start when both apply
caller_startWhen the caller started, in seconds into the call
caller_secondsHow long the caller kept speaking
overlap_secondsHow much of that the agent was also talking
start_timeWhere both started talking at once
duration_secondsHow long both talked at once

Every event also has the fields all voice events share, such as mark and description. With per-turn audio, events carry turn, the index of the caller turn, instead of caller_start.

eligible_turns is how many caller lines were checked and turns_with_events how many cut into the agent. The score is the share that didn't.

How Is It Calculated?

The UserInterruptionMetric score is calculated according to the following equation:

User Interruption=Number of Caller Lines Without an InterruptionTotal Number of Caller Lines\text{User Interruption} = \frac{\text{Number of Caller Lines Without an Interruption}}{\text{Total Number of Caller Lines}}

With per-turn audio instead of full call audio, the metric finds the speech inside each clip and places it on the call's clock by the clip's Audio.start_time, then finds overlaps the same way. Events carry the caller turn's index, turn, instead of caller_start.

Counting caller lines

CallerAgentline 1mm-hmline 20s2s4s6s8s10s

A caller line is each time the caller starts speaking after at least 1 second of their own silence and keeps going for 1 second or more. A pause under 1 second doesn't make a new line. Shorter sounds, like an "mm-hm" while listening, aren't counted.

Interruption criteria

CallerAgentfalse starttalk-over0s2s4s6s8s10s12s

A caller line can only interrupt if it starts while the agent has the floor. It is an interruption when it's a false start or a talk-over:

  • False start: the caller stops within 1.5 seconds.
  • Talk-over: the agent makes 1 second or more of sound while the caller keeps speaking.
CheckRule
Agent talkingAgent sound in at least 0.2 of the 0.3 seconds before the caller starts
Agent has the floorThe agent is talking and started more than 0.5 seconds before the caller
Backs offThe caller stops within 1.5 seconds
Talks over1 second or more of agent sound during the caller's line

When the two start within 0.5 seconds of each other, the moment is a collision and is judged by Agent Interruption instead, so the two never flag the same moment.

If the agent made no sound, or the caller never spoke for 1 second or more, the metric is skipped.

Second check

In the hybrid eval mode, each interruption is double-checked before it counts. The audio decision model hears about 5 seconds of the caller's audio around it, to confirm it was really the caller speaking and not noise on their line, and is asked:

Is a person speaking in this clip, rather than only background noise, breathing or silence?

If the model judges "no" more likely than "yes", the interruption is dismissed and doesn't count against the score.

Example call

A call where the caller sometimes cuts into the agent. Each row is one caller line and whether it interrupted the agent.

CallerAgentfalse starttalk-over0s5s10s15s20s
Caller lineWhat the agent was doingInterruption?
3.6 sFinished at 3.0 sNo
7.4 s0.4 s "mm-hm"Not counted
9.0 sTalking since 6.4 s; the caller stopped after 1.2 sYes (false start)
13.4 sTalking; both talked for 2.6 sYes (talk-over)
17.6 sFinished at 16.0 sNo
4 lines2 interruptions → 2/4 = 0.5

FAQs

How is this different from agent interruption?
AgentInterruptionMetric checks the agent starting over the caller, and owns the moments when both start at once. This metric checks the caller starting over an agent that already had the floor, so a moment is only ever one or the other.
Is a caller interrupting the agent's fault?
Not always. Callers cut in when they already know the answer, when they are in a hurry, or when the agent rambles. Listen to the flagged moments to see which it is.
How is this different from turn-taking naturalness?
TurnTakingNaturalnessMetric runs this metric together with response latency, agent interruption and response delay consistency, and counts each caller interruption against the agent reply it cut into.
Does this metric call an LLM or an external speech model?
Not by default. It only reads when each speaker is talking, so it has no model or token cost. With use_speech_detection on, it runs the small Silero VAD model locally. In the "hybrid" eval mode, each interruption is also checked by an audio decision model, at one paid request per interruption.

On this page