Where the decision logic comes from
Rule-based programming
- A person writes explicit conditions the computer must follow.
- The computer applies the rules exactly as written.
- New spam tricks require new rules written by hand.
- The logic is readable and inspectable by a human.
Learning from examples
- The computer is given many labeled emails and infers the pattern.
- The computer derives its own internal decision logic.
- New tricks are absorbed when new labeled examples are added.
- The logic may be too complex for a person to state directly.
The practical consequence is about who does the work of capturing knowledge. With rules, a human must anticipate every situation in advance. With learning, the human supplies examples and the computer finds the regularities. Neither approach is universally better: rules are transparent and easy to audit, while learned models adapt to patterns that are too subtle or too numerous to write down by hand.