Spatial AI Latency

By The Kaleidr Team · Published November 1, 2026 · 14 min read

A request timeline from the user through authorization, retrieval, spatial tools, the model, a map action, and completion, with first progress, first spatial action, and final result marked.

Spatial AI latency is the time from a location question to the first useful map feedback, and it is not a single model timer. The wait can include authorization, retrieval, a route, and the tokens a language model generates. A fast model can still sit behind a slow route. A slower final paragraph can still feel responsive when an eligible place or route appears first.

What Does Spatial AI Latency Include?

A location question crosses several clocks, and averaging them into one "AI latency" hides the stage the user is actually waiting on. Browser responsiveness is how quickly the page reacts to a click. Time to first progress is when the interface shows that work has started. Time to first token is when generation produces its first token. Time to first spatial action is when an eligible place or route becomes visible. Time to last token is when generation finishes. Time to completed action is when the user can rely on the result.

Time to first progress, time to first spatial action, and time to completed action are Kaleidr names for the product experience. Those three names are not web standards. Time to first token and time to last token are the established model metrics.

Six timers for one request: interaction to next paint, time to first progress, time to first token, time to first spatial action, time to last token, and time to completed action.

The six cards separate browser response from the rest of the request. Time to first progress, time to first spatial action, and time to completed action are marked as Kaleidr editorial metrics. Time to first token and time to last token are marked as established model-latency metrics. Interaction to next paint is the browser metric. None of the cards reports a Kaleidr measurement.

Google's web performance guidance treats Interaction to Next Paint as field responsiveness and calls an INP at or below 200 milliseconds a good score at the 75th percentile of page loads (web.dev, 2025). That threshold is about the next paint after a click, not about a route or a generated paragraph. A page can pass it and still leave the user waiting on retrieval. A slow model call does not, by itself, make the INP poor. The two budgets should be charted apart, or a team will "fix AI latency" by tuning a click handler that was never on the critical path.

Why Does the Critical Path Matter?

The critical path is the longest chain of steps that must finish in order. Independent lookups can overlap. A route that needs both a resolved place and a business fact cannot start until both exist. Serializing those lookups adds their times. Running them together removes only the overlap, and it does not make the route itself faster. Authorization still comes before any private record is shown.

A serial chain of authorization, place lookup, business data, route, and model compared with a graph that runs place lookup and business data together.

The top row waits for each step to finish before the next begins. The bottom row runs place lookup and business data at the same time, then joins them for the route and the model. The figure describes the shape of the wait. The drawing does not report a measured speedup, and the route still depends on both lookups.

A useful trace names the span, not the product. Geocoding, a business read, a route, ranking, and generation can each be the slow span on a different question. Spatial AI observability is the companion for recording those spans separately, including a structured reason when the result is empty. Without that split, a slow afternoon looks like "the model got worse" when the route service was the stage that moved.

Why Is the First Token Not the First Map Result?

Time to first token and time to last token answer different questions, and neither is the moment a map becomes useful. Azure OpenAI documents the relationship as time to last token equals time to first token plus the time between tokens multiplied by the number of tokens generated (Microsoft, 2026). The same article says each prompt token adds little time compared with each token generated, and that streaming returns tokens as they are ready without changing the time required to produce all of them. OpenAI's latency guide states a related heuristic: cutting about half the output tokens may cut about half the latency (OpenAI, 2026). A short explanation can therefore finish sooner. The map card, not the paragraph, should carry the place, the hours, and the route.

Two illustrative timelines. One reaches the first token sooner and the map later. The other reaches a useful map action sooner.

System A shows text early and a map action late. System B shows text later and a map action earlier. The second marks and the totals on the figure are an illustration, and the artwork says they are not benchmark data. The marks are not a Kaleidr trace and not a result from the Azure or OpenAI articles. The comparison is only about order: an earlier token is not an earlier map.

