Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Anthropic's streaming API emits a message_start SSE event before any content tokens arrive. A teammate is benchmarking TTFT against your existing OpenAI latency dashboard and proposes using the message_start timestamp as the first-token marker. Explain whether that aligns with how TTFT is conventionally defined, what message_start actually represents on the wire, and how the choice would distort a side by side comparison.
No. message_start is a metadata preamble emitted before prefill output, so timing TTFT against it understates the user-perceived wait and flatters Anthropic versus OpenAI by tens to hundreds of milliseconds.
Imagine timing how long it takes to get food at a restaurant. You could start counting from when the waiter brings the menu, or from when the first bite of food arrives. Anthropic's message_start is the menu: it shows up almost instantly because it just announces the order, but no food has been cooked yet. OpenAI's protocol does not have a separate menu-delivery step; the waiter just walks over with the food. If you use menu-arrival as your timing marker for Anthropic but food-arrival for OpenAI, you make Anthropic look much faster than it is. The fair comparison times when food actually appears on both sides.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: TTFT definition is first CONTENT token + message_start is metadata preamble + correct marker is content_block_delta with text_delta + OpenAI has no equivalent preamble + bias grows with prompt length + fair benchmark instruments both first-content events.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating any SSE event as the first-token marker. Only the first event that carries visible characters counts. Metadata preambles do not.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.