Latency is how long a user waits. For a report generated overnight it barely matters. For a voice assistant on a phone call, a pause of a couple of seconds feels broken. Language models are slower than ordinary software because they generate output piece by piece, so latency is a design constraint in many AI builds, and one that often forces trade-offs between speed, quality and cost.
How it works
The total delay a user feels is the sum of several steps:
- Network and queueing. Sending the request to the provider and waiting for capacity.
- Reading the input. Long prompts and documents take longer to process.
- Time to first token. How quickly the model starts replying.
- Generation. Each output token takes time, so long answers take longer.
- Everything around the model. Database lookups, retrieval, tool calls and safety checks.
Builds reduce latency in several ways. Streaming shows words as they are generated, so the user sees progress immediately. Smaller or faster models handle simple steps, sometimes chosen per request by model routing. Shorter prompts and prompt caching cut input processing. Steps that do not depend on each other run in parallel.
A voice agent shows why this matters. It has to transcribe speech, decide what to say, generate a reply and speak it, all within a pause short enough to feel natural. Each stage is tuned for speed, and a large, slow model may simply not fit.
What it means for cost
Low latency is often bought with money or quality. Faster hosted tiers, dedicated capacity, extra infrastructure close to users, or smaller models that need more careful prompting all have costs. Real-time features, such as voice, live chat and in-app suggestions, need more engineering and testing for speed than background jobs, which can simply wait.
When briefing a build, state what response time users will accept for each feature. Ask a builder how latency will be measured under realistic load, not only on a quiet test, and which parts of the system are slowest.
Common questions
Why is my AI chatbot slower than a search engine?
Search returns stored results, while a language model composes each answer word by word, often after retrieving documents first. Streaming the answer as it is written makes the wait feel shorter even when the total time is similar.
Do reasoning models have higher latency?
Usually. Reasoning models generate internal working before the final answer, which improves results on complex tasks but adds delay. They suit analysis jobs more than instant conversational replies.
What is time to first token?
It is the delay before the model produces the first piece of its reply. For chat and voice it matters more than total generation time, because it decides how long the user waits before seeing or hearing anything.