The distinction matters for what the product celebrates. A dashboard that ranks only time to first token will prefer the system that talks first and draws late. A map product should also record time to first spatial action, and it should record that action only after eligibility has passed. An early pin for a closed or unauthorized place is a fast mistake. Spatial context engineering is the related rule for which facts are allowed to reach the model once the eligible set exists.

What May Be Cached, and What Must Be Revalidated?

A cache saves a round trip only when the saved value is still the right value. Stable identifiers and coordinates for a known place change rarely, so they are the usual candidates for a long-lived cache. Hours, a computed route, and descriptive text change often enough that a short time-to-live is the honest policy. Inventory, a vehicle position, authorization, and the state of a transaction should be read again at decision time. A cached "in stock" from this morning is not evidence about this afternoon.

Three freshness classes: stable identifiers and coordinates, short-lived hours and routes, and live inventory, position, authorization, and transaction state.

The left column is what rarely changes. The middle column needs a short lifetime. The right column should be revalidated before use. The figure's footer says the classes are subject to provider terms, privacy, and business rules. A route in the middle column is a cached calculation, not a promise that the road is still open. Nothing in the figure is a Kaleidr cache policy.

Provider place data adds a second constraint. The terms that came with the record still apply to a copy, including attribution and any use restriction. Private records add a third: a cache shared across users must not become a way past authorization. Unknown stays unknown. A timeout on inventory is not a license to render "out of stock," and a timeout on a route is not a license to invent the minutes.

When Can the Map Move Before the Explanation Ends?

The useful order on a map is often place, then route, then the sentence that explains them. The user can inspect an eligible candidate while the language model is still writing. That pattern does not make retrieval or routing faster. It only reveals work that has already finished. Streaming text has the same limit. Azure's guidance is that streaming changes when the first token is visible, not the time required to generate the full sequence.

Four steps show a candidate area, place pins, a route, and a short explanation while the map remains in view.

The sequence is a candidate area, then pins, then a route, then a short explanation. The shop count, the two-minute walk, the rating, the address, and the hours are sample labels on the artwork, not a live query. The pins and the route in this pattern are for places that already passed eligibility. An early marker is not a substitute for that check.

Kaleidr's public stream is Server-Sent Events, text/event-stream, and the contract names what can arrive before the prose ends (Kaleidr, 2026). The phase event means the request was accepted and work has started, and its phase value is always thinking. A : keep-alive comment arrives after 10 seconds of silence. Time to the first prose can be tens of seconds on a hard question, which is why the phase event and the heartbeat exist. A route on a directions question can arrive before the prose, so the line can draw while the text streams. early_actions carries map actions that may be applied before the answer finishes, and it is sent once two or more places have coordinates. The end event is the authoritative result, and its actions replace those early actions. Not every event appears on every request.

How Should the Request Graph Be Drawn?

Draw the dependencies, then delete the steps that do not change the answer. Place resolution and a business read can run together after authorization. Eligibility is the join. Routing and other spatial work use that join. Ranking orders the survivors. Generation explains them. The map shows the same identifiers. Putting generation before eligibility spends tokens on places the product cannot recommend. Grounded spatial AI for business data keeps that eligibility in the systems that own the facts.

A request graph runs place resolution and business data in parallel after authorization, then eligibility, routing, rank, the model, and the map.

Authorization comes first. Place resolution and the business read are the parallel pair. Eligibility, the route, rank, generation, and the map follow. The solid line is the critical path and the dashed line is the overlapping read. The figure argues for drawing the whole graph. The graph does not report a measured saving, and it does not show a private record crossing authorization.

The same graph shows where a language model is the wrong tool. A containment test, an authorization check, an "open now" filter, and a distance threshold are deterministic. The model is useful for reading the request, explaining a result the services already computed, and ranking soft preferences among eligible places. OpenAI's latency guide makes the same cut in general terms: a classical method is the faster choice when the task does not need language reasoning. One prompt that returns every language step can also beat a chain of model calls, because each extra call pays another round trip. The route, the stock, and the permission still come from their own services.

Why Can the Average Hide the Slow Requests?

