
How to Make Your Chatbot's Replies Feel Faster
Measure, Stream, Trim
Quick answer: First measure where the seconds go, split into the work your own system does before the model call, the time to the first token, and the time spent writing the rest. Then fix in this order: stream the answer so text appears as soon as it exists, run the steps before the model call in parallel, shorten the answer, and put the unchanging part of the prompt first so caching can help. In our invented example below, the first visible text moves from 6.0 seconds to 2.2 seconds without changing the model.
Step 1: Measure before you change anything
Add timing to your chatbot code at four points and log them for every reply: when the customer's message arrives, when the model request is sent, when the first token comes back, and when the last token comes back. From those you get three numbers per reply:
- Pre-model time: request sent minus message arrived. This covers lookups, retrieval and any tool calls you run before asking the model.
- Time to first token (TTFT): first token minus request sent.
- Writing time: last token minus first token. It grows with answer length.
Do not only keep averages. Log the slowest 5 percent too (the 95th percentile), because those are the replies customers remember. If you have an observability tool, it may record these for you; the routine in the production monitoring guide shows where they belong. If you only measure one thing, measure the customer's wait from message to first visible text. A fast model behind a slow retrieval step is still a slow chatbot.
Step 2: Stream the answer
Without streaming, the server waits for the full answer and sends it in one reply, so the customer sees nothing until it is done. OpenAI's streaming guide describes the alternative: you set the stream option on the request and the server sends the answer in small pieces over server-sent events, so your chat window can show text while the model is still writing. Its latency guide calls streaming the most effective approach for perceived latency, and says it can also shorten the overall wait because the reader starts sooner. Other providers offer the same pattern; check your provider's documentation for the exact setting.
Two practical points from our own thinking, not a vendor's:
- Your chat widget has to display partial text. Many hosted chatbot builders already do; if yours does not, a typing indicator is a weaker substitute that only covers short gaps.
- Streaming makes it harder to check the answer before the customer sees it. OpenAI's guide notes that partial output is harder to evaluate before it reaches users. If your guardrails must see a complete answer first, either stream only the answers that do not need that check or accept that the wait comes back.
Step 3: Trim the work before the model call
This is where the largest saving usually hides, and it needs no model change. List every step that runs between the customer's message and the model request, and write down its time from Step 1.
- Run independent steps at the same time. OpenAI's latency guide recommends parallelizing independent steps. Looking up the customer's record and searching the knowledge base do not depend on each other, so start both together and wait for the slower one instead of the sum.
- Cut round trips. The same guide suggests combining sequential steps into one prompt where you can. If the chatbot asks the model to classify the question and then asks again to answer it, test whether one call can do both.
- Skip steps the question does not need. Not every message needs retrieval. A greeting or a button tap can go straight to a scripted reply, which the guide also hints at under not defaulting to a language model for everything.
- Retrieve less. Fewer, better passages are faster to fetch and shorter for the model to read. The RAG chatbot build guide covers sizing.
Step 4: Shorten the output
OpenAI's latency guide says generating output tokens is usually the highest-latency step and gives a rough heuristic: cutting output tokens by half may cut latency by about half. That relates to total time rather than the first token, but it shortens the whole wait. Ask for concise answers in the system prompt, set a maximum output length as a safety net, and move long content (a full policy, a table of options) behind a link or a "tell me more" button. Test that shorter answers still solve the problem; a fast answer that sends the customer back with another question is not faster. The unit being counted is the token, and the token estimate guide shows how to size it.
Step 5: Order the prompt for caching and pick the model last
OpenAI's guide advises keeping the static part of the prompt at the start and putting dynamic content such as retrieved passages and conversation history later, which makes requests friendlier to the provider's cache. See prompt caching for what a provider's cache does and does not promise. Two other levers cost more effort and are worth doing after the free ones:
- A smaller model. The same guide lists a smaller model as the first way to process tokens faster. Compare quality first with the side-by-side test in the smaller-model test guide.
- Skip the model on repeats. A semantic cache returns a stored answer for a repeated question with no model wait at all, as described in the semantic cache guide, with its risk of wrong matches.
If you route through a gateway, remember it adds a hop; see the LLM gateway guide for what to measure.
Step 6: Re-measure and set a pass bar
Rerun your Step 1 logging on the same kind of traffic, then judge against a bar you set before looking at results (our method). For example: "the first visible text appears within 3 seconds for 95 percent of replies, and answer quality in our test set does not drop." If quality drops, undo the last change. Add the timing check to your regular tests; the QA testing protocol is a good home for it.
Here is a worked example. Every duration and length below is invented for illustration. They are not measurements or provider speeds.
| Item | Before | After |
|---|---|---|
| Customer lookup | 0.8 s | 0.8 s, in parallel |
| Knowledge-base search | 1.2 s | 1.2 s, in parallel |
| Pre-model time | 0.8 + 1.2 = 2.0 s (run one after the other) | max(0.8, 1.2) = 1.2 s |
| Time to first token | 1.0 s | 1.0 s |
| Answer length and speed | 150 tokens at 50 tokens per second = 3.0 s | 100 tokens at 50 tokens per second = 2.0 s |
| Streaming | No | Yes |
| First visible text, from the customer's message | 2.0 + 1.0 + 3.0 = 6.0 s (the whole answer arrives at once) | 1.2 + 1.0 = 2.2 s |
| Complete answer on screen | 6.0 s | 1.2 + 1.0 + 2.0 = 4.2 s |
What the invented table shows: parallelizing saved 0.8 seconds, shortening the answer saved 1.0 second, and streaming turned a 6.0-second blank wait into a 2.2-second one, the largest change for the customer. The model never changed. Whether your numbers look like this is exactly what Step 1 tells you, and if your pre-model time is already small, the gains come from streaming and output length instead.
Common mistakes
- Blaming the model first. Measure the pre-model time before shopping for a faster model.
- Looking only at averages. The slowest replies drive complaints. Track the 95th percentile.
- Streaming into a widget that waits for the full text. Check that text really appears as it arrives.
- Shortening answers until they stop helping. Test resolution, not just speed.
- Comparing models by one speed figure. Providers define tokens per second and first-token time differently, and both change with load and region. Time your own traffic.
- Streaming without a plan for safety checks. Decide what happens when a streamed answer needs to be withdrawn.
FAQ
How do I reduce LLM latency in a chatbot?
Measure where the time goes, stream the answer, run independent steps before the model call in parallel, shorten the output, and keep the static part of the prompt first so caching can help. Change the model last.
What is a good time to first token?
There is no universal figure because it depends on the model, region, prompt size and load. Set a bar for your own chatbot, such as first visible text within a few seconds for most replies, and track the slowest 5 percent.
Does streaming make the answer arrive sooner?
It does not make the model write faster, but the customer sees the first words as soon as they exist instead of waiting for the full reply, so the wait feels much shorter.
How do I measure time to first token?
Record the time the request is sent and the time the first streamed piece arrives; the difference is TTFT. Also record the time the customer's message arrived to see your own pre-model delay.
Will a smaller model fix slow replies?
It can start and write faster, but check the pre-model time first, and compare answer quality before switching.
Do hosted chatbot builders let me change any of this?
Often only some of it, such as answer length and which knowledge sources are searched. Ask the vendor whether replies stream and whether you can see response times.
Related guides
- Time to first token — the definition and the three numbers to log.
- Reduce chatbot costs guide — many speed levers also lower the bill.
- Test a smaller model — compare quality before trading it for speed.
- Add a semantic cache — skip the model on repeated questions.
- Monitor an LLM chatbot in production — keep the timing numbers on a dashboard.
Sources
- OpenAI, Latency optimization — developers.openai.com/api/docs/guides/latency-optimization, read 14 October 2026: the seven principles, parallelizing, combining steps, streaming for perceived latency, the output-versus-input-token heuristic, static-content-first for caching, smaller model first.
- OpenAI, Streaming API responses — developers.openai.com/api/docs/guides/streaming-responses, read 14 October 2026: how streaming works over server-sent events and the moderation caveat.
- Chatbotscape evaluation methodology. /methodology (continuously updated).
About this guide
Chatbotscape launched in 2026 as an independent review site for chatbot platforms. This guide is editorial guidance built from provider documentation; the measure-then-fix order, the pass bar and the worked example are our own practice with invented numbers, and we have not benchmarked any model or platform for speed.
Last updated
15 October 2026 — first published.