Chatbot script
AI chatbot script template
An AI chatbot still needs a script. It is shorter than the old decision-tree kind, but the opening line, the limits and the handoff decide whether visitors trust it.
In short
A good AI chatbot script has eight parts: a greeting that says it is an AI, a stated scope, answer rules, a clarifying question habit, a lead capture moment, a human handoff, a fallback for unknowns and a refusal line. Write each as a short sample line, then give the model rules instead of fixed replies.
Script versus system prompt
With a rule-based bot you write every reply. With an AI chatbot you write the opening lines and a set of rules, and the model composes the rest. Keep the lines that must be exact, such as the disclosure and the handoff, as fixed text. Put everything else in the prompt as guidance.
Download the checklist as a file and fill the brackets. Paste the fixed lines into your widget settings and the rules into the system prompt. For the build behind it, see AI chatbot development.
The eight parts, with sample lines
| Part | Sample line | Our note |
|---|---|---|
| Greeting and disclosure | Hi, I am an AI assistant for {company}. I can answer questions about {topics}. | Say it is an AI in the first message. Several jurisdictions expect this, and visitors forgive a bot that is honest. |
| Scope | I can help with orders, delivery and returns. For billing disputes I will connect you to the team. | Name two things it does and one it does not. |
| Answer rule | Answer in two or three sentences, then offer one next step. | Long answers get abandoned on mobile. |
| Clarifying question | Which product or order number is this about? | Ask one question at a time, never a form in disguise. |
| Lead capture | Want a person to follow up? Leave a name and a contact method. | Ask only after the bot has been useful once. |
| Human handoff | I am passing this to {team}. They reply within {hours}. Here is what I told them. | Show the visitor the summary the human will see. |
| Fallback | I could not find that in our information. I can ask the team, or you can try rephrasing. | Never invent an answer to avoid this line. |
| Refusal | I cannot help with that here, but {alternative} can. | Always offer a path, not a dead end. |
Rules to put in the prompt
- Answer only from the supplied knowledge base. If the answer is not there, use the fallback line.
- Never state prices, delivery dates or legal terms unless they appear in the supplied text, and quote them exactly.
- Do not promise outcomes, discounts or refunds. Only a human can approve those.
- Match the visitor's language when it is one we support, otherwise say which languages we cover.
- If the visitor sounds upset or mentions a complaint, offer the human handoff in the next message.
- Keep a warm, plain tone. No jokes about the product, no filler praise for the question.
The most common failure we see is a script that tries to sound human instead of being useful. Short, plain and honest beats chatty.
Three scripts worked out
The same eight parts look different by use case.
| Use case | Opening line | Handoff trigger |
|---|---|---|
| Ecommerce support | Hi, I am an AI assistant. Tell me your order number and I will check where it is. | Damaged item, missing parcel, refund request |
| Clinic or service booking | Hi, I am an AI assistant. I can share opening hours and help you request an appointment. I cannot give medical advice. | Any symptom description or urgent wording |
| B2B lead qualification | Hi, I am an AI assistant. What are you trying to solve, and how soon? | Visitor names a budget or a deadline within 90 days |
Healthcare scripts need extra care. Add a line that sends emergencies to local emergency services, and keep the bot away from diagnosis.
Testing the script
- Collect 30 real questionsUse past emails, chats and calls. Include rude ones and typos.
- Run them through the botMark each answer correct, partly correct, wrong or invented. Invented answers are the ones to fix first.
- Tune the fallbacksIf more than a quarter of questions land on the fallback, the knowledge base is thin, not the script.
- Re-test monthlyReview the transcripts the bot handed off and add the missing answers.
Updated 30 October 2026
Questions, answered
Should the chatbot have a name and a personality?
How many fixed lines should I write?
Can the bot ask for an email address?
Do I need a different script for voice?
Who writes the knowledge base?
Keep exploring
AI chatbot development that answers from your content and knows when to stop
A chatbot is judged by the questions it should not answer as much as the ones it should. We design the boundaries first, then build the bot inside…
ComparisonAI chatbot vs rule based chatbot: the real difference
One follows a script you wrote. The other reads what the visitor typed and answers from your content. Each is right for a different kind of…
Free toolAI chatbot cost calculator
Separate the one-off build from the monthly running cost. Enter your conversation volume and the calculator shows token use, model cost and the human…
Need the script and the bot built?
Send us your top customer questions and we will propose a scoped build with a fixed quote.