Learn AI /AI Foundations /Rule-based system
Rule-based system
- Starter
- AI Foundations
- Technical readers
Also called: expert system, symbolic AI.
Back to the milestone you came from
In five seconds
What it is
A rule-based system applies explicit if-then rules to given inputs to produce specified outputs.
In plain words
It is a system that does what people told it to do through clear rules such as 'if this happens, do that'.
An everyday example
A team writes meeting notes on paper cards. Before sorting them, they agree on clear rules: if a card contains a date, put it in the "deadline" tray; if it contains a currency amount, put it in the "budget" tray; if it starts with "Action:", put it in the "tasks" tray. A clerk follows the rule sheet card by card and places each card into the matching tray. If a card does not match any rule, the clerk puts it in a "review by a person" tray.
A real rule-based system checks symbols and conditions very precisely, often faster and more consistently than a person with paper cards. The clerk in the story can use common sense to handle odd wording, but a strict rule-based system usually cannot unless that behaviour was written into rules. Also, many real systems combine dozens or thousands of rules, which is harder to picture with a few trays.
Remember thisRule-based systems can be clear and auditable, but they only do what their written rules cover.
This term is contested
Whether rule-based systems should always be called AI is genuinely disputed. Some people treat them as a classic branch of AI, especially in the history of expert systems and symbolic AI. Others use 'AI' more narrowly and reserve it mainly for machine learning or newer generative systems.
Understand it
Understand it
Why it matters
A non-specialist will hear many things called AI, but they do not work the same way. A rule-based system is often more predictable and easier to audit than machine learning because you can inspect the rules directly. That can be useful for eligibility checks, routing tasks and compliance steps where the logic must be explained. But it can also be brittle: if the rules are incomplete, outdated or badly written, the system can miss important cases. Knowing this helps you ask better questions: Who wrote the rules? How are they updated? What happens when no rule fits? Can a person review edge cases?
How a rule-based system turns inputs into outputs
Show that a rule-based system works by matching inputs against explicit human-written rules, then producing the action linked to the matching rule.
01
1. Input arrives
The system receives text, numbers, form fields or other structured information.
Draw a box labelled 'Input' with example chips such as 'urgent', 'budget', 'date: 14 June' entering from the left.
02
2. Rules are prepared
People have already written explicit if-then rules for the task.
Draw a second box labelled 'Rule list' showing 3 short stacked lines: 'if contains date → deadline', 'if contains amount → budget', 'if starts Action: → task'.
03
3. System checks for a match
The system compares the input with the rules one by one or by a set order.
Draw a decision box labelled 'Does a rule match?' connected to both the input and rule list boxes.
04
4. Output or review
If a rule matches, the linked output is produced. If none matches, the item can be flagged for human review.
From the decision box, draw one arrow to a box labelled 'Output: label, alert or action' and another to a box labelled 'No match: send for review'.
A left-to-right flow diagram with four boxes: input, rule check, match decision and output. Read from left to right. Arrows show that the same input is tested against written rules, then either triggers an action or is sent for review if no rule matches.
Hovering or tapping a sample input highlights which rule matches and which output box receives it; in reduced interaction mode, three fixed examples are shown under the diagram.
Describe this without the diagram
The diagram explains a four-step process. First, an input arrives, such as words from meeting notes or values from a form. Second, a stored list of human-written if-then rules is available, with examples like 'if contains date, mark as deadline'. Third, the system checks whether the input matches any rule. Fourth, if a rule matches, it produces the linked output such as a label, alert or action; if no rule matches, the item is sent for human review. The main lesson is that the behaviour comes from explicit rules written in advance, not from the system learning new patterns on its own.
With reduced motion: A static left-to-right diagram shows the same four boxes and arrows without animation. Under it, three printed examples show one input matching a deadline rule, one matching a budget rule and one going to human review because no rule matched.
A rule-based system uses explicit rules, usually written in advance by people. A rule often looks like this: if a condition is true, then do a particular action. The input can be text, numbers, symbols or answers to questions. The output can be a label, a recommendation, an alert or another action.
The input must be represented in a form the system can check against its rules. For example, a support form might include words such as "password", "billing" or "urgent". The system compares those inputs with its rule list. If a rule matches, the linked action runs.
What happens inside is not training in the machine learning sense. The system does not usually learn new patterns from examples by itself. Instead, people usually define the logic, test it and update it when the world changes. Rule-based systems are one form of symbolic AI. Some expert systems use this approach.
What comes out depends on the rules that matched. The system might sort a message, flag a possible problem or suggest a next step. This can be very reliable when the task is clear and stable. It works less well when language is messy, situations are ambiguous or the rules would become too numerous to manage.
How “Sorting meeting notes with coloured tabs” maps onto the real thing
| In the story | In the AI system |
|---|---|
| rule sheet with sorting instructions | human-written if-then rules |
| paper cards with meeting notes | input data the system receives |
| clerk checking each card against the sheet | rule engine applying the rules |
| labelled trays and review tray | outputs or actions, including escalation when no rule matches |
A worked example
At a regional bureau, a reporting officer configures a rule-based tracker to prepare progress reports for the weekly file review.
Starting from: Document type = progress report; clearance status = pending; deadline status = due by close of business.
- The tracker stores the three input facts in working memory.
- It applies the rule: if the document is a progress report and clearance is pending, place it in the clearance queue.
- It then applies another rule: if the deadline is close of business, mark the item as priority.
- A final rule uses the newly derived facts: if an item is both in the clearance queue and marked priority, flag it for front-office review.
Result: The progress report appears in the priority clearance queue and is flagged for front-office review. The result follows from explicit rules, not from a prediction learned from earlier reports.
In a United Nations workplace
In an evaluation office, a training officer preparing a handover note before close of business records how the approved request workflow operates. If a request is for an introductory, self-paced course, the system sends the standard course link. If it asks for a tailored session, it enters the officer review queue. If the learning objective field is blank, the request is returned for completion.
The rules make routine routing consistent and allow the incoming colleague to see exactly why each action occurs. They can also be amended when the training offer changes. The system is not learning from previous requests. It is applying the conditions written into the workflow.
Before you try thisThe workflow must not infer staff performance, suitability or accommodation needs from free text. Personal or HR-related information must not be entered unless the system is approved for it and access is appropriately controlled. Ambiguous requests and exceptions require human review.
Where you may hear it
- During a vendor demo to an ICT governance board
- In a procurement meeting reviewing workflow requirements
- At a handover on helpdesk routing rules
- During an internal audit walkthrough of an automated control
Avoid confusion
Avoid confusion
Often confused with
Automation
Automation uses a machine or software to carry out set steps with little or no human action after setup.
Machine learning
A way of building computer systems that learn patterns from examples so they can make predictions, classifications or recommendations on new cases.
Generative AI
A type of AI that produces new content such as text, images, audio or video from patterns learned from many examples.
Common misconceptions
Common misconception: Anything that follows rules counts as modern AI in the same way as machine learning.
Correction: Rule-based systems and machine learning both automate tasks, but they work differently. In a rule-based system, people specify the logic directly. In machine learning, a model is fitted from examples and may find statistical patterns that were not written out as rules.
Common misconception: A rule-based system can just keep adding rules forever and handle any problem.
Correction: Adding more rules can help for narrow tasks, but large rule sets become hard to maintain. Rules can conflict, overlap or leave gaps. Tasks with messy language or many exceptions often become too complex for hand-written rules alone.
Common misconception: Because the rules are explicit, the output is always correct.
Correction: Explicit rules make behaviour easier to inspect, not automatically accurate. If the rules reflect outdated policies, poor assumptions or missing cases, the system will apply those mistakes consistently.
Quick check
Which situation best fits a rule-based system rather than machine learning?
The first option explicitly uses human-written checks. The other options describe models that learn or fit patterns from examples or historical data.
Go deeper
Go deeper
The simple version
It is a system that does what people told it to do through clear rules such as 'if this happens, do that'.
The technical version
A rule-based system represents knowledge as explicit symbolic rules, often in if-then form, and applies an inference process to current inputs or facts. The system evaluates conditions, fires matching rules and produces conclusions or actions. In classic expert systems, this may involve a knowledge base, a rule engine and working memory that stores current facts. Depending on design, it may use forward chaining, where it starts from known facts and applies rules to derive results, or backward chaining, where it starts from a goal and checks which rules could support it. This differs from machine learning, where parameters are adjusted from training data rather than the logic being written directly by humans.
Reviewed external resources
Primary sourceRecommendation on the Ethics of Artificial Intelligence (opens in a new tab)UNESCO
UNESCO's Recommendation on the Ethics of Artificial Intelligence gives governance and ethics context and suits readers interested in responsible use in organisations and public institutions.
Intermediatelink checked 2026-07-31
EncyclopaediaRule-based system (opens in a new tab)Wikipedia
Wikipedia gives a broad introductory overview of rule-based systems and suits readers who want a quick background summary.
Intermediatelink checked 2026-07-31
ArticleMachine Learning Glossary (opens in a new tab)Google
Google's Machine Learning Glossary helps readers compare rule-based ideas with machine learning terms and suits beginners moving between the two.
Intermediatelink checked 2026-07-31
VideoVideo explanations: Rule-based system (opens in a new tab)YouTube search
The YouTube search page gives multiple video explanations of rule-based systems and suits readers who prefer to compare different presenters rather than rely on one source.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Rule-based system (opens in a new tab)Reddit search
The Reddit search page gives community discussions and examples of how people talk about rule-based systems in practice and suits readers who want informal questions and viewpoints.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
Rule-based systems can be clear and auditable, but they only do what their written rules cover.