LambdaLabTM
Artificial Intelligence · Class 10 · Unit 2 · Advanced Concepts of Modeling
class 10 aimodelling⏱️ 7 min read

Rule Based and Learning Based

AI modelling is developing the algorithms — the models — that can be trained to give intelligent outputs. There are two ways to go about it, and the whole difference is who writes the rules.

1The two approaches

Rule Based Approach
The developer defines the relationships or patterns in the data. The machine follows the rules it was given and performs its task accordingly.
Learning Based Approach
The machine is fed the data and the desired output, and designs its own algorithm to match one to the other. The model it builds adapts when the data changes.
The top of the model tree

Everything in this unit hangs off one of these two branches. Switch between Rule Based and Learning Based to see how much lives under each.

The machine is given data and works out the rules itself — and keeps adjusting them.

Full lineage: AI Models → Learning Based

2A rule based model at work

A clothing website has a chatbot that answers questions about order tracking. It needs no huge dataset — only a set of questions and the answers that go with them, and rules for matching one to the other:

  • If the message contains “track order”, “shipment status” or “delivery”, go to the order tracking options.
  • If the user gives a valid order number, look the tracking up and show it. If it is invalid, ask them to type it again.
  • If the message matches no rule at all, say “Sorry, I can’t help you with that” and point them at the FAQs.
The drawback — and it is the exam point
The learning is static. Once trained, the machine takes no account of any change in the original training data. Test it on something different from the rules it was given and it will fail and will not learn from its mistake. It cannot improve itself on the basis of feedback.

3A learning based model at work

A spam filter built the learning way is never told what spam looks like. During training it is given a large set of emails, each already labelled spam or not spam. It studies the words used, who sent them, whether there are attachments — and works out for itself which patterns separate the two.

Once trained, it sorts new mail using the patterns it found. And it keeps adapting: every new example it meets improves it. That is the thing a rule based filter can never do.

A thousand photographs of stray dogs

Suppose you have 1,000 photos of stray dogs from your area, and you know nothing about their breeds. Hand them to a learning based machine and it will come back with patterns of its own — grouping by colour, by size, by the style of the fur, perhaps by something you would never have thought of. Nobody told it what to look for.

4Side by side

Rule BasedLearning Based
Who writes the rulesThe developerThe machine works them out itself
NeedsData and rulesData and the desired output
When the data changesIt fails — the learning is staticIt modifies itself to fit the new data
Learns from mistakesNoYes
ExampleAn FAQ chatbot on a shopping siteA spam filter trained on labelled email

5From the board papers

1
A teacher uses a rule-based program to grade students’ essays. The program was trained to look for specific keywords and phrases to assign grades. However, when students start using new words and expressions not included in the training, the program gives incorrect grades. What is the most likely reason?CBSE sample paper 2025–26
1 mark
▶Show the answer

The rule-based approach is static and cannot adapt to new words or expressions. Note what the wrong options offer: more essays would not help, because the program does not learn from essays at all — it only checks the keyword list it was handed.

2
Give the difference between rule based and learning based AI models.Class X handbook, Reflection Time
2 marks
▶Show the answer

In a rule based model the relationships and patterns in the data are defined by the developer, and the machine simply follows those rules. Its learning is static: it cannot improve itself from feedback, and it fails on data unlike what it was given.
In a learning based model the machine is given the data and the desired output and designs its own algorithm. It adapts to changes in the data and handles the exceptions.

6Check yourself

Quick Check

In which approach does the developer define the patterns in the data?

Quick Check

Why does a rule based model fail on data unlike its training data?

Quick Check

Which approach designs its own algorithm to match the data to the desired output?