Latency
Latency is the time an AI system takes to respond to a request, usually measured as the wait before the first part of the answer appears and the time until the answer is complete.
Anthropic's documentation describes latency as the time a model takes to process a prompt and generate an output, shaped by the size of the model, the complexity of the prompt and the infrastructure in between. A chatbot user feels it as two separate waits: how long before any text appears, measured as time to first token (TTFT), and how long until the answer is finished. In between, speed is usually expressed as time per output token or tokens per second.
The two waits have different causes. A model reads the prompt largely in parallel, so a long prompt mainly delays the first token. It writes the answer one token at a time, so the length of the answer drives total time. OpenAI's latency guide draws the same line: a long, mostly new prompt can delay the first token, while an answer that starts quickly but finishes slowly is a reason to look at what the model is generating. Reasoning models add a further factor, because their hidden reasoning counts as output. A model that thinks through thousands of tokens can take far longer even when its visible answer is short.
The usual fixes follow from that. Choose the fastest model that meets the quality target. Ask for shorter output and send less input, reusing cached prompt prefixes where possible. Make fewer requests in sequence and run independent steps in parallel. Stream the answer so users see text as it is produced, which does not shorten the total time but makes the wait feel shorter. OpenAI's guide adds a blunt one: do not call a language model when ordinary code already knows the answer.
Latency trades against cost and throughput. Serving many users at once on the same chips raises the number of requests handled per second and lowers the cost of each, but can make individual requests slower. The DistServe research paper found that systems running prompt processing and token generation on the same GPUs have to favour one latency target over the other or buy more hardware to meet both. A live voice assistant and an overnight batch of document summaries sit at opposite ends of that trade.
Averages hide the slow cases users remember, so engineers report percentiles: p50 is the median and p95 is the time within which 95% of requests finish. OpenAI recommends measuring time to first token and end-to-end latency at p50 and p95 on representative traffic rather than relying on general rules. Speed comparisons published by vendors are run under conditions of their choosing.
Time to first token (TTFT) is the delay between sending a prompt and receiving the first token of the response. It matters most when output is streamed, because it is how long a user stares at an empty screen. Long prompts tend to increase it. They generate a stream of reasoning tokens before the final answer, and every token takes time to produce. Even if the visible reply is short, the hidden reasoning can run to thousands of tokens. Many providers let developers lower the reasoning effort to trade some accuracy for speed. Use a smaller or faster model where quality allows, shorten prompts and requested outputs, reuse cached prompt prefixes, cut the number of sequential calls, run independent calls in parallel and stream responses. Measure before and after on real traffic, since the biggest gain depends on where the time actually goes. Latency is how long one request takes. Throughput is how many requests or tokens a system handles per second across all users. Batching requests together usually improves throughput and lowers cost but can increase the latency each user experiences.Common questions
What is time to first token?
Why are reasoning models slower?
How can I reduce LLM latency?
What is the difference between latency and throughput?
Search for "LLM latency optimisation", "time to first token" or "p95 latency" to learn how speed is measured and improved. The most useful sources are model providers' own developer documentation, research papers on inference serving, and independent benchmark sites that publish their test conditions. Compare latency figures only when they use the same model, prompt length, output length and load.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.