Machine Learning Learns Its Rules from Data, Rule-Based AI Follows Rules People Wrote

In progress

Machine learning (ML) is the part of AI where programs learn to decide or predict from examples instead of being programmed for every case. Rule-based AI does the opposite: developers write the rules, and the system applies them exactly. The choice decides where errors come from: the data in one case, the rule writers in the other.

How Each Approach Gets Its Behaviour

Rule-based AI Machine learning
Source of rules written by people ("if the message contains tracking, send the tracking link") learned from a training set of examples
New situations ignored unless someone adds a rule handled if similar to the training data
Explainability high: every decision traces back to a written rule lower: the decision comes from learned patterns nobody wrote down
Typical failure a case nobody wrote a rule for gaps or bias in the training data

To teach a model to spot ripe apples, you show it thousands of labelled pictures of ripe and unripe ones until it picks out the features that tell them apart. It never receives a written definition of "ripe".

When Rules Are Still the Better Choice

Predictable, well-defined tasks with clear rules (routing a request, validating a format) don't need learning, and rules are easier to explain and audit. ML pays off where the rules are too many or too fuzzy to write down.

References

Review cards

Flashcard A rule-based support bot gets a request type nobody anticipated. What does it do, and what would an ML model do?

The bot can't handle it until someone writes a rule for it. An ML model handles it if the request resembles its training examples.

Quiz An ML model works well in testing but fails for one group of users. What is the most likely cause?
  • The training data under-represented that group
  • Nobody wrote a rule for that group
  • The model applies its rules too strictly
  • The model never received a written definition of each group

A model learns only from its examples, so it fails where the training data is thin. A missing rule is how rule-based systems fail.