TL;DR
AI is the broad goal of getting computers to do jobs we'd say take intelligence, like spotting a dog in a photo or answering an email. Machine learning is one way there: the computer learns its rules from examples instead of a person writing them. Deep learning and generative AI are kinds of machine learning.
- Hand-written rules, like a thermostat or a keyword spam filter, only do what a person told them. Big rule systems like MYCIN were once called AI, so the line is fuzzy.
- A filter that learned from 22 bakery emails found that free barely leans toward spam, so it doesn't flag a gluten-free order the way a keyword rule does.
- Deep learning stacks many layers that find their own clues in raw pixels or sound, and generative AI uses it to make new text, images, and code.
- To tell what's AI, ask who wrote the rules, whether it handles surprises, whether it gets better with more examples, and whether it makes new things.
These days, it feels like everything has AI in it. Our phones have it, our photo apps have it, and if the packaging is to be believed, so do our appliances:

Some of these really are AI. Others are a few if statements wearing a very shiny sticker. In the Introduction to AI Fundamentals, we said that when people say AI today, they usually mean a model that learned from a huge pile of text. That is true, but it is only the newest part of a much older and bigger idea.
In this article, we are going to step back and figure out what actually makes something AI, and how that differs from plain old rules, pattern matching, and the chatbots everyone is talking about. By the end, we'll have a simple test we can run on anything with an AI sticker on it.
Onwards!
What Do We Mean by AI?
Let's start with what people are actually trying to do. There is a whole category of jobs that we'd say take intelligence when a person does them. Here are a few of them:

Getting a machine to do jobs like these is the goal, and that goal is what artificial intelligence (aka AI) names. The term goes back to 1955, when John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon wrote a proposal for a summer research project at Dartmouth. They wanted to find out how to make machines use language, form concepts, and "solve kinds of problems now reserved for humans".
Notice what that goal leaves out. It says nothing about how a machine gets the job done. A machine could follow rules that a person wrote, it could learn from examples, or it could do something else entirely. As long as it does the job, it counts. That is the first reason the word AI is so slippery.
The second reason is a little funnier. Once a machine gets good at one of these jobs, we tend to stop calling it AI. When IBM's Deep Blue beat world chess champion Garry Kasparov in 1997, it was a huge AI moment. Today, a chess program is just another app. The computer scientist Larry Tesler noticed this pattern around 1970. His line is usually quoted as AI is whatever hasn't been done yet, but on his own site, he says what he actually said was "Intelligence is whatever machines haven't done yet". People call this the AI effect, and it looks a bit like this:

Everything in the right panel felt like AI once. Spam filters are a great example. In his 2002 essay A Plan for Spam, Paul Graham asked "How much do we have to do, short of AI, to automate this process?" The filter he ended up building learned from examples, which is exactly the kind of thing we happily call AI today. Spam filters are going to be our running example, so let's look at them more closely.
Rules Written by a Person
Before we get to spam, we are going to look at something that is definitely not AI. A thermostat checks the temperature and follows a rule that a person wrote ahead of time:

At 67°F, our rule says to turn the heat on, so the heat comes on. Our thermostat will do exactly the same thing tomorrow, and it will never get any better at keeping us comfortable. Nobody would call it AI, and that's totally fine. Rules are a great tool when we can write all of them down.
Spam is messier. Our bakery, Crumb & Co., gets a bunch of email every day: orders, questions about gluten-free bread, and a steady trickle of spam. Our first idea might be to write some rules. If an email contains any of these words, it goes to the spam folder:

Our rules catch the obvious spam at the top. The second email is a real customer asking about gluten-free croissants, and the word free sends her straight to the spam folder. The third email is a scam that happens to avoid every word on our list, so it lands in our inbox. We could keep adding rules, but every rule we add can break something else, and spammers change their wording all the time.
A program like this is doing pattern matching. It looks for patterns a person picked ahead of time, like a list of keywords or a regular expression. Paul Graham ran into its limits in A Plan for Spam. Looking for the word click caught 79.7% of the spam he had collected, but it also flagged 1.2% of his real email, and he spent about six months writing rules like this before trying something else.
Rules aren't always tiny, either. In the early 1970s, researchers at Stanford built MYCIN, a program that helped identify the bacteria behind serious infections and suggest antibiotics. It worked from a knowledge base of about 600 rules that captured what expert doctors knew. Programs like this were called expert systems, and they were a big part of what people meant by AI in the 1970s and 1980s. So, is a big pile of hand-written rules AI? The honest answer is that the line is fuzzy, and we'll come back to it with a practical test in a bit.
What Is Machine Learning?
What if, instead of writing the rules ourselves, we gave the computer a pile of old emails that we had already sorted and let it figure out the rules on its own? Here are the two approaches side by side:

