179 questions
No questions match those filters.
Your chatbot needs to respond in under 500ms. How do yo...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansSub-500ms responses come from removing latency at every stage of the request, not from one clever trick. Streaming is the single biggest perceived-speed win — the moment the first token appears, usually within 100-200ms, the interaction feels instant even if total generation time hasn’t actually changed. Pairing that with a smaller, faster model for the common case rather than defaulting to the largest model available cuts real inference time substantially.
Prompt caching removes re-processing time on the input side, geographic deployment removes network round-trip time, and pre-computing anything that doesn’t depend on the live query — embeddings especially — removes work from the critical path entirely. Capping the maximum response length keeps generation itself short, and more advanced setups add speculative decoding, where a small model drafts tokens a larger model verifies in one pass.
A voice assistant that started at 2.5 seconds per response got to around 280ms total by switching to a smaller model, adding streaming, and turning on prompt caching — and user complaints dropped by roughly 95% because the exchange finally felt like a real conversation instead of a delayed reply. Streaming, a smaller model, and caching are the three that matter most in combination.