Cost & performance
Streaming
Definition
Streaming sends a response token by token as it is generated rather than waiting for completion. It does not reduce total generation time but dramatically improves how fast the response feels.
Without streaming, a user stares at a spinner for the whole generation. With streaming, text begins appearing after the first token, and reading pace roughly matches generation pace.
The engineering cost is real: you handle a stream of partial events rather than one response object, which complicates parsing, error handling and any post-processing that needs the complete text.
Streaming conflicts with output validation. If you need to check or reformat a complete response before showing it, you cannot stream it — a genuine trade-off between perceived speed and output control.
Related terms
Latency
Latency is the delay before and during a response. Two measures matter: time to first token, which governs perceived responsiveness, and tokens per second, which governs how fast the rest arrives.
Inference cost
Inference cost is what you pay to run a model on a request, almost always billed per million input and output tokens. Output tokens typically cost three to five times more than input tokens.
Prompt caching
Prompt caching stores the processed form of a repeated prompt prefix so subsequent requests reusing it are cheaper and faster. Cached input tokens typically cost a fraction of normal input tokens.
Determinism
A deterministic system returns identical output for identical input. Language models are only approximately deterministic even at temperature 0, because floating-point and infrastructure variation introduce small differences.
Evaluation (evals)
Evaluation is systematically measuring AI output quality against a test set, rather than judging from a handful of examples. It is what makes prompt and model changes safe to ship.
LLM as judge
LLM as judge uses one model to grade another's output against criteria you define. It makes evaluating subjective quality practical at scale, with known biases to control for.
Put this into practice
Understanding the term is step one. Our free courses and tools let you actually use it.