Prof. Dr. Larry AdamsAcademic, Author & Researcher
Understanding Artificial Intelligence Today · Chapter 5 of 24

Chapter 2. How AI Works: From Rules to Learning Systems

2.1 Rule-based systems

Early AI systems often relied on explicit rules written by people. A rule might state that if a transaction exceeds a threshold and has certain characteristics, it should be flagged for review. Rule-based systems can be transparent and effective where conditions are stable and well understood. They become difficult to maintain when the number of exceptions grows or when the environment changes.

Modern AI does not eliminate rules. Most real deployments combine models with ordinary software, permissions, validation logic, and operating procedures. A model may suggest an action, while rules determine whether that action is allowed.

2.2 Machine learning

Machine learning (ML) is a branch of AI in which a system learns patterns from examples or data rather than relying only on hand-written rules. In supervised learning, examples include inputs paired with labels or outcomes. In unsupervised learning, the system looks for structure without a supplied target label. Reinforcement learning uses feedback or rewards to improve a policy for choosing actions.

A model is trained on a dataset, then evaluated on data that was not used to fit it. This separation helps estimate how well it may generalise to new cases. If the training data are unrepresentative, biased, incomplete, or contaminated, the resulting model may perform poorly for real users.

2.3 Deep learning and neural networks

Deep learning uses neural networks with multiple layers to learn complex representations. These methods have contributed to progress in image recognition, speech processing, language generation, and other tasks. They can learn useful patterns from large datasets, but their internal representations are often difficult to interpret fully.

More parameters and more data do not automatically guarantee better results. Performance depends on data quality, model design, training procedures, evaluation, and the match between the task and the system. Computational costs, energy use, and hardware access can also affect feasibility.

2.4 Training, validation, and inference

Training is the process of adjusting model parameters using data. Validation supports model selection and tuning. Testing estimates performance on a held-out dataset or in a controlled evaluation. Inference is the use of a trained model to produce a prediction or output.

An important practical distinction is that an AI service may change over time. Providers can update models, retrieval sources, filters, or interfaces. Organisations should document which system and version they use when reproducibility matters, and they should retest critical workflows after significant changes.

2.5 Common learning problems

Overfitting occurs when a model learns details of its training data that do not generalise. Data leakage occurs when information unavailable at the time of a real prediction accidentally enters training or evaluation. Distribution shift occurs when real-world inputs differ from the data on which the system was trained or tested. Class imbalance can make a model appear accurate while it performs poorly for a less common group.

Accuracy alone may be misleading. A fraud detector, for example, must balance missed fraud against false alarms. A medical screening model must consider the consequences of false negatives and false positives. The right measures depend on the real-world purpose and costs of error.

2.6 The AI lifecycle

AI should be managed across its lifecycle: define the problem; determine whether AI is appropriate; collect and govern data; select or build a model; test it; deploy it; monitor outcomes; respond to incidents; update or retire it. NIST’s AI Risk Management Framework emphasises a lifecycle approach organised around governing, mapping, measuring, and managing risk (NIST, 2023).