Chapter 1 — What is AI?¶
This chapter presents a framework for understanding any modern artificial-intelligence system, from a spam filter to a large language model. By the end, the reader will be able to distinguish the four main technological families (AI, ML, DL and GenAI), understand where the signal that makes a system learn comes from, and know what changes internally in each type of algorithm during training. No technical experience is required, although becoming familiar with the terms will make the following chapters easier to follow. The chapter closes with MLOps, the engineering that turns a trained model into a product that works reliably in the real world.
Artificial intelligence is not a “mind” or an autonomous entity. It is a family of systems built to optimize a task from data, with a measurable objective, and with the ability to improve through some mechanism of “learning”.
Sometimes these systems classify, sometimes they predict, sometimes they decide and, in the most recent cases, they generate content.
To avoid confusing products, models and marketing, we are going to use a simple framework that lets us understand any modern AI system.
Any “AI system” can be understood by answering:
- What type of AI application is it?: the family/technology it uses
- How does it learn?: where the “teacher” comes from
- How is it adjusted?: how the model changes during training
We will answer each question in order.
1. The General Framework: AI, ML, DL and GenAI¶
An effective way to visualize the hierarchy is the following:
-
Artificial Intelligence (AI): the broadest concept. It refers to machines or software that imitate capabilities associated with human intelligence in order to reason, solve problems or make decisions. In the human-body analogy, AI would be the “brain”.
-
Machine Learning (ML): a branch of AI that lets systems learn from data and improve with experience, instead of depending on explicit rules. In the analogy, ML would be the “training” of that brain.
-
Deep Learning (DL): a specialized type of ML that uses neural networks with many layers to handle complex data such as images, audio or language. It resembles the neurons and deep connections of the brain.
-
Generative Artificial Intelligence (GenAI): a part of DL oriented toward generating content (text, image, audio, code).
AI / ML / DL describe the system's technological family. In this series, “generative” is used as a practical label for systems whose primary output is new content, although technically it also refers to a family of generative models that model distributions and generate samples.
- 🤖 Robot vacuum: efficient routePlans where to go to cover the house while avoiding obstacles.
- ♟️ Sudoku/chess: best moveExplores options and chooses the one that maximizes a score.
- 🗓️ Shop shiftsAssigns schedules while satisfying rules and constraints.
- 🚚 Delivery: multi-stop routeOptimizes visit order to minimize time or distance.
- 📋 Rule-based support (FAQ)If it detects X, it recommends Y by following a defined flow.
- 🚦 Coordinated traffic lightsAdjusts cycles with control logic to reduce congestion.
- 🛒 Supermarket demandPredicts how many units will sell to adjust stock.
- 💶 Default riskEstimates the probability of default to decide conditions.
- 🕵️ Card fraudDetects suspicious transactions by comparing them with patterns.
- 🚪 ChurnPredicts who might cancel a subscription.
- 👥 Customer segmentsGroups similar profiles for more relevant offers.
- 🎯 Product recommendationSuggests items from similar behavior across users.
- 🔓 Face unlockRecognizes a face by comparing it with a learned representation.
- 🎙️ Transcribing voice notesTurns audio into text by learning acoustic patterns.
- 🔤 Reading text in photos (OCR)Detects and recognizes letters in images.
- 👁️ Object detectionIdentifies and locates cars, people and signs.
- 🌙📷 Camera night modeReduces noise and recovers detail by combining information.
- 🖼️ Similar photos in a galleryFinds similar images by comparing visual embeddings.
- ✉️ Drafting an emailGenerates a draft with a specified goal and tone.
- 📝 Summarizing a documentCondenses key points into a short, structured text.
- 🎛️ Rewriting in another toneAdjusts style: more formal, shorter or more persuasive.
- 🖼️✨ Creating an imageGenerates a coherent image from a description.
- 💻 Coding assistantProposes functions, fixes errors and suggests refactors.
- 🎤 Presentation scriptProduces an outline and speaker notes from the topic.
We now know how to identify which technological family a system uses. The second question is: where does the signal that makes it learn come from?
2. How do these systems learn?¶
These are not types of models, but different ways of constructing the learning signal: in other words, what kind of teacher we use.
Supervised / unsupervised / self-supervised / reinforcement learning (RL) describe where the teacher comes from.
Someone tells you the correct answer
If someone already knows the answer, it is supervised learning.
y right
x + yŷŷ vs yIt learns by comparing its answer with the correct one.
When you can obtain reliable labels and measure the error.
A prediction: class, value or probability.
Spam, churn, default risk.
No one gives you the answer
If no one knows the answer, it is unsupervised learning.
x
Goal: find structure
xIt does not look for a correct answer: it looks for useful structure.
When there are no labels but you want to segment or detect outliers.
A useful organization of the data space.
Customer segmentation or anomaly detection.
The data itself creates its teacher
If the data creates the signal, it is self-supervised learning.
x creates y*
Goal: learn a general foundation
y*The data itself creates a provisional task to learn something reusable.
When you have huge amounts of raw data and few human labels.
Embeddings or transferable representations.
Pretraining language or vision models.
You learn through reward or punishment
If it acts and receives a reward, it is RL.
It learns by trying actions and measuring their accumulated reward.
When sequences of actions matter, not just a single isolated prediction.
A policy: what to do in each state.
Games, robotics, control and sequential optimization.
We now know where the “teacher” comes from. The third question completes the framework: what exactly changes inside the model when it learns? The answer depends on the type of algorithm, and understanding it is what separates using AI from understanding AI.
3. How these systems are adjusted¶
Knowing where the signal that makes a system learn comes from (supervised / self-supervised / RL) is not enough.
The key is to understand what is adjusted and how so that the model improves.
3.1 The universal learning loop¶
- Train and predict with the data it currently has.
- Measure the error (or how well it separates / groups).
- Adjust something internal to reduce that error.
- Repeat many times.
Learning = changing internal parameters to make fewer mistakes on data similar to the training data.
3.2 Why a model can learn today and work tomorrow¶
Models are trained on a sample of the world (the data available today) and are expected to capture general patterns that continue to hold in the future.
- If future data is similar, the model generalizes well.
- If it changes substantially (data drift), performance falls and it is advisable to monitor and retrain.
That is why it matters to know what is being adjusted, because each family of algorithms learns in a different way. This is also a key factor because it means AI systems are not static. They need continuous maintenance and monitoring.
3.3 What is adjusted depending on the type of algorithm¶
Think of each algorithm as a machine with a type of parameter. Training means updating those parameters so that predictions fit better and better.
1. Adjust rules / decisions: Decision Trees, Random Forest, XGBoost¶
What changes internally:
- The questions it asks (which variable to inspect).
- The thresholds for those questions (e.g. “more than X?”).
- The structure of the tree (which branches exist and how deep it goes).
It is like building a questionnaire: “if A happens, ask B, otherwise ask C”.
Loan-approval example:
- First candidate rule: “monthly income above X?”: separates applications with greater repayment capacity.
- Then: “debt ratio below Y?”: refines the separation.
- Training = trying many questions/thresholds and keeping those that best separate applications that can be approved from those that should be rejected.
Ask questions first; decide at the end
Training chooses splits. Prediction follows a path down to a final leaf.
2. Adjust probabilities learned by counting: Naive Bayes¶
What changes internally:
- Tables of frequencies/probabilities: which signals appear more often in each class.
- It treats signals as almost independent given the class, so that evidence can be combined simply.
It is like keeping a count: “when it is spam, how many times do I see ‘free’? How many times ‘urgent’?”
Spam example:
- If “free” appears very often in spam and rarely in non-spam, that pushes the prediction toward spam.
- Training = updating those counts with many examples and turning them into probabilities.
The prediction comes from combining simple clues
Count which words appear most often, then combine those signals to decide.
3. Adjust groups by feature similarity: Clustering, k-means¶
What changes internally:
- The position of the group “centers” (each center is called a prototype).
Note: what “similar” means depends on the distance you use and on how you scale the variables.
It is like placing magnets on a map: each data point goes to the nearest magnet, then you move the magnets to the center of each group.
Example:
- Group customers by behavior (frequency, spending, channels) without prior labels, using only the raw data.
- Training = repositioning the centers so that points are as close as possible to their group (more similar customers, closer together).
The groups reposition themselves until they fit the customers
First assign each customer to the nearest group. Then reposition each group and repeat until almost nothing changes.
4. Adjust numerical weights (Neural networks)¶
What changes internally:
- The weights (and biases) in the connections are numbers that indicate how much influence each input signal has when combined.
- In deep networks, there are millions of weights distributed across layers.
Each neuron calculates a weighted sum and then applies an activation function, which lets the system learn non-linear concepts.
Technical deep dive (optional)
Two typical roles of the activation function:
- In internal layers: it adds non-linearity (capacity).
- At the output: it turns a score into something interpretable (e.g. a probability with sigmoid/softmax).
Why the activation function matters:
- Without activation, several consecutive layers would be equivalent to a single linear transformation, so the model would be too rigid.
- The activation introduces non-linearity, which lets the model capture relationships such as “if A and B happen, but not C…”, curves, soft thresholds, etc.
- It also affects training: the type of activation influences how easy or difficult it is to adjust weights in deep layers.
The 4 minimum pieces needed to make the adjustments:
- Activation function: lets systems learn non-linear concepts.
- Loss function: a measure of the “failure” (how wrong the model was).
- Backpropagation: distributes responsibility for the error across the weights (which weights contributed most to the failure).
- Optimizer: decides how much to move each weight at each step (small, repeated steps).
Spam example:
- Signals: “free”, “urgent”, “many links”…
- The network combines signals with weights, passes through activations and produces a score/probability.
- If it fails, it adjusts weights/biases so that next time “free” carries more or less weight, etc.
A single neuron learns linear relationships
It adjusts only one weight (slope) and one bias (offset). That is enough when the data follows a straight line.
Temperature: °C → °F · real points · — fitted curve
A hidden layer makes it possible to learn curves
Several neurons in parallel combine signals and create nonlinear functions. It can now approximate waves and curved shapes.
sin(x) function · real points · — fitted curve
More layers = increasingly complex patterns
Each layer transforms the representation of the data. Stacking them makes it possible to recognize textures, shapes, words, or styles that no single layer could capture on its own.
Complex function · real points · — fitted curve
Epoch — one complete pass through all the training data. Loss — how far the predictions are from the true values; the lower it is, the better the fit.
3.4 What type of data each family is useful for¶
Not every family is equally suitable for every problem. The type of data is often the first decision filter:
| Family | Data where it works well | Where it fails or is not the first choice |
|---|---|---|
| Trees (Decision Tree, Random Forest, XGBoost) | Structured tabular data: numbers, categories, mixed variables. A favorite for business data and Kaggle competitions with tables. | Images, audio, raw text without preprocessing. |
| Naive Bayes | Text (bag of words, token frequencies), categorical data with few correlations between variables. Very fast with little data. | Continuous data with strong correlations; complex relationships between variables. |
| K-means (clustering) | Continuous numerical data where Euclidean distance makes sense: coordinates, scaled behavioral metrics. | Text, high-dimensional data without prior reduction, purely categorical variables. |
| Neural networks | Images, audio, text, time series, video. They shine when the data volume is large and the pattern is complex. | Small tabular datasets: trees often win with lower computational cost. |
These four families illustrate the spectrum of adjustment mechanisms, not the whole map. There are dozens more: SVMs, logistic/linear regression, Gaussian mixture models, Bayesian networks, time-series models (ARIMA, Prophet), ensemble methods, etc. Choosing an algorithm always starts by understanding the type of data and the objective of the problem.
These three axes (technological family, learning type, adjustment mechanism) let us describe any modern AI system. But they all share something: where the logic that makes them work comes from.
4. Classical software vs AI¶
Everything above describes a different way of defining the logic of a solution. It does not change how code is written, but rather where the logic that makes the system work comes from.
In classical software:
- Input data + human-written rules → output
Example: converting Fahrenheit to Celsius with a fixed formula.
- The programmer explicitly writes the rule: C = (F - 32) x 5/9
- If the same Fahrenheit value comes in, the same Celsius value always comes out.
In AI:
- Input data + output data → learned rules
- The “algorithm”, the mathematical formula, emerges from training.
Example: using many (Fahrenheit, Celsius) pairs so that the system learns the conversion.
- You no longer write the exact formula by hand.
- The model adjusts parameters and learns an approximate rule that then generalizes to new values.
This is the basic principle of so-called Software 2.0: the logic is no longer written, it is learned.
This does not yet change how software itself is built, but how solutions are built using AI. The leap in the way software is developed will arrive with LLMs.
This paradigm shift did not happen all at once. There were decades of advances, failures and leaps that explain where we are today and where we are going.
5. Major milestones¶
There is no need to memorize the whole chronology. The important thing is to see what changed in each wave.
| Date | Major milestone | What changes |
|---|---|---|
| 1950 | Turing (paper) | Establishes the conceptual framework for “intelligence in machines”. |
| 1955–1956 | Dartmouth Conference (proposal) | The field of AI is formally born. |
| 1958–1959 | Perceptron and early demonstrations of machine learning (paper · Rosenblatt, paper · Samuel) | The idea of learning from data appears, rather than only from rules. |
| 1980s | Expert systems (XCON case) | First business wave of rule-based AI. |
| 1986 | Backpropagation (paper) | Training multilayer neural networks becomes viable. |
| 1997 | Deep Blue (IBM) | A specialized AI defeats the world chess champion and makes the power of narrow AI visible. |
| 2012 | AlexNet + ImageNet (paper, ILSVRC) | The modern era of deep learning scaled with data and GPUs begins. |
| 2017 | Transformer — “Attention is all you need” (paper) | The base architecture of modern language models appears. |
| 2020–2022 | GPT-3, AlphaFold and ChatGPT (article · GPT-3, CASP14, Nature paper · AlphaFold, announcement · ChatGPT) | Foundation models, direct scientific impact and mass adoption arrive. |
If you want an even simpler mental picture, read it like this:
rules -> statistical learning -> deep learning -> foundation models -> useful AI at scale
All that research culminates in capable and efficient systems. But a capable model is not yet a product. For an AI system to work reliably in the real world, a complete engineering cycle is required.
6. MLOps: the complete cycle for AI to work in the real world¶
MLOps is the “engineering” part that makes AI work reliably in the real world: not only today, but also three months from now when the data, the market or user behavior has changed. (Google Cloud) The key idea:
A trained model ≠ AI in production. In production you need a complete cycle: data → training → deployment → monitoring → improvement.
The clearest way to understand MLOps is as a chain of 8 steps. If one is missing, you normally have a demo, not a product.
- Data (capture): collect signals from the real world (events, transactions, documents, logs).
- Data (prepare): clean and turn data into useful variables (what the model “understands”).
- Train: the model learns patterns from historical examples.
- Evaluate: check that it works “well enough” before touching production.
- Version: record which model it is and which data/version it was trained with (traceability).
- Deploy: put it to work (API or batch), ideally gradually.
- Monitor: check whether the world changes (data), whether the system is healthy (latency/errors) and whether performance falls.
- Feedback and improvement: when the “truth” arrives (real labels), correct, retrain or roll back.
Step
Description
Next reading
The next chapter goes deeper into the most disruptive type of system of the last decade: Chapter 2 — What is Generative AI? →
7. References¶
Core sources
| Key | Source | Short description |
|---|---|---|
| R1 | OECD — Explanatory Memorandum on the Updated OECD Definition of an AI System (OECD) | Clarifies the modern definition of an AI system. |
| R2 | ISO/IEC 22989:2022 — Artificial intelligence — Concepts and terminology (ISO) | Core vocabulary and concepts in the field. |
| R3 | Tom M. Mitchell — Machine Learning (CMU School of Computer Science) | Formally defines learning with E/T/P. |
| R4 | Y. LeCun, Y. Bengio, G. Hinton (2015) — Deep Learning (Nature) | Short overview of the deep-learning revolution. |
| R5 | I. Goodfellow, Y. Bengio, A. Courville — Deep Learning (Deep Learning Book) | Technical foundation for modern neural networks. |
| R6 | R. S. Sutton, A. G. Barto — Reinforcement Learning: An Introduction (Incomplete Ideas) | Classical reference for reinforcement learning. |
| R7 | R. Wirth, J. Hipp — CRISP-DM: Towards a Standard Process Model for Data Mining (cs.unibo.it) | Standard process for data and ML projects. |
| R8 | D. Sculley et al. (2015) — Hidden Technical Debt in Machine Learning Systems (NeurIPS Papers) | Explains why a model alone is not enough for a real system. |
Milestone references
Milestone sources
| Milestone | Source | Short description |
|---|---|---|
| H1 | Alan Turing — Computing Machinery and Intelligence (paper) | Conceptual framework for intelligence in machines. |
| H2 | Dartmouth Summer Research Project on Artificial Intelligence (1955) (proposal) | Foundational act of the field of AI. |
| H3 | Frank Rosenblatt — The Perceptron: A Probabilistic Model for Information Storage and Organization in the Brain (paper) | First major step toward learning from data. |
| H4 | Arthur Samuel — Some Studies in Machine Learning Using the Game of Checkers (paper) | First practical demonstration that a machine can learn to play better than its programmer. |
| H5 | XCON / expert systems in production at Digital Equipment Corporation (XCON case) | Industrial rise of rule-based AI. |
| H6 | Rumelhart, Hinton, Williams — Learning representations by back-propagating errors (paper) | Makes it viable to train multilayer neural networks. |
| H7 | IBM — Deep Blue vs Kasparov (1997) (IBM) | Demonstrates the power of specialized AI in a concrete domain. |
| H8 | AlexNet — ImageNet Classification with Deep Convolutional Neural Networks (2012) (paper) | Triggers the modern era of visual deep learning. |
| H9 | ImageNet / ILSVRC (ILSVRC) | Benchmark that accelerates progress in computer vision. |
| H10 | AlphaGo (2016) — Mastering the game of Go with deep neural networks and tree search (Nature paper) | Combines deep learning and search: first system to surpass the best humans at Go. |
| H11 | AlphaGo vs Lee Sedol (2016) (DeepMind page) | The public milestone that made that technical leap visible globally. |
| H12 | Attention Is All You Need — Transformer (2017) (paper) | Base architecture of today's language and image models. |
| H13 | BERT (2019) — Pre-training of Deep Bidirectional Transformers for Language Understanding (paper) | Consolidates bidirectional pretraining in NLP. |
| H14 | GPT-3 (2020) — Language Models are Few-Shot Learners (OpenAI article) | Scales language foundation models to an unprecedented level. |
| H15 | CASP14 / AlphaFold (2020–2021) (CASP14, Nature paper, DeepMind blog) | Solves the protein-folding problem: the first direct scientific impact of AI at that scale. |
| H16 | ChatGPT (2022) (OpenAI announcement) | Popularizes generative AI at scale with the general public. |
| H17 | University of Reading — Turing Test 2014 (article) | Popular reference in the debate around the Turing test. |
| H18 | AlphaGo — The Movie (2017, dir. Greg Kohs) (documentary · YouTube) | Documentary following the preparation for the match against Lee Sedol from the inside. Recommended for understanding the human and technical impact of the milestone. |
| H19 | AlphaFold: The making of a scientific breakthrough — DeepMind (2021) (video · YouTube) | DeepMind documentary video about the process and impact of AlphaFold. Recommended before reading the paper. |
Frequently asked questions¶
What is the difference between Deep Learning and Machine Learning? Deep Learning is a specialized type of Machine Learning that uses neural networks with many layers to handle complex data such as images, audio or language. ML learns patterns in order to generalize; DL emulates the structure of neural connections in the brain for advanced perception tasks that other algorithms do not reach.
How can a system learn without anyone telling it the correct answer? Through two different routes. In unsupervised learning, the system looks for structure in unlabeled data, such as grouping customers by behavior. In self-supervised learning, the data itself creates the signal: for example, a language model predicts the next token using the preceding text as the “answer”, without any human having annotated it.
Why is logic learned rather than written in AI? In traditional software the programmer defines the rules explicitly. In AI, input and output data cause the logic to emerge from training: the programmer designs the learning process, but the concrete logic that solves the problem is discovered by the model itself. You do not write the formula; you learn it.
What physically changes inside a neural network when the model learns? Millions of numerical weights distributed across the connections between layers are adjusted. Backpropagation distributes responsibility for the error across those weights and the optimizer decides how much to move each one at every step in order to reduce the accumulated error.