Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

Latency

In plain words

The wait between sending a request and getting the answer back.

The fuller definition

Latency is elapsed time between a request and a defined response point, such as the first output token or the complete answer.

How it fits together
  1. Request

    Start timer

  2. First token

    Initial response delay

  3. Completion

    Full result received

A simplified relationship, not a screenshot or a complete design.

A concrete example

One system begins answering quickly but takes longer to finish a large response.

The distinction that matters

Time to first token and time to completion measure different aspects of responsiveness.

Related terms

Where it is taught

APIs and JSON: connect a model to a small program

Source and further reading

MDN · Web technology glossary

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC