πŸ“– 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!