Skip to content

Improve Perceived Speed With Token Streaming and Step Indicators

Make complex retrieval, tool calls, and reasoning pipelines feel brisk and trustworthy instead of freezing behind a dead spinner.

The button copies the prompt and opens Michał Jaskólski’s LinkedIn profile: paste it into your message to him.

Cutting real and perceived latency in AI interfaces

  1. 01

    Target sub-600ms visual feedback on message submit

    Render optimistic user bubbles immediately and emit real server progress events as retrieval, OCR, or tool calls execute.

  2. 02

    Stream partial structured JSON into progressive UI cards

    Use incremental JSON parsers over SSE streams so summary headers and first checklist rows appear seconds before the payload completes.

  3. 03

    Show human-meaningful step labels, not fake timers

    Display real pipeline stages like ‘Scanning 14 PDF pages’ or ‘Checking 2026 tax thresholds’ so multi-second waits signal thoroughness.

  4. 04

    Parallelize guardrails, routing, and embedding lookups

    Fire moderation checks, query embeddings, and user profile fetches concurrently via Promise.all rather than sequential waterfall hops.

Frequently Asked Questions

What time-to-first-token threshold separates snappy AI UX from sluggish UX?

Sub-800ms time-to-first-token feels instantaneous for chat; for deeper tool or document tasks, emitting real stage progress within 400ms keeps users calm up to 10–12 seconds.

How can we stream responses when our frontend expects structured JSON objects?

Partial JSON streaming parsers or XML-tagged block protocols let you progressively hydrate cards and tables in real time as tokens arrive.

Do fake animated 'thinking' messages help or hurt user trust?

Fake timers erode trust fast when delays vary; tying UI status badges directly to genuine backend events builds lasting confidence.