Design an AI support assistant
It is 9:40pm on a Friday in Bengaluru. Dinner orders are at their peak, it has started to rain, and deliveries are running late across the city. Thousands of people open the help screen at once and type some version of "where is my food" and "I want my money back". A year ago all of them waited for a human agent. Now an assistant answers first, and it has to get the policy right, refund the right orders, and know when to hand a furious customer to a person.
This is the AI design question you are most likely to get, because almost every company is building one. The trap is to answer "RAG plus a chatbot" and stop. The interesting parts are the money, the freshness of the facts, and the handoff.
Step 1: Understand the problem#
| You ask | They say | What it settles |
|---|---|---|
| Does it only answer questions, or can it take actions? | It answers, and it can issue refunds up to Rs 500 when policy allows. Anything else goes to a person. | The single biggest decision on the page. An assistant that moves money needs a policy engine in code, idempotent refunds and an audit trail. The model proposes and code decides. |
| How many conversations, and when? | About 90,000 a day, with dinner peaks around three times the average, and much higher on rainy evenings. | The napkin math, and the fact that the peak coincides with the moment the provider is busiest too. Rate limits and a fallback model are part of the design, not an afterthought. |
| Which languages? | English, Hindi and Hinglish mostly, plus some Tamil, Telugu and Bengali. | A multilingual embedding model, answers in the customer's language, and an eval set per language. Hindi script also costs more tokens per message than English. |
| Where does the knowledge live, and how often does it change? | About 400 help articles and policies, edited weekly. Order data is live in the orders service. | Two different sources, two mechanisms. Policies go through retrieval with versioning. Order state comes from tools at question time and is never indexed. |
| What happens when the assistant cannot help? | Hand off to a human agent, who must not have to ask the customer to repeat everything. | An escalation path with a generated summary, and a set of triggers for when to escalate, which turns out to be a deep dive of its own. |
| How fast must it respond? | First words within about two seconds. | Streaming, a small model for routing, and keeping the prompt lean so time to first token stays low. |
What you are building, and what you cut#
- Answer policy and how-to questions from help content. With citations, in the customer's language.
- Look up live order status and delivery times. Through tools scoped to the logged in customer.
- Issue small refunds that policy allows. Decided by a policy engine in code, capped, idempotent.
- Hand off to a human with a summary. Triggered by rules, not only by the model.
- First token in under 2 seconds at p95.
- Zero refunds issued outside policy.
- Answers grounded in current policy, never a superseded version.
- Survive a provider slowdown during the dinner peak.
- Voice support. A different latency budget and a speech pipeline; mention it and park it.
- Restaurant and rider support. Different users, tools and policies, so a separate assistant.
- Training or fine-tuning a model. Retrieval and prompts carry the facts.
Back of the envelope#
Two numbers decide the design. The peak call rate sets your provider rate limit and is the number to negotiate before launch. And most input tokens are the same system prompt and tool definitions on every call, so prompt caching and routing simple messages to a small model are where the money is.