The mean is a poor summary of a wait, because a few slow requests dominate what people remember. Report the median, the 95th percentile, and the 99th percentile for each span, and report them by request class. A directions question and a short place question do not belong in one bucket. The tail can be a fan-out across tools, a retry, a large prompt, a difference between providers, or a long generated answer. Azure's formula already says the last of those grows with output tokens. The others will not show up in a token count, which is why the spans have to be separate.

A conceptual latency curve marks the median, the 95th percentile, and the 99th percentile, with a long tail.

The curve is a shape, not a Kaleidr trace and not a sample from a provider dashboard. The labels use the ordinary reading of those percentiles: half of requests at or below the median, most of them at or below the 95th, and nearly all of them at or below the 99th. The five causes under the chart are a checklist of places to look. Those causes are not measured shares of Kaleidr traffic.

A tail policy should say what the product does when a span misses its budget. A route timeout stays unknown, and the explanation says the route was unavailable. An inventory timeout stays unknown, rather than becoming "out of stock." A retry belongs in the trace so a transient failure is not mistaken for a slow model. Optimizing the median while the 99th percentile keeps a user on a spinner is not a completed performance program.

Which Stages Belong in the Budget?

Name the stages before assigning anyone a target. A practical budget has seven lines: admitting the request in the interface, checking identity and authorization, retrieving context, computing the route or the distance, generating the explanation, applying the map action, and completing the business action. Some lines overlap, as the request graph shows. Some requests never reach a booking or a handoff. The list is a way to see which line moved, not a claim that every question runs all seven in series, and not a set of millisecond targets.

Seven budget stages from admitting the request through authorization, retrieval, spatial computation, model inference, the map action, and the business action.

Each stage has one job and no duration. Admitting the request is the browser's work. Authorization precedes private data. Retrieval, the spatial computation, and generation are separate lines. The map action shows a pin, a route, or a fitted view. The business action is the handoff, and it is absent when the question does not ask for one. The figure sets no numeric target.

Put a target on a stage only after the trace shows that stage is the one users wait on. A universal "answers in two seconds" number would mix the click, the route, and the paragraph, and this article does not cite one. The INP threshold above is a browser target. The token formula above describes model time. Time to first spatial action is the map target, and it stays an editorial metric until a team defines it on their own traces.

Where Should a Team Start?

Start by splitting the wait. Record interaction to next paint for the page, time to first progress, time to first token, time to first spatial action, time to last token, and time to completed action. Keep the three editorial names labeled as product metrics. Read p50, p95, and p99 by request class. Shorten the generated answer when the map already shows the detail. Overlap only the lookups that do not depend on each other. Revalidate anything that can change the decision. Let the end event, not the first pin, be the result the user can act on.

Explore Kaleidr Enterprise when that path has to include the organization's own places and rules. The SSE wire contract is the event order cited above, including the phase event, the keep-alive, early map actions, and the final result.

Note: Kaleidr uses AI-assisted tools for image creation, content refinement, and research throughout its creative and development workflows.

FAQs

What is spatial AI latency?

Spatial AI latency is the time from a location question to useful map feedback. It includes the interface, authorization, retrieval, spatial computation, generation, the map action, and any business handoff. It is not the same number as model time.

Is Interaction to Next Paint the same as model latency?

No. Interaction to Next Paint measures how quickly the page responds to a click. A good score, at or below 200 milliseconds at the 75th percentile of page loads, says nothing about when a route or a paragraph will finish.

What is time to first token?

Time to first token is the time from submitting a prompt until the first generated token returns. Azure OpenAI uses it, together with the time between tokens and the number of tokens generated, to describe time to the last token.

Why is the first token not enough for a map?

A map is useful when an eligible place or route is visible. That moment can arrive before the first token, or long after it. Time to first spatial action records the map moment. Time to first token records the text moment.

Does streaming make routing faster?

No. Streaming changes when finished work becomes visible. It does not reduce the time a route, a retrieval, or the full generation takes. Azure's latency article says streaming does not change the time required to produce all the tokens.

What does Kaleidr send before the answer ends?

