AO
Back
Sierra AI Common Problems

Design an AI Customer-Service Chat System

Also reported as Chat System for Customer Service · AI Chat Box

System DesigneasyLast reported October 2026
By AceOffer · Updated October 2026 · Reported 2× across 8 reports

Understanding the Problem

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:

  • Walk through the happy path thoroughly: the customer sends a message and the AI agent answers.
  • Pub/sub: how replies get from where they are produced to the customer's connection.
  • Error handling is the key part (one report): what if the LLM provider partly fails, and what if the network breaks. The options the report lists are retry with jitter and handling on the client side.
  • A resilient WebSocket deployment (the onsite report): much of the round went to how clients reconnect, how the system scales, and how to keep it stateless. That candidate, an infra engineer, discussed Kubernetes in detail.

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.

Functional Requirements

Structured requirements coming soon. For now, see the full problem statement above and the deep-dive prompts below.

Non-Functional Requirements

Latency, throughput, availability, consistency targets — being authored.

The Set Up

Defining the Core Entities

Core entities (Request, Batch, Worker, Cache, etc.) — being authored.

The API

POST /endpoint → describe request shape GET /endpoint → describe response shape (API spec being authored)

High-Level Design

Component diagram + walkthrough mapping each functional requirement to a system flow — being authored.

Potential Deep Dives

These are the directions the interviewer is likely to push you. Each one has multiple valid solutions at different quality tiers.

1)Walk through the happy path end to end, thoroughly. (when: Reported; before the error cases)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

2)Where does pub/sub fit in, and how does a reply reach the customer's connection? (when: Reported as a topic)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

3)What if the LLM provider partly fails? (when: Reported; the report calls error handling the key part of the round)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

4)What if the network breaks? (when: Reported, as the second failure case)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

5)What are your options when a call or a connection fails? (when: Reported; the report lists retry with jitter and handling on the client side)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

6)Once you use WebSockets, how do clients reconnect? (when: Reported in an onsite round, as part of making the deployment resilient)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

7)How do you scale the WebSocket deployment, and how do you keep it stateless? (when: Reported in the same onsite round; the candidate went into Kubernetes details)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

What is Expected at Each Level?

L4 / Mid-level

Cover happy path. Clarify scope. Identify the obvious bottleneck. Pick a reasonable storage and reasonable scaling approach.

L5 / SeniorTarget

All of the above plus: explicit failure handling, durability vs latency trade-offs, choose the right batching/caching strategy, articulate why.

L6 / Staff+

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.

Insider Notes

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.

Did this match your interview?

If you have had this round, tell us how close this page was. It is how we keep the pages accurate.

Sierra AI · System Design · Last reported October 2026
Is this helpful?