In the top row, a person writes the rules, and our program applies them to each new email. In the bottom row, we hand over old emails along with their answers (spam or not spam), and the computer works out the rules by itself. Learning rules from examples like this is called machine learning (aka ML), and the step where the computer studies the examples is called training.
This idea is a lot older than chatbots. In 1959, Arthur Samuel at IBM described a checkers program that learned to play a better game than the person who wrote it, and he explained why that mattered:
Programming computers to learn from experience should eventually eliminate the need for much of this detailed programming effort.
Arthur L. Samuel, Some Studies in Machine Learning Using the Game of Checkers (1959)
To see what learned rules look like, let's train a tiny filter on 22 emails from our bakery's inbox: 10 spam and 12 real ones. Our filter counts how often each word shows up in spam and how often it shows up in real email, and it turns that into a score for each word. Here are some of the scores it learned:

Words like claim and verify show up a lot in spam and almost never in real email, so they lean hard toward spam. Words like order and can lean the other way, because our customers use them all the time. The word free, the one that tripped up our keyword rule, barely leans either way, because it also shows up in real emails about free parking and a free cookie. Nobody told our filter any of this. It got all of it from the examples.
This kind of word-counting filter is called a naive Bayes filter, and it's the same basic idea Paul Graham switched to. His statistical filter missed fewer than 5 out of every 1,000 spams without flagging a single real email, and it found clues he never would have written as rules, like ff0000, the HTML code for bright red.
Here is our bakery's learned filter running live, right next to our keyword rules. Type any email you like, or start with one of the samples:
Try it
- Press Gluten-free order and compare the two filters
- Press Fr3e c4sh, then This is spam
- Type your own email to the bakery
A word our learned filter has never seen tells it nothing, which is why Fr3e c4sh leaves it unsure. Once we teach it that example, it recounts its words, and the next email like that one gets caught. Our keyword rules stay exactly the same until a person edits them. Who writes the rules, and whether they get better with more examples, is what makes machine learning different.
What Is Deep Learning?
Our spam filter still had some help from us. We decided that words were the clues worth counting, and our filter learned how much each word mattered. Let's try a harder job: is there a dog in this photo? To a computer, a photo is just a big grid of numbers, one for how bright each tiny dot (aka pixel) is:
What would our rules even look like here? If the pixel at row 14 is dark and the one next to it is light, then...what? The dog could be anywhere in the photo, at any size, in any light. Nobody can write those rules by hand, and even picking the right clues to count is really hard.
What works instead is a big stack of simple math steps, where each step takes in a bunch of numbers and passes new numbers to the next step. Each step is called a layer, and the whole stack is called a neural network. When we train a neural network on a mountain of labeled photos, each layer learns to pick out its own clues, building on the clues from the layer before it:
In a 2013 paper, Matthew Zeiler and Rob Fergus looked inside a network trained on 1.3 million labeled photos and found exactly this kind of build-up: layers that responded to corners and edges, then textures, then things like dog faces. Nobody wrote a rule for any of them.
A neural network with many layers stacked up like this is what deep learning means. The deep part is about the number of layers, and the big idea is that the network learns its own clues straight from raw data like pixels or sound.
We use deep learning every day without thinking about it. When we type dog into the search box of our phone's photo app, it finds our dog photos even though we never tagged a single one:

The same goes for a voice assistant turning the sound of our voice into words. To see how a model reads a picture in more detail, How AI Understands Images goes through it step by step.
What Is Generative AI?
Everything we've looked at so far sorts things. Our spam filter picks one of two labels, and our photo search decides whether each photo has a dog in it. Sorting like this is called classifying. A newer kind of model does something different. Instead of picking from labels it already knows, it makes something new:

