Design an AI Customer Support Chatbot

A support bot that answers from a company's help center, inspired by Intercom Fin and Zendesk AI: help articles split into passages and embedded in the background, answers grounded only in retrieved passages, common questions answered from a cache, and low-confidence conversations handed to a human with a summary. A teaching design.

Functional requirements

  • Customers ask questions in a chat widget and get answers in seconds.
  • Answers come only from the company's help articles, with links to them.
  • When the bot isn't confident, or the customer asks, the conversation goes to a human agent with a summary.
  • Article edits show up in answers within minutes.
  • Every conversation is kept with the sources used and the outcome.

Non-functional requirements

  • First words of an answer within 2 seconds.
  • Scale: thousands of companies, 3K requests/s at peak.
  • The bot never answers from another company's articles.
  • Handoffs reach the helpdesk within a minute.
  • Availability: 99.9%.

How the design evolves

Stage 1: Send the Whole Help Center

See why stuffing every article into the prompt fails.

What was missing: Nothing yet.

Why that's risky: Large help centers don't fit in the prompt, every question pays for thousands of words, and the model mixes up articles.

What gets added: One server that pastes the company's help articles and the conversation into one huge prompt.

Trade-offs: No retrieval to build, but cost and errors grow with the help center.

Stage 2: Retrieve the Right Passages

Send only the few passages that answer the question.

What was missing: Every question sent the whole help center to the model.

Why that's risky: If retrieval misses the right passage, the bot says it doesn't know; that is better than inventing an answer.

What gets added: Articles are split into passages, embedded by background workers and stored in an index per company. Each question is embedded, the best five passages are retrieved, and the LLM answers only from them, citing the articles.

Trade-offs: Smaller prompts, cheaper and more accurate; retrieval quality now decides answer quality.

Stage 3: An Answer Cache

Answer the same question once, not ten thousand times.

What was missing: During an outage, thousands of customers asked the same question and each one paid for a full LLM call.

Why that's risky: Two questions that look alike can need different answers ("cancel my order" vs "cancel my plan"); keep the similarity threshold strict.

What gets added: A cache of answers to common questions, keyed by meaning and the version of the articles used; an edit changes the version, so stale answers stop matching.

Trade-offs: Fewer LLM calls, at the cost of a check on every question.

Stage 4: Hand Off to a Person

Pass low-confidence conversations to an agent with context.

What was missing: When the bot couldn't help, customers were stuck repeating themselves.

Why that's risky: Too low a threshold floods agents; too high frustrates customers. Track both resolution and handoff rates.

What gets added: When retrieval finds nothing relevant, the model is unsure, or the customer asks for a person, the conversation is queued for handoff. Workers summarise it, open a ticket in the helpdesk, and record it.

Trade-offs: The bot resolves most questions; people handle the rest with full context.

Stage 5: Limits, Redundancy and Monitoring

Stop abuse and remove single points of failure.

What was missing: Bots could spam the widget at the company's expense, and the load balancer and databases were single points of failure.

Why that's risky: Strict limits can cut off a genuine customer typing quickly; limit per minute, not per second.

What gets added: Rate limits per visitor and per plan, a second load balancer, sharded and replicated conversation storage, index replicas, more chat capacity, and monitoring of resolution and thumbs-down rates per company.

Trade-offs: Resolution rate is what customers pay for; it is the number to watch.

