---
title: For a phone-based voice agent, break down end-to-end response latency and explain how you'd get the median under a…
url: https://gurkanozkan.ai/learn/questions/applied-llm-dom-01/
markdown: https://gurkanozkan.ai/learn/questions/applied-llm-dom-01.md
kind: question
role: Applied LLM
stage: System design
difficulty: Hard
json: https://gurkanozkan.ai/api/learn/questions/applied-llm-dom-01.json
robots: noindex
---

# For a phone-based voice agent, break down end-to-end response latency and explain how you'd get the median under a second while keeping interruptions rare.

Applied LLM · System design · Hard

Theme reported publicly: [PolyAI](https://job-boards.eu.greenhouse.io/polyai/jobs/5032627101), [ElevenLabs](https://jobsbyculture.com/blog/elevenlabs-interview-prep-2026)

## Answer

*Model answer, written in a candidate's voice*

### In short

- Define the latency budget: endpointing, ASR finalisation, LLM TTFT, TTS first audio, telephony hops, and any integration lookups.
- Stream the pipeline: partial ASR into the LLM, phrase-sized LLM chunks into TTS, audio played as generated.
- Tune endpointing for rare interruptions: wait for semantic completeness, not just silence, and use barge-in only on clear user speech.
- Cut variance: co-locate in-region, reduce sequential stages, cache common phrases, and use filler acknowledgements while slow tools run.
- Measure per-stage distributions and tails, not averages, and gate releases on p50/p90/p99.

### In full

The core point is that a sub-second median is a simple-turn target, not a promise for every tool-heavy turn, so I would budget the whole path: endpointing/turn detection, ASR finalisation, LLM time-to-first-token, TTS time-to-first-audio, telephony hops, and any integration lookups. I would stream everything end to end: partial ASR feeds the LLM, the LLM starts generating before the transcript is final, and its output is sent to TTS in phrase-sized chunks that are played as soon as they are ready rather than waiting for a full response. The hard trade-off is endpointing: too aggressive and the agent cuts people off, too conservative and it feels sluggish, so I would use model-based/semantic turn detection and only interrupt on clear user speech, with barge-in cancelling both TTS and generation cleanly. To reduce variance I would co-locate in-region, collapse unnecessary sequential stages, cache common phrases, and use short filler acknowledgements while slow tools run so the user hears something immediate. I would measure each stage as a distribution with p50/p90/p99 and track interruption rate separately, because averages hide the tail and can make a system look fast while still cutting people off or stalling on the worst turns.

*Checked against sources by an independent AI reviewer.*

## What a strong answer covers

- Stages: endpointing/turn detection, ASR finalisation, LLM TTFT, TTS time-to-first-audio, telephony hops, integration lookups
- Stream everything: streaming ASR, start the LLM on partial transcripts, send LLM output to TTS in phrase-sized chunks, play audio as generated
- Endpointing trade-off (cut people off vs feel sluggish); model-based/semantic turn detection; barge-in that cancels TTS and generation
- Reduce variance: co-locate in-region, fewer sequential stages, cached common phrases, filler acknowledgements while slow tools run
- Measure per-stage distributions and tails, not averages

## Common mistakes

- Optimising only model latency
- reporting the mean

## Topic guides

- [ML and LLM system design](https://gurkanozkan.ai/learn/topics/system-design.md)
- [Speech, vision, video and multilingual modalities](https://gurkanozkan.ai/learn/topics/modalities.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
