π Step 9: AI/LLM#316 / 498
Time to First Token
Time to First Token (TTFT)
πOne-line summary
The time it takes for the first token to appear after a request is sent.
π‘Easy explanation
The time until the first character appears on screen after you ask the AI. If it's too long, users wonder 'is it broken?' β that's why it's a key metric.
β¨Example
첫 ν ν°μ΄ λμ¬ λκΉμ§
μ μ‘β
β±οΈ TTFT
βH|μ΄ μκ°μ΄ μ§§μμλ‘ μ¬μ©μκ° λΉ λ₯΄κ² μλ΅μ λ΄
β‘Vibe coding prompt examples
>_
Write code that measures TTFT in a chat UI and logs it, based on when the first token of the streaming response arrives.
>_
TTFT is taking over 3 seconds. List ways to reduce it, such as prompt caching and trimming the system prompt, in priority order.
>_
Implement loading UX in React (typing indicator, step-by-step status messages) so users don't leave while TTFT is long.
Try these prompts in your AI coding assistant!