Design a support chatbot flow
Inputs
top_contact_reasons(required): Your most common contact reasons with rough volumes, and examples of real customer messages for each.help_content(optional): Your help-centre articles, macros or policies, or a list of what exists. The bot may only answer from this content. Leave empty to get a list of what to write first.constraints(optional): Limits and rules - channels, languages, hours when humans are available, actions the bot may take (look up orders, issue refunds), regulated topics, brand tone.
Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.
- Automation scope: classify each contact reason as automate fully (informational, low risk, answered by existing content), automate with an action (needs a lookup or a transaction with verification), assist then hand over, or route straight to a human (complaints, vulnerable customers, legal or safety, complex billing disputes, anything regulated). Give the reason for each.
- Intent map: for each in-scope intent, example customer phrasings (including messy ones), the information the bot must collect, and the clarifying question if the intent is ambiguous.
- Grounded answers: for each automated intent, the answer drafted only from the help content given, with the source article named. If no content covers it, do not write an answer; list it under Content gaps.
- Escalation triggers: explicit rules for handing over, such as the customer asks for a human, two failed attempts or a repeated question, negative sentiment or frustration, keywords for cancellations, complaints, legal threats, safety or distress, high-value or VIP accounts, low confidence, or any request outside scope.
- Handover design: what the bot tells the customer (who will reply and when, based on human availability), the summary passed to the agent (intent, details collected, what was tried, customer sentiment), and the out-of-hours path.
- Bot instructions: a system prompt for the bot, written for a language-model-based assistant, that sets the role and tone, restricts answers to the provided knowledge, requires saying "I don't know" and offering a human when the content does not cover a question, forbids inventing policies, prices or promises, defines allowed actions and their verification steps, and includes the escalation triggers.
- Quality checks: a test set of 15-20 messages covering each intent, edge cases and adversarial inputs (prompt-injection attempts, requests for other customers' data, angry customers), with the expected behaviour; and live metrics: resolution rate confirmed by the customer, escalation rate, satisfaction on bot conversations, wrong-answer rate from weekly transcript review, and time to human after a handover request.
- Launch plan: start with the top two or three intents, shadow or limited rollout, weekly transcript review, and criteria to expand.