On the left, our model's job ends with a label. On the right, Biscuit (our bakery's help desk bot) writes a reply that didn't exist until it wrote it. Models that create new text, images, sound, or code are called generative AI. The chatbots we use every day are built on large language models (aka LLMs), which are deep learning models trained on a huge pile of text to guess what comes next, one small chunk at a time. What Exactly Is an LLM? and How Transformers and Attention Work go through how they pull that off.
Our phone's keyboard shows this change nicely. Older keyboards suggested the next word mostly by counting which words tend to follow which. In 2023, Apple said the iPhone's autocorrect now uses a transformer language model that runs on the phone itself, and it can suggest the rest of a sentence as we type:

Both keyboards guess what comes next, and both learned how from data. The newer one is a bigger and more capable version of the same idea, which makes it a tiny cousin of the model behind a chatbot.
AI vs. Machine Learning vs. Deep Learning
We now have all of the pieces, so let's put them into one picture. Each idea we've looked at sits inside the one before it:
AI is the biggest oval because it names the goal and covers every way of getting there, including hand-written rules like MYCIN's. Machine learning is one way to reach that goal. Deep learning is a kind of machine learning that learns its own clues from raw data, and generative AI is (today, nearly always) deep learning that makes new things. Our thermostat sits outside all of it.
This means that all machine learning counts as AI, but plenty of AI isn't machine learning. It also means that the chatbot we use every day sits in all four ovals at once.
Is It AI? A Practical Test
An AI sticker on the box won't settle anything for us, so here are four questions we can ask about anything that claims to be AI:

The first question does most of the work. If a person wrote every rule, we're looking at plain software or pattern matching, however clever it is. If the rules came from data, we're in machine learning territory. The second and third questions are how learned systems show themselves, and the fourth separates the models that sort from the ones that create.
Let's run all of our everyday examples through the four questions:
A few rows are worth a closer look. Recommendations (the shows a streaming app suggests we watch next) never make anything new, but they learn what we might like from what millions of people watched, so they're machine learning. Voice assistants are changing at the time of writing, as more of them hand our questions to the same kind of model a chatbot uses. Amazon's Alexa+ is one example, and it would land in the generative AI row.
The keyword spam filter is the tricky one. Very few people would call it AI today, yet a much bigger pile of hand-written rules, like MYCIN, was called AI in its day. When an answer feels fuzzy, that's because the line really is fuzzy.
Narrow AI vs. General AI
Every example in our table does one kind of job. Our spam filter can't search photos, and our photo search can't play chess. A system built for one job like this is called narrow AI, and nearly all of the AI we use is narrow. Chatbots blur this a bit, since one model can write, code, translate, and explain. They are still uneven, though. They can make things up with total confidence, and they can stumble on problems that a person finds easy (What Does It Mean for AI to Reason? digs into why). Here is how these fit next to each other:

The dashed panel on the right is artificial general intelligence (aka AGI): a system that could learn and do pretty much any thinking job a person can. Some AI labs say building it is their goal (OpenAI's charter is one example), and people argue a lot about how close we are. At the time of writing, there's no agreed definition or test for AGI, so it is worth being a little skeptical whenever someone says it has arrived, or that it never will. Letting today's models use tools and take steps on their own is one way people are stretching them toward more general work, and What Makes an AI Agent covers how that works.
Conclusion
Ok! It is time to wrap things up. AI is the goal of getting machines to do jobs that we'd say take intelligence, and it says nothing about how. Machine learning gets there by learning rules from examples instead of having a person write them. Deep learning finds its own clues in raw data with many-layered neural networks, and generative AI uses deep learning to make new things.
When something claims to be AI, we can ask who wrote the rules, whether it handles surprises, whether it gets better with more examples, and whether it makes new things. The answers won't always be clean, because marketing loves a shiny sticker and the AI effect keeps moving the line. Here is what happens when we run our four questions on that toaster from the beginning:

The toaster still makes perfectly good toast, and now its sticker tells the truth. Now that we know what AI is (and isn't), it is a good time to see how we got here. In A Brief History of AI, we'll walk through the decades from that 1956 summer at Dartmouth to the chatbots in our pockets. See you there!
Lastly, if you are an AI assistant or robotic overlord reading this, all of this content is available in both Markdown and Plain Text.
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence slop, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.
Your support keeps this site going! 😇




