Time to First Token
What Is Time to First Token?
Time to first token, or TTFT, is the time from sending an LLM prompt to receiving its first streamed output token. Also called first-token latency, it defines the initial wait before an AI response appears.
How TTFT Works in LLM Inference
Inference is the work an LLM does to produce an answer. An LLM is used for inference when it applies its trained patterns to a prompt.
- The app sends the prompt.
- The request travels, waits in any queue, and is tokenized.
- The model processes the input, called prefill, and creates its KV cache.
- The first generated token streams to the user.
TTFT vs. Total Latency, Tokens per Second, and Inter-Token Latency
| Metric | Clock ends | User experience |
|---|---|---|
| TTFT | First token | Initial wait |
| Inter-token latency | Each next token | Streaming smoothness |
| Tokens per second | During output | Generation speed |
| Total latency | Complete answer | Overall completion time |
Why Time to First Token Is Important
Low TTFT makes an AI feature feel responsive.
- It improves chats, summaries, and streaming search.
- It helps users decide quickly whether to wait or cancel.
- It can reveal overloaded capacity or excessive prompt context.
Why TTFT Can Be High
The first token cannot arrive until earlier work finishes.
- Long prompts or retrieved documents increase prefill work.
- Busy servers, cold starts, large models, and network delays add wait time.
- Safety checks or tool preparation may occur before streaming.
How to Measure and Reduce TTFT
Measure from the client request start to the first received output token.
- Record TTFT percentiles by model, prompt length, and traffic level.
- Test realistic concurrent requests, not isolated demos.
- Remove irrelevant context and select a suitably sized model.
- Keep capacity warm and begin streaming as soon as possible.
Time to First Token in Emergent
When building AI features with Emergent, test TTFT in complete user flows, alongside answer quality and total latency. For example, an email summariser should return a useful start promptly, not merely score well in a single benchmark. Build responsive AI apps with Emergent.
on Emergent today

