PromptForge
AI Glossary

Cost & performance

Latency

Also known as: response time, ttft

Definition

Latency is the delay before and during a response. Two measures matter: time to first token, which governs perceived responsiveness, and tokens per second, which governs how fast the rest arrives.

Time to first token is what users experience as speed. Streaming responses lets you display text as it generates, which is why a streamed answer feels dramatically faster than an equivalent buffered one even though total time is identical.

Latency is driven by model size, output length, prompt length, and whether reasoning is involved. Reasoning models are notably slower because they generate substantial hidden deliberation before their first visible token.

Common mitigations: stream everything, route easy requests to smaller models, cache stable prefixes, and cap output length. For agent loops, latency compounds per step — a five-step agent inherits five round trips.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.