PRISM
System Design Interview
Round 1 of 4 · Architecture Design · 60:00 remaining
PRISM logo PRISM logo
Problems
AI Interview
Interview Challenges
Build & Stress Test NEW
System Architectures
Design & Fix NEW
Interactive Roadmap
System Design Guides Interview Prep Guide
Problems
Today's mission
Notifications
    Theme
    Pricing Community NEW Send feedback Report a problem NEW
    Sign in
    Theme
    Community NEW Send feedback Report a problem NEW
    All problems
    Phase
    Build & Stress Test
    Phase 01: Thinking in Systems
    Upcoming

    Components

    User
    CDN
    Load Balancer
    Server
    Cache
    Database
    Blob Storage
    Search Index
    Queue
    Worker
    Rate Limiter
    Service
    API Gateway
    Reverse Proxy
    WebSocket Server
    Third-party API

    Inspector

    Notes
    Use clear names so your design intent is easy to understand.
    Good
    Name by business meaning
    "Order API", "Restaurant Service"
    Avoid
    Generic names = zero signal
    "Server 1", "API", "Queue"
    A short description for each component makes feedback much better.
    100%
    Start by identifying:
    • Users & entry points
    • APIs & services
    • Databases & storage
    • Traffic flow & scale

    Round 1 of 4 Architecture Design

    Run a simulation to see results.

    Time Remaining
    60:00
    System Design Interview

    What are the core functional requirements?
    What are the key non-functional constraints?

    Questions

    Start Evaluation to unlock questions.

    EVALUATE MODE

    Test yourself like it's the real thing.

    A structured 4-module evaluation that mirrors how top companies assess system design candidates.

    Architecture Design
    Draw your system on the canvas. Define components, connections, and data flow.
    FR & NFR Requirements
    Answer functional and non-functional requirement questions about your design.
    MCQ Round
    Multiple choice questions testing your depth on the chosen system.
    Tradeoff Analysis
    Justify your design decisions and defend your architectural tradeoffs.
    AI Report Generated
    Choose a Problem
    No problem selected
    • 30 min
    • 45 min
    • 60 min
    Round 2 of 4
    MCQ Round
    Answer multiple-choice questions based on your design.

    Exit Interview?

    You're in the middle of an interview session. Leaving now will end your current attempt.

    Your progress will be saved.

    Open a saved design

    Select a design to load into the canvas.

    My Evaluations

    Your past evaluation sessions

    Here’s a simple request flow that follows the expected layer order.

    External User
    →
    Edge CDN → API Gateway → Load Balancer
    →
    Compute App Servers / Services
    →
    DataAccess Cache
    →
    Storage Database / Search Index
    →
    Async Queue → Worker

    Tip: keep arrows moving forward through layers (Edge → Compute → Storage). Avoid sending storage back to compute.

    Evaluation Instructions

    Read the rules carefully before starting. The test auto-submits on refresh.

    Before you start

    • Build your architecture on the canvas. The timer starts when you click Start Evaluation.
    • Don't forget to answer Functional Requirement and Non Functional Requirements.
    • When satisfied with your design, click Next to lock it and view the questions.
    • Please answer final step questions to complete the evaluation.

    Dos

    • Do read each question carefully before answering.
    • Do include required components to maximize component coverage.
    • Do save a copy of your design if you want to keep it before submission.

    Don'ts

    • Don't refresh or close the tab during an active evaluation — this will auto-submit your answers.
    • Don't switch app modes or open another tab while the evaluation is running.
    • Don't attempt to edit the design after clicking Next; the workspace will be locked.

    All the best!!

    Confirm

    Input

    Notice

    Evaluation Report
    Report a problem

    Evaluation Complete

    Generating Your Report

    Hang tight — our AI is evaluating your design…

    Did you know?

    Loading…

    Share feedback

    Tell us what worked well and what we can improve.

    Let's personalize this

    Answer a couple of quick questions so we can tailor your journey and missions.

    Your welcome gift: of Full PRISM Access

    Your Pro access starts as soon as you press Start my journey.

    SYSTEM BRIEF

    System Constraints

    What the system must do — every item is a user-facing behaviour your architecture must support.

      ↑ Engineering Constraints

      These are the failure modes you must design against — latency SLAs, durability targets, traffic ceilings.

        ⇆ Architecture Constraints

        Core Concepts to Master

        Your Journey
        PHASE – –
        0 / 0 0%
        0
        Mock Interview Checklist

        Pick a topic to start

        Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.

        Phase Mastered

        You've conquered this phase. These are the skills you now own:

          +500 XP

          Company Interview Paths

          Progress Summary