← All writing
Foundations · 5 min read · 16 Jul 2026

Machine Learning versus AI: Drawing the Line Properly

People use the two terms interchangeably in meetings and marketing copy, but the confusion has real costs when it shapes hiring, budgets, and expectations.

Cover image for the article: Machine Learning versus AI: Drawing the Line Properly

Why the confusion is expensive, not just annoying

I have sat in meetings where someone asks for an 'AI solution' and the room nods, and yet nobody could tell you whether they meant a rule-based decision engine, a large language model, or a logistic regression trained on last quarter's spreadsheet. This is not pedantry. If a hiring manager writes 'AI experience required' when they actually need someone who can build and validate a gradient boosted tree on tabular data, they will filter out perfectly qualified candidates and attract people who talk about AGI at the interview stage instead of discussing cross-validation.

The terms get flattened partly because marketing benefits from the bigger word, and partly because the field itself has never had a clean taxonomy. But there is a defensible way to draw the line, and it is not about vibes or how impressive the output looks. It comes down to what problem is being solved and how the solution gets there.

Artificial intelligence, at the broadest and least controversial level, is a goal: build systems that perform tasks we associate with intelligent behaviour, such as reasoning, planning, perception, or language use. It says nothing about method. A chess engine that exhaustively searches a game tree with hand-written heuristics is AI. So is a spam filter built from statistical patterns in email text. So is a thermostat that adjusts heating based on a decision tree tuned by a human, arguably, though most people would balk at calling that intelligent.

Machine learning is one method for achieving AI goals, not the only one, and not synonymous with it. It is the specific approach of having a system improve its performance on a task by learning patterns from data, rather than following rules a person wrote down explicitly. That distinction, learned versus hand-coded, is the actual line, and it holds up under scrutiny far better than 'AI is the futuristic stuff and ML is the boring stuff', which is the informal definition most people actually use.

A worked example: two spam filters

Imagine two engineers independently build a spam filter for the same inbox of ten thousand emails, four thousand of which are spam.

Engineer A writes explicit rules: if the subject line contains 'FREE MONEY' or the sender domain is on a known blacklist, flag as spam. She refines these rules by reading through misclassified examples and adding new conditions. After a week, her rule set catches 78 percent of spam with a false positive rate of 3 percent on legitimate mail. This system is unambiguously AI, in the broad sense that it automates a task requiring judgement, but it involves no machine learning at all. Every rule was authored by a human and never adjusted itself.

Engineer B instead extracts word frequency features from the same ten thousand emails, splits them into a training set of eight thousand and a held-out test set of two thousand emails drawn from a later time window to avoid leakage, and trains a naive Bayes classifier. The model learns, from the data, that certain word co-occurrences correlate with spam, without anyone writing 'FREE MONEY' into any rule. On the held-out set it achieves 91 percent recall on spam with a 2 percent false positive rate. This is machine learning: the system's behaviour was shaped by statistical patterns discovered in data, not dictated line by line.

Both systems are AI, because both automate a task associated with human judgement. Only the second is machine learning, because only the second improves through exposure to data rather than through explicit programming. If someone in a meeting says 'we used AI to filter spam', that sentence is true for both engineers. If someone says 'we used machine learning', only Engineer B can honestly claim it. The distinction is not about which system performed better, notice that B happened to outperform A here, but performance is not the defining criterion; a hand-coded rule set can beat a poorly trained model, and often does on small, well-understood problems.

spam email inbox screen

Where the boundary gets genuinely blurry

The line is clean in the spam filter example, but it gets harder in practice, and it is worth being honest about where.

Expert systems from the 1980s, built from thousands of hand-crafted if-then rules elicited from domain specialists, are AI without being machine learning by most definitions, yet some of them included simple statistical weighting schemes that blur the boundary. Reinforcement learning sits closer to what most people mean by 'learning', since an agent adjusts its behaviour based on reward signals from an environment, but the environment and reward function are often still hand-designed by engineers, so the line between 'learned' and 'engineered' is a matter of degree rather than a hard binary.

Deep learning, which trains large neural networks on large datasets, is a subset of machine learning, not a separate category, though public discourse increasingly treats 'AI' as a synonym for 'deep learning' specifically, which erases decades of AI work that predates neural networks entirely and ignores machine learning methods, like gradient boosted trees or support vector machines, that remain the stronger and more interpretable choice for many tabular problems.

Large language models complicate things further because they are trained with machine learning techniques, next-token prediction over enormous text corpora, but their behaviour at inference time can look like reasoning or planning, which are classic AI-goal descriptions rather than ML-method descriptions. The model is a machine learning artefact; whether its outputs constitute 'intelligence' in any meaningful sense is a separate and much harder philosophical question that the engineering definition does not try to answer.

The practical takeaway

When you hear 'AI' or 'machine learning' used in a job posting, a product pitch, or a research claim, ask one concrete question: is the described behaviour the result of a system learning patterns from data, or is it the result of a human encoding rules or logic directly? That single question resolves most of the ambiguity without needing a philosophy seminar.

It also has a direct payoff for evaluation. If a system is machine learning, you should immediately ask about the train and test split, whether there is any temporal or feature leakage, and what the baseline was. If a system is AI but not machine learning, those questions are irrelevant and you should instead ask about rule coverage and maintenance cost as the underlying data drifts. Knowing which category you are in tells you which questions are worth asking, and that, more than any dictionary definition, is why the distinction is worth keeping precise.

decision tree diagram whiteboard
← All writing See the project case studies →