AI & Automation
Rule-Based Chatbot
Definition
A rule-based chatbot answers using predefined rules, keywords, and decision trees, following a script set by its designers rather than interpreting language on its own.
What is a rule-based chatbot?
A rule-based chatbot answers using a set of predefined rules, keywords, and decision trees written by its designers. It does not interpret the meaning of a message; instead it matches the input against patterns it has been told to look for and returns the reply mapped to that pattern. Because every path is defined in advance, its behaviour is completely predictable.
These are the oldest, and still one of the most widely used, kinds of chatbot. You meet them as the menu-driven bots that offer a set of buttons to tap, or the keyword bots that scan a message for a trigger word and respond with a scripted answer.
How a rule-based chatbot works
Most rule-based bots are built as a decision tree. The conversation starts at a root and branches based on what the user selects or types, and each branch leads either to an answer or to a further question. A booking bot, for instance, might ask for a date, then a time, then a party size, guiding the user down a fixed path one step at a time.
Simpler versions rely on keyword matching: if a message contains "refund", show the refund policy; if it contains "hours", show opening times. This is quick to set up and needs no training data, but it is brittle. The bot only recognises the words and paths its designers anticipated, so an unexpected phrasing, a combined request, or a spelling mistake tends to fall through to a fallback message or a dead end.
Rule-based versus AI chatbots
The alternative is an AI, or LLM-powered, chatbot, which interprets language rather than matching keywords. Instead of a fixed tree, it uses intent recognition to work out what a message means, and can answer open-ended questions phrased in ways no one scripted in advance. This is closely related to conversational AI, the broader field of systems that understand and respond in natural language, and the distinction is explored further in AI agent vs chatbot.
Each approach has genuine strengths. A rule-based bot is predictable, cheap to run, and well suited to structured, compliance-sensitive flows where you want exactly one correct path. Its weakness is flexibility: it cannot handle anything outside its script. An AI chatbot is far better at the long tail of natural, varied questions and scales to phrasings no one wrote by hand; its trade-off is that it must be grounded in a trusted source to stay accurate, rather than generating answers freely.
Many teams use both, letting rules drive tightly structured transactions while AI handles the open-ended questions. Keeping that conversation coherent across turns is the job of dialogue management, whichever engine is answering.
Which one fits your support
The right choice depends on the questions you receive. If your customers mostly ask a small, fixed set of things, a rule-based bot can serve them reliably. If they arrive with the full, messy range of real questions, an AI chatbot that understands language and answers from your knowledge base will resolve far more of them without a dead end, provided it is grounded so its answers stay factual.
Why it matters
Example
A rule-based chatbot on a delivery page offers three buttons: 'Track my order', 'Change address', and 'Something else'. Tap a button and it follows that branch perfectly. Type 'my parcel is late and I've moved house', though, and it cannot combine the two requests, so it falls back to the menu or hands off to a human.
How Resolve247 helps
AIChatbot understands the question
Rule-based bots follow a script; Resolve247's AIChatbot understands a question in natural language and answers from your knowledge base, so customers do not have to guess the right keyword or button. When it is not confident, it hands over to your team rather than looping through a menu.
30 day free trial, no cc required!
Related terms
Frequently asked questions
What is a rule-based chatbot?
A rule-based chatbot answers using a set of predefined rules, keywords, and decision trees written by its designers. It matches a message against patterns it has been told to look for and returns the mapped reply, rather than interpreting the meaning of the message.
When does a rule-based chatbot work well?
It works well for a small, fixed set of questions and for structured, compliance-sensitive flows where you want exactly one correct path, such as taking a booking or qualifying a lead. Its behaviour is predictable and it is quick to set up without training data.
How does a rule-based chatbot differ from an AI chatbot?
A rule-based bot matches keywords and follows a fixed decision tree, so it only handles what its designers scripted. An AI, or LLM-powered, chatbot interprets language and can answer open-ended questions phrased in ways no one anticipated, provided it is grounded in a trusted source to stay accurate.
Can rule-based and AI chatbots work together?
Yes, and many teams combine them. Rules can drive tightly structured transactions where a single correct path matters, while an AI chatbot handles the open-ended questions that do not fit a script. The two approaches complement each other rather than being mutually exclusive.