PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Waymo

Design the Frontend for an AI Chat Application

Last updated: Jul 14, 2026

Quick Overview

Design the frontend architecture for a streaming AI chat application with long and branching conversations. Cover normalized message state, retries and interruption, reconnect and deduplication, history virtualization, draft persistence, accessible live updates, security boundaries, and failure recovery.

  • medium
  • Waymo
  • System Design
  • Frontend Engineer

Design the Frontend for an AI Chat Application

Company: Waymo

Role: Frontend Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

# Design the Frontend for an AI Chat Application Design the frontend architecture for a conversational AI application. Cover streaming responses, conversation state, interruption and retry behavior, long histories, failure recovery, accessibility, and the boundary between browser and backend responsibilities. ### Constraints & Assumptions - A user may have many conversations and thousands of messages in one history. - Assistant output arrives incrementally and may include structured content such as code blocks. - A user can stop generation, retry a response, edit a prior message, or leave and return. - Authentication, model execution, and durable authorization decisions remain on the server. - Connections can disconnect, responses can arrive late, and a request can be retried. ### Clarifying Questions to Ask - Which message types and attachments must the client render? - Does editing a prior message create a branch or overwrite later history? - What delivery guarantees and resume support does the streaming API provide? - Must drafts and partially streamed answers survive reloads? - What latency, browser, mobile, and accessibility targets apply? ### Hints - Give messages and generation attempts stable identifiers. - Separate durable conversation state from transient transport state. - Treat stop, retry, reconnect, and out-of-order events as state-machine transitions. ### What a Strong Answer Covers - Component and state boundaries for conversation navigation, message rendering, composer state, and generation controls. - A normalized message model with stable IDs, parent or branch relationships, attempt status, and idempotency keys. - Streaming transport choice, incremental parsing, cancellation, reconnect, deduplication, and late-event rejection. - Optimistic user messages with explicit pending, failed, retrying, stopped, and completed states. - History pagination or virtualization, code-block performance, draft persistence, and cache invalidation. - Accessible live updates, keyboard navigation, focus management, reduced motion, security boundaries, and observability. ### Follow-up Questions 1. How would the client resume a stream after a brief disconnect without duplicating tokens? 2. What state changes when a user edits an earlier message and creates a new branch? 3. How would you keep a rapidly growing code block from causing excessive rendering work? 4. Which data may be cached locally, and how would logout or account switching clear it safely?

Quick Answer: Design the frontend architecture for a streaming AI chat application with long and branching conversations. Cover normalized message state, retries and interruption, reconnect and deduplication, history virtualization, draft persistence, accessible live updates, security boundaries, and failure recovery.

Related Interview Questions

  • Design a Real-Time Player Matchmaking Service - Waymo (medium)
  • Design a Global Small-Image Caching Service - Waymo (medium)
|Home/System Design/Waymo

Design the Frontend for an AI Chat Application

Waymo logo
Waymo
May 11, 2026, 12:00 AM
mediumFrontend EngineerOnsiteSystem Design
1
0

Design the Frontend for an AI Chat Application

Design the frontend architecture for a conversational AI application. Cover streaming responses, conversation state, interruption and retry behavior, long histories, failure recovery, accessibility, and the boundary between browser and backend responsibilities.

Constraints & Assumptions

  • A user may have many conversations and thousands of messages in one history.
  • Assistant output arrives incrementally and may include structured content such as code blocks.
  • A user can stop generation, retry a response, edit a prior message, or leave and return.
  • Authentication, model execution, and durable authorization decisions remain on the server.
  • Connections can disconnect, responses can arrive late, and a request can be retried.

Clarifying Questions to Ask Guidance

  • Which message types and attachments must the client render?
  • Does editing a prior message create a branch or overwrite later history?
  • What delivery guarantees and resume support does the streaming API provide?
  • Must drafts and partially streamed answers survive reloads?
  • What latency, browser, mobile, and accessibility targets apply?

Hints

  • Give messages and generation attempts stable identifiers.
  • Separate durable conversation state from transient transport state.
  • Treat stop, retry, reconnect, and out-of-order events as state-machine transitions.

What a Strong Answer Covers Guidance

  • Component and state boundaries for conversation navigation, message rendering, composer state, and generation controls.
  • A normalized message model with stable IDs, parent or branch relationships, attempt status, and idempotency keys.
  • Streaming transport choice, incremental parsing, cancellation, reconnect, deduplication, and late-event rejection.
  • Optimistic user messages with explicit pending, failed, retrying, stopped, and completed states.
  • History pagination or virtualization, code-block performance, draft persistence, and cache invalidation.
  • Accessible live updates, keyboard navigation, focus management, reduced motion, security boundaries, and observability.

Follow-up Questions Guidance

  1. How would the client resume a stream after a brief disconnect without duplicating tokens?
  2. What state changes when a user edits an earlier message and creates a new branch?
  3. How would you keep a rapidly growing code block from causing excessive rendering work?
  4. Which data may be cached locally, and how would logout or account switching clear it safely?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Waymo•More Frontend Engineer•Waymo Frontend Engineer•Waymo System Design•Frontend Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.