Also reported as Chat System for Customer Service · AI Chat Box
Design a chat system for customer service, where a customer chats with a company's AI agent. For context (public company information, not from the reports): Sierra builds AI agents that handle customer service for companies, over chat and voice.
The round: two reports. In one, it was the candidate's first round of the process (another candidate says their first round was coding instead). In the other, it was the system design round of the onsite, framed as designing an AI chat box. The onsite is in person.
What the reports say was covered:
No report gives scale numbers or says how the round went.
Notes: the requirements beyond these topics, the numbers, the data model, the API, the agent and tool-call design and human handoff in the walkthrough below are ours.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Cover happy path. Clarify scope. Identify the obvious bottleneck. Pick a reasonable storage and reasonable scaling approach.
All of the above plus: explicit failure handling, durability vs latency trade-offs, choose the right batching/caching strategy, articulate why.
All of the above plus: organizational concerns (rollout, migration, on-call), quantitative analysis, multi-region considerations, what could go wrong with the proposed solution at 10x scale.
What the reports say: get the happy path fully right first, then expect most of the depth on failures. One report calls error handling the key part: a partly failing LLM provider and a broken network, with retry with jitter and client-side handling as the answers discussed. In an onsite version, much of the time went to reconnecting, scaling and statelessness once WebSockets are in the design, and an infra candidate went deep on Kubernetes. No report says whether that depth was expected.
Mistakes to avoid (ours, not reported): Retrying immediately without backoff or jitter, so every client or worker retries at the same moment.; Keeping conversation state in the WebSocket server's memory, so a deploy or crash loses it.; Resending a message without an id, so it is stored and answered twice.; Retrying a whole agent turn that already called a tool, so an action such as a refund runs twice.; Appending a regenerated reply to the half-finished one instead of replacing it.; Assuming pub/sub delivery is guaranteed (Redis Pub/Sub drops messages for a subscriber that is not connected).
Edge cases to test (ours): The LLM stream stops halfway through a reply; the provider returns rate-limit errors for a minute; the customer's phone drops the connection while a reply is streaming; a gateway pod is redeployed with thousands of open sockets; the same message is sent twice after a timeout; a tool call times out after the company's system already acted.
Alternative approaches (ours): Server-sent events for the stream plus HTTP POST for sending (simpler through proxies, and the browser reconnects by itself); long polling as a last-resort fallback; a durable stream (Redis Streams or Kafka) instead of plain pub/sub for the live channel.
If you have had this round, tell us how close this page was. It is how we keep the pages accurate.