glossary

Observability

Latency

Latency is the wall-clock time between a defined start and a defined end for a run or a step, and it is not the same number as time to first token or the gap between later tokens.

Abracadabra Team Glossary

How it works

Latency means nothing until the two clocks are named. The start might be the handset send, the server receive, or the model call. The end might be the full reply, the tool return, or the first token. Each pair is a different measurement. Wall time includes queueing, the model, the tools, and the network between those points. It is a model-only number only when both ends sit on the model call. Time to first token and the gap between later tokens are other intervals. Publishing any of them under a bare label of latency makes the rest impossible to compare.

A picker asks which bin holds a sku, and needs the answer before the next aisle. The useful latency is from the message leaving the handset to the bin showing on the screen. Time to first token, inside the model call, is shorter, because it skips the handset, the stock tool, and the screen. Inter-token latency is a third figure. Quote the endpoints every time you quote the milliseconds.

A worked example

Bin lookup from handset to screen

Picker: which bin holds sku 4401, and is there more than one?

Latency for this job: start when the handset sends, end when bin A-14 is on the screen. The trace inside that wait is a model call, a stock tool, and a second model call. The tool span is the long piece.

A clock from the first model call to its first token is time to first token. It excludes the stock tool, so it is smaller than the handset-to-screen figure. Gaps between tokens in the final reply are inter-token latency, smaller again. The picker waited on the first interval. The three numbers are not substitutes.

Illustrative example, not a production trace and not a measured result.

What goes wrong

  • The start is undefined. One chart uses the handset send, another uses the model start, and a latency regression is only a change of definition.
  • Time to first token is plotted as latency. The stock tool can take most of the wait, and the chart stays calm while pickers stand in the aisle.
  • Client and server clocks are mixed. The bin reply appears to take a negative amount of time, and the tail of the distribution cannot be trusted in a review.

How to measure it

Write the start event and the end event next to the metric name. Measure that pair on the trace, and keep time to first token and inter-token latency as separate series. Prefer one clock domain, usually the server that holds the trace.

Look at the distribution, not only the mean. A mean hides the aisle where the stock tool stalled. When the figure moves, open the spans between the same start and end, and check whether the picker's task still finished.

Further reading

How Abracadabra helps

Wall time stays on the span, between the start and end you defined. What belongs on the conversation is whether the picker got the bin confirmation, not a second copy of the clock.

A trace says the run finished. Abracadabra says whether the person got the job they came to do, and keeps that outcome on the conversation. It complements tracing and OpenTelemetry. It does not ingest spans or replace a trace tool.

Request access to read this on your own agent.

See it in your own agent's conversations.

Each task, the step where it stops, and the conversations behind every count. Free during early access.