Skip to main content

Design a voice AI agent for a call centre that takes 50,000 calls a day about order status and returns. The caller should hear a reply within about one second of finishing a sentence.

System design · Pro 3

Short answer

Clarify call types, languages and what must go to a person. Pipeline: telephony, streaming speech-to-text, a model with tools for order lookup, streaming text-to-speech. Set a latency budget per stage, handle interruptions and silence, verify identity before sharing data, hand off to a human with a summary, and measure resolution, latency and transfers.

Deeper answer

Requirements: the top call reasons, languages and accents, noisy phone audio, identity checks, and rules about recording and telling callers they are speaking to an AI.

Design: audio streams from telephony into speech-to-text. End-of-turn detection decides when the caller has finished. The model gets the conversation and tools for order lookup and return creation, and its output streams into text-to-speech sentence by sentence. Give each stage a latency budget, for example 200 ms for transcription, 500 ms to the first model token and 200 ms to first audio. Use a small, fast model for most turns and short spoken replies. Play a brief phrase such as "let me check" while a tool runs. Support barge-in: stop speaking when the caller interrupts.

Trade-offs: a single speech-to-speech model can be faster and more natural, but a pipeline of separate parts is easier to control, test and log. Risks: numbers and names heard wrongly, so read back order numbers and confirm before any action. Hand off to a human, with a summary, on anger, repeated failure or anything outside scope. Tail latency at peak load breaks first, so load test.

What a strong answer covers

Answer it out loud in the mock interview about 3 min

Follow-ups to expect

Common mistakes

Learn it

The design interview

Practice System design questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.