📍 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

Agent Interruption

Beta
Multi-turn
Referenceless
Chatbot
Voice

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

CallerAgent
0.0s / 12.6s

Required Arguments

To use the AgentInterruptionMetric, 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 AgentInterruptionMetric() 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 AgentInterruptionMetric
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 = AgentInterruptionMetric(threshold=0.8)
evaluate(test_cases=test_cases, metrics=[metric])

There are FOUR optional parameters specific to the AgentInterruptionMetric, on top of the common voice metric parameters:

  • [Optional] max_caller_silence_seconds: an integer for how long, in seconds, the caller must have been silent before a collision is excused instead of counted as a false start, since after a long silence the agent is expected to fill it. Must be greater than 0. Defaulted to 4.
  • [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. 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 AgentInterruptionMetric 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 start where the agent interrupted shows up in score_breakdown. Here is what the example call returns:

{
    "eligible_turns": 5,
    "turns_with_events": 2,
    "events": [
        {
            "type": "false_start",
            "duration_seconds": 1.0,
            "start_time": 10.8,
            "mark": "range",
            "timing_source": "call_recording",
            "description": "Agent started over the caller, then stopped",
            "reply_start": 10.8,
            "agent_seconds": 1.0,
            "overlap_seconds": 1.0,
        },
        {
            "type": "talk_over",
            "duration_seconds": 2.0,
            "start_time": 17.6,
            "mark": "range",
            "timing_source": "call_recording",
            "description": "Agent talked over the caller for 2.0s",
            "reply_start": 17.6,
            "agent_seconds": 3.0,
            "overlap_seconds": 2.0,
        },
    ],
    "skipped": [],
    "timing_source": "call_recording",
}
FieldWhat it means
typeFalse start or talk-over. False start when both apply
reply_startWhen the agent started, in seconds into the call
agent_secondsHow long the agent kept speaking
overlap_secondsHow much of that the caller was also talking
start_timeWhere both started talking at once
duration_secondsHow long both talked at once. The agent's whole stretch if the caller never spoke inside it

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 agent turn, instead of reply_start.

eligible_turns is how many agent starts were checked and turns_with_events how many interrupted the caller. The score is the share that didn't.

How Is It Calculated?

The AgentInterruptionMetric score is calculated according to the following equation:

Agent Interruption=Number of Agent Starts Without an InterruptionTotal Number of Agent Starts\text{Agent Interruption} = \frac{\text{Number of Agent Starts Without an Interruption}}{\text{Total Number of Agent Starts}}

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 starts the same way. Events carry the agent turn's index, turn, instead of reply_start.

Counting agent starts

CallerAgentopening linestart 1start 20s2s4s6s8s10s12s

A start is a timed reply: the agent starting to speak after at least 1 second of its own silence. The agent's opening line, spoken before the caller made any sound, isn't counted. When the caller opens the call, the agent's first start is checked like any other.

Interruption criteria

CallerAgentfalse starttalk-over0s2s4s6s8s10s12s

An agent start is an interruption when it's a false start or a talk-over:

  • False start: the caller is already talking, or starts within 0.5 seconds after the agent, and the agent stops within 1.5 seconds.
  • Talk-over: the caller is already talking, and makes 1 second or more of sound while the agent keeps speaking.
CheckRule
Caller already talkingCaller sound in at least 0.2 of the 0.3 seconds before the agent starts
CollisionThe caller starts within 0.5 seconds after the agent
Backs offThe agent stops within 1.5 seconds
Talks over1 second or more of caller sound during the agent's stretch

A collision isn't counted as a false start when the caller had been silent for more than max_caller_silence_seconds (4 seconds by default) before it, since the agent is expected to fill a long silence. This never excuses a talk-over, or an agent that starts while the caller is already talking.

When the two start within 0.5 seconds of each other, the moment belongs to this metric. A caller cutting in once the agent has been talking for longer is judged by User Interruption, so the two never flag the same moment.

If there's nothing to count, 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 the caller was really talking when the agent cut in, 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 agent sometimes starts over the caller. Each row is one agent start and whether it interrupted the caller.

CallerAgentopening linefalse starttalk-over0s5s10s15s20s25s
Agent startWhat the caller was doingInterruption?
0.2 sHadn't spoken yetNot counted
5.8 sFinished at 5.0 sNo
10.8 sTalking; the agent stopped after 1.0 sYes (false start)
13.0 sFinished at 12.0 sNo
17.6 sTalking; both talked for 2.0 sYes (talk-over)
22.0 sFinished at 19.6 sNo
5 starts2 interruptions → 3/5 = 0.6

FAQs

What if my turn timestamps are inaccurate?
Attach stereo full call audio as the test case's audio and the metric ignores the turn timestamps. With per-turn audio, silence at the edges of a clip is fine, since the metric listens for the speech inside it. A wrong start_time still moves the speech, though, and can report an interruption that didn't happen. Listen to a flagged moment before acting on it.
How is this different from turn-taking naturalness?
TurnTakingNaturalnessMetric runs this metric together with response latency, user interruption and response delay consistency, and scores the share of agent replies none of them flagged. This metric only checks the agent starting over the caller.
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