Skip to content

Diagnose the latency budget

Read the critical path and choose a change for the timing target that the service is missing.

Scenario

A newsroom brief displays its first clause quickly and takes seven more seconds to finish. Editors have a deadline for the complete brief. The team proposes switching on streaming, which the app already uses.

Explanation

Measure model time to first token from model request to first token. Also measure time until the user sees useful output, which can include queue and tool delays. End-to-end latency includes everything until the task finishes. Streaming can surface output sooner while the remaining work continues.

Trace the critical path, the dependent work that determines completion time. Run independent tools in parallel where budgets allow. Keep dependent tools in order. If prompt processing dominates, compare cache checkpoints and cold versus warm timing. If generation dominates, test output length or supported effort settings against quality before changing defaults.

Worked example

In a synthetic brief trace, an initial authorization lookup takes 100 ms. Two independent source reads take 900 ms and 1,100 ms. In series those reads cost 2 seconds. In parallel they cost about 1.1 seconds before overhead. The final synthesis still starts only after both reads return, so the elapsed time changes without changing their dependency on authorization.