Courses / System Design Interview / Chapter 46
Module 10 · Design Problems V: AI and Data Systems · Chapter 46 of 49
Design an LLM Customer Support Bot
Builds on Back-of-the-Envelope Estimates, AI Building Blocks: Inference, Embeddings, Retrieval and Agents and Design a Chat Assistant like ChatGPT. Next up: Design an AI Code Assistant.
Part 1 · Requirements and success metrics
What the bot must do
A customer support bot answers a customer's question from the company's help articles, takes a few safe actions on the customer's account, and passes the conversation to a person when it cannot help. It is judged less on how fluent it sounds than on how often it is right and how well it gives up.
The case is an invented broadband provider, Tarang Fibre, whose customers chat with the bot from the app. All of its help articles are public and written for customers, so every customer may read every article. That separates this design from an assistant over a company's private documents, where each person may see only some of them. This chapter does not cover that case.
The functional requirements are four. The bot answers questions from the help articles and shows which article each answer came from. It reads the signed-in customer's own account, such as the plan and recent outages. It takes a small set of actions on that account, here a bill credit for an outage, within rules fixed by the company. And it hands the conversation to a person, with a summary, when it cannot answer, when an action is outside its rules, or when the customer asks for one.