Rule-Based Systems, Machine Learning and Generative AI
10 min read
Lesson objectives
- Distinguish explicit rules, machine learning, and generative AI by how they produce outputs.
- Explain the difference between training and inference without assuming automatic continuous learning.
- Choose a simple or hybrid approach that fits the task rather than the most impressive technology.
Three different patterns, not one ladder of intelligence
A system may solve a problem with explicit rules, learn a model from data, or generate new content in response to a prompt. These are not sequential levels through which every system must progress, and newer does not automatically mean more suitable. If a policy is clear and stable and can be implemented with a simple rule, the rule may be more transparent and less costly than adding a model. If the task involves patterns that are difficult to hand-code but can be learned from many examples, machine learning becomes a useful candidate. If the task is to produce new text, images, or code, a generative model may be appropriate with suitable controls and verification.
Training and inference are different functions
In a simplified supervised-learning example, data represents inputs as features and examples provide a target or label. During training, the algorithm adjusts model parameters—such as weights in a numerical model—to reduce loss or error on training data. Later, during inference, the current model uses those parameters to produce an output for a new input. Inference does not mean the model retrains itself after every case, and not every deployed system learns automatically. Updating a model requires a defined process, data, controls, and fresh evaluation.
Deep learning and generation are not synonyms
Neural networks are a family of machine-learning models built from layers and nodes and can learn nonlinear relationships. When networks are large and deep, we commonly refer to deep learning. “Deep,” however, describes the learning architecture rather than necessarily the output type: a deep network may classify an image, predict a value, or form part of a generative system. We should not conclude that all deep learning generates content, nor that every simple predictive task requires a neural network.
Large language models are an important example of generative AI. Simplified, they learn probabilistic relationships among tokens or token sequences and use modern transformer and attention architectures to produce new sequences. Their ability to generate coherent text does not make every sentence a verified fact. We must separate the question “Is this text linguistically suitable?” from “Is this claim correct and supported?”
Teaching comparison Pattern | How behavior is determined | Example output | When useful Explicit rule | Designer-written conditions | Approve/reject using a known threshold | Stable, clear policy Predictive ML | Parameters learned from data | A predicted category or value | Patterns hard to hand-code Generative AI | Model generates a sequence or content | Draft text, image, or code | Creating content that needs review and control Hybrid system | Combines components | Prediction, then a safety rule, then review | When components serve different purposes
Lesson summary
Rules encode explicit conditions, machine learning learns parameters from data, and generative AI produces new content. Training adjusts the model while inference uses the current version; systems may combine multiple patterns.