What is streaming?
Streaming (streamed responses), told as a story about the parrot showing the guest each bean the moment it picks one.
A blank screen for 30 seconds. The guest thinks it is broken.A long answer means many beans. The parrot is busy picking, but the guest sees nothing at all.
The parrot already makes beans one at a time. Holding them until the end makes the wait long.The first bean was ready in one second. But because everything is held until the last bean, the guest waits the whole 30 seconds.
Streaming shows the guest each bean the moment it is picked.The first bean appears at one second. The guest starts reading while the parrot keeps picking behind. The wait feels short.
It finishes at the same time. The difference is seeing it start.Both rows finish at 30 seconds. The top is blank for 30 seconds; the bottom has something to read from second one.
Streaming makes the wait feel short. The work itself does not shrink.It shows sooner, not finishes sooner — the bean cost and the total time stay the same. And forms and tool requests are read only after everything arrives.
Streaming = the parrot shows the guest each bean the moment it is picked. The first bean appears quickly so the wait feels short, but total time and bean cost stay the same.
Sends generated tokens in chunks as they are produced, before the response is complete (usually over SSE). Perceived speed is driven by time to first token (TTFT); total latency and cost are unchanged. Tool-call arguments and structured output like JSON are only whole once the stream ends, so buffer and parse them, and handle cancellation and retries when a stream drops.
When grown-ups say it
- Streaming
- Showing each bean right away. Sent as they come, instead of waiting for the whole thing.
- TTFT (time to first token)
- Time until the first bean. What the guest feels as speed is mostly this number.
- Tokens per second
- Beans per second. How smoothly beans keep coming after the first.
- SSE (server-sent events)
- The pipe that trickles beans one by one. Connect once and the server keeps sending small pieces. Commonly used for streaming.
- Chunk
- The batch of beans that arrives at once. May be one bean or a few. Join them to get the answer.
- Cancellation
- Saying stop and closing the pipe. When the guest stops reading, the parrot stops picking — saving bean cost.
- Structured output and streaming
- Forms must be collected whole. A half form cannot be read by a machine. → writing in the boxes
- Inference cost and time
- Bean cost and total time. Unchanged by streaming. → what answering costs