The public stream can send a phase event whose value is thinking, a keep-alive during silence, a route before the prose on a directions question, and early_actions once two or more places have coordinates. The end event is authoritative and replaces the early actions. Not every event appears on every request.

Should private inventory be cached to save latency?

No. Inventory, authorization, a live position, and transaction state should be revalidated at decision time. A timeout stays unknown. Stable place identifiers are the usual long-lived cache, and only within the provider's terms.

Which percentile should a team watch?

Watch the median, the 95th percentile, and the 99th percentile for each span, split by request class. The median can improve while the tail that users remember stays slow.

References

  1. web.dev. Interaction to Next Paint (INP). A good INP is at or below 200 milliseconds at the 75th percentile of page loads recorded in the field. An INP above 200 milliseconds and at or below 500 milliseconds needs improvement. Updated September 2, 2025. https://web.dev/articles/inp
  2. Microsoft. Azure OpenAI in Microsoft Foundry Models performance & latency. Time to last token equals time to first token plus the time between tokens multiplied by tokens generated. Streaming returns tokens as they are ready and does not change the time required to produce all of them. Accessed October 31, 2026. https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/latency
  3. OpenAI. Latency optimization. A stated heuristic: cutting about half of the output tokens may cut about half of the latency. Accessed October 31, 2026. https://developers.openai.com/api/docs/guides/latency-optimization
  4. Kaleidr Developer Docs. SSE wire contract. Documents text/event-stream, a phase event that is always thinking, a keep-alive after 10 seconds of silence, tens of seconds before first prose on a hard question, early_actions once two or more places have coordinates, a route before the prose on a directions question, and end as the authoritative result. Accessed October 31, 2026. https://docs.kaleidr.com/platform-api/sse-wire-contract
  5. Kaleidr. Spatial AI Observability. A related guide for recording each stage, including a structured reason when the result is empty. Accessed October 31, 2026. https://kaleidr.com/blog/spatial-ai-observability
  6. Kaleidr. Spatial Context Engineering for Map-Aware AI. A related guide for which facts reach the model after eligibility. Accessed October 31, 2026. https://kaleidr.com/blog/spatial-context-engineering
  7. Kaleidr. Grounded Spatial AI for Business Data. A related guide for keeping business facts in the systems that own them. Accessed October 31, 2026. https://kaleidr.com/blog/grounded-spatial-ai-business-data

References in BibTeX

@misc{webdev_inp_2025,
  title  = {Interaction to Next Paint (INP)},
  author = {{web.dev}},
  year   = {2025},
  url    = {https://web.dev/articles/inp}
}

@misc{microsoft_azure_openai_latency_2026,
  title  = {Azure OpenAI in Microsoft Foundry Models performance \& latency},
  author = {{Microsoft}},
  year   = {2026},
  url    = {https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/latency}
}

@misc{openai_latency_optimization_2026,
  title  = {Latency optimization},
  author = {{OpenAI}},
  year   = {2026},
  url    = {https://developers.openai.com/api/docs/guides/latency-optimization}
}

@misc{kaleidr_sse_wire_contract_2026,
  title  = {SSE wire contract},
  author = {{Kaleidr}},
  year   = {2026},
  url    = {https://docs.kaleidr.com/platform-api/sse-wire-contract}
}

@misc{kaleidr_spatial_ai_observability_2026,
  title  = {Spatial AI Observability},
  author = {{Kaleidr}},
  year   = {2026},
  url    = {https://kaleidr.com/blog/spatial-ai-observability}
}

@misc{kaleidr_spatial_context_engineering_2026,
  title  = {Spatial Context Engineering for Map-Aware AI},
  author = {{Kaleidr}},
  year   = {2026},
  url    = {https://kaleidr.com/blog/spatial-context-engineering}
}

@misc{kaleidr_grounded_spatial_ai_2026,
  title  = {Grounded Spatial AI for Business Data},
  author = {{Kaleidr}},
  year   = {2026},
  url    = {https://kaleidr.com/blog/grounded-spatial-ai-business-data}
}