The latency budget
What it is
A latency budget splits the time a user is willing to wait across the stages of a request. Two targets are set:
- time to first word: how long until the answer starts to appear;
- time to complete: how long until it finishes.
Every stage before the model call, and the model's own start-up time, spends from the first.
Why it matters
Writing the budget down shows where the time really goes and stops effort being wasted on the wrong stage.
- In most systems the model's writing time dwarfs everything else, and the stages before it matter mainly because they delay the first word.
- Targets are stated as a percentile such as p95 (95 percent of requests are faster than this), because the average hides the slow requests users remember.
In the real world: A team sets a target of 'first word within one second for 95 percent of chats', measures each stage, and finds a sequential database lookup was costing a third of that budget.
Visual example
ComputedOne support request on the medium tier. The first word arrives at 815 ms; the rest of the answer takes far longer to write.
Reporting the average. An average of two seconds can hide one request in twenty taking fifteen. Users judge a product by its bad moments, so design and measure for p95 or p99.