SEO and AI search
Web
AI
Resources
WorkAboutStart a project

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

PartSample lineOur note
Greeting and disclosureHi, 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.
ScopeI 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 ruleAnswer in two or three sentences, then offer one next step.Long answers get abandoned on mobile.
Clarifying questionWhich product or order number is this about?Ask one question at a time, never a form in disguise.
Lead captureWant a person to follow up? Leave a name and a contact method.Ask only after the bot has been useful once.
Human handoffI am passing this to {team}. They reply within {hours}. Here is what I told them.Show the visitor the summary the human will see.
FallbackI 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.
RefusalI 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 caseOpening lineHandoff trigger
Ecommerce supportHi, 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 bookingHi, 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 qualificationHi, 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

  1. Collect 30 real questionsUse past emails, chats and calls. Include rude ones and typos.
  2. Run them through the botMark each answer correct, partly correct, wrong or invented. Invented answers are the ones to fix first.
  3. Tune the fallbacksIf more than a quarter of questions land on the fallback, the knowledge base is thin, not the script.
  4. 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?
A simple name is fine. Skip the invented backstory. The visitor wants an answer, and a persona that pretends to be a person can break disclosure rules.
How many fixed lines should I write?
Eight to ten. The disclosure, handoff, fallback and refusal lines must be fixed text. Everything else can be guided by rules.
Can the bot ask for an email address?
Yes, once it has helped, and with a clear note on why. If you serve EU or UK visitors, link your privacy notice at that moment.
Do I need a different script for voice?
Yes. Spoken scripts need shorter sentences, spelled-out confirmations and a way to interrupt. See our AI chatbot development page for how we handle channels.
Who writes the knowledge base?
You do, with our help. The script only works as well as the documents behind it, so we usually review the top 20 customer questions with you first.

Need the script and the bot built?

Send us your top customer questions and we will propose a scoped build with a fixed quote.