# What Exactly Is AI? by [kirupa](https://www.kirupa.com/me/index.htm) | filed under [AI Fundamentals](https://www.kirupa.com/ai_fundamentals/index.htm) **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: ![A coffee maker, a washing machine, a toothbrush, and a toaster sit on a shelf, and each one wears a yellow sticker that says NOW WITH AI! A handwritten note asks: even the toaster?!](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_stickers.png) Some of these really are AI. Others are a few `if` statements wearing a very shiny sticker. In the [Introduction to AI Fundamentals](https://www.kirupa.com/ai_fundamentals/introduction_to_ai_fundamentals.htm), 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: ![Four jobs that take intelligence when a person does them: spot the dog in a photo, understand spoken words, win a game of chess, and write a reply to a customer.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_goal.png) 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](http://www-formal.stanford.edu/jmc/history/dartmouth/dartmouth.html). 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](https://www.ibm.com/history/deep-blue), 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](https://www.nomodes.com/larry-tesler-consulting/adages-and-coinages), 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: ![Two panels joined by an arrow labeled over time. Feels like AI: chatbots, image generators, self-driving cars, and AI agents. Just software: chess programs, spam filters, turn-by-turn directions, and spell check.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_effect.png) Everything in the right panel felt like AI once. Spam filters are a great example. In his 2002 essay [A Plan for Spam](https://paulgraham.com/spam.html), 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: ![A thermometer reads 67°F. An arrow leads to the thermostat's rule: if temp < 68°F, heat on, else heat off. The heat on line is highlighted, and an arrow leads to a flame labeled Heat on. A handwritten note points at the rule: a person wrote this!](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_thermostat.png) 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: ![A keyword rule: spam if the email contains free, winner, click here, prize, cash, or act now. WINNER! Claim your prize is marked Spam, which is right. Do you have gluten-free croissants on Saturday? is marked Spam because of free, which is wrong. Claim your reward, verify your account now is marked Not spam, which is wrong.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_keyword_filter.png) 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](https://en.wikipedia.org/wiki/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: ![Two rows. Rules written by a person: rules and a new email go into a program, which gives an answer. Rules learned from examples: old emails and their answers go into training, which gives the rules.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_two_recipes.png) 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)](https://www.cs.virginia.edu/~evans/greatworks/samuel1959.pdf) 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: ![How far each word leans, learned by counting the 22 bakery emails. Leaning spam: claim +1.95, now +1.54, verify +1.25, winner +0.85. Leaning not spam: free -0.13, croissants -0.54, can -1.23, order -1.46. A handwritten note points at free: barely leans either way.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_weights.png) 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: Interactive example: [A spam filter playground](https://www.kirupa.com/ai_fundamentals/examples/what_is_ai_spam_filter.htm) **Try it:** 1. Press **Gluten-free order** and compare the two filters 2. Press **Fr3e c4sh**, then **This is spam** 3. 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: [![A picture of a dog standing on grass under a blue sky. A small square on the dog is zoomed into a 5 by 5 grid of gray squares, each labeled with its brightness from 0 (black) to 255 (white): 91, 172, 172, 201, 233, 57, 168, 88, 158, 207, 52, 142, 126, 168, 199, 52, 137, 172, 195, 210, 68, 166, 173, 209, 210.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_pixels.png)](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_pixels.png) 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: [![Five steps from left to right: pixels, then edges and corners, then textures, then parts like dog faces, and finally the answer, dog. A bracket under the middle three steps says they are learned by the network's layers on their own, with a handwritten note: nobody wrote these clues. The layers learned them.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_layers.png)](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_layers.png?v=9fae4c8d01eb) In a 2013 paper, [Matthew Zeiler and Rob Fergus](https://arxiv.org/abs/1311.2901) 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: ![On the left, six of our photos with no tags: a dog, a croissant, a birthday cake, a dog's face, a sunrise, and a guide dog, with the three dog photos outlined. An arrow leads to a phone where a search for dog finds exactly those three dog photos.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_photo_search.png) 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](https://www.kirupa.com/ai_fundamentals/how_ai_understands_images.htm) 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: ![A customer email, Can I order two dozen croissants for Friday pickup?, goes two ways. On the left, a model that sorts it picks the label Not spam from labels it already knows. On the right, Biscuit, the bakery's help desk bot, writes something new: Yes! Two dozen croissants will be ready Friday. What time works for pickup?](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_classify_generate.png) 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?](https://www.kirupa.com/ai_fundamentals/what_is_an_llm.htm) and [How Transformers and Attention Work](https://www.kirupa.com/ai_fundamentals/how_transformers_work.htm) 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](https://www.apple.com/newsroom/2023/06/ios-17-makes-iphone-more-personal-and-intuitive/) now uses a transformer language model that runs on the phone itself, and it can suggest the rest of a sentence as we type: ![Then: after typing See you at the, the keyboard offers three next words: moment, store, and end. Now: after typing Thanks for the croissants! See you at, the keyboard suggests the rest of the sentence in gray: the bakery on Friday.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_autocomplete.png) 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: [![Four nested ovals. The biggest is AI, which includes expert systems built from hand-written rules. Inside it is machine learning, which includes learned spam filters. Inside that is deep learning, which includes photo search and voice assistants. The smallest, innermost oval is generative AI, which includes chatbots like Biscuit. A thermostat sits outside every oval, labeled not AI.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_nesting.png)](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_nesting.png) 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: ![Four questions on a card: 1, Who wrote the rules: a person, or the data? 2, Can it handle inputs nobody planned for? 3, Does it get better with more examples? 4, Does it make new things, or sort things?](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_test_card.png) 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 table running eight everyday examples through the four questions. Thermostat: rules from person, does not handle surprises, does not get better with examples, does not make new things, so not AI; Keyword spam filter: rules from person, does not handle surprises, does not get better with examples, does not make new things, so pattern matching; Learned spam filter: rules from data, handles surprises, gets better with examples, does not make new things, so machine learning; Recommendations: rules from data, handles surprises, gets better with examples, does not make new things, so machine learning; Photo search: rules from data, handles surprises, gets better with examples, does not make new things, so deep learning; Voice assistant: rules from data, handles surprises, gets better with examples, does not make new things, so deep learning; Autocomplete today: rules from data, handles surprises, gets better with examples, makes new things, so generative AI; Chatbot like Biscuit: rules from data, handles surprises, gets better with examples, makes new things, so generative AI.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_scorecard.png)](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_scorecard.png) 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+](https://www.aboutamazon.com/news/devices/new-alexa-generative-artificial-intelligence) 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](https://www.kirupa.com/ai_fundamentals/why_ai_makes_things_up.htm), and they can stumble on problems that a person finds easy ([What Does It Mean for AI to Reason?](https://www.kirupa.com/ai_fundamentals/what_ai_reasoning_means.htm) digs into why). Here is how these fit next to each other: ![Three panels. Narrow AI does one job each: a spam filter, photo search, chess, and what to watch next. Chatbots today do many jobs unevenly: they write, code, translate, and explain, but still make things up. General AI (AGI), drawn with a dashed outline and a faded brain, would do any thinking job a person can do, and there is no agreed definition or test for it yet.](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_narrow_general.png) 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](https://openai.com/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](https://www.kirupa.com/ai_fundamentals/ai_agents.htm) 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: ![Two toasters on a shelf. The first wears a NOW WITH AI! sticker that is crossed out. An arrow labeled after our four questions leads to the same toaster wearing a new sticker that says HAS A TIMER. A handwritten note points at it: much more honest!](https://www.kirupa.com/ai_fundamentals/images/what_is_ai_callback.png) 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](https://www.kirupa.com/ai_fundamentals/history_of_ai.htm), we'll walk through the decades from that 1956 summer at Dartmouth to the chatbots in our pockets. See you there! Before you go, here are a few things you can do: 1. Test your knowledge by taking the quiz below. 2. Read the next article in the series, [A Brief History of AI](https://www.kirupa.com/ai_fundamentals/history_of_ai.htm), or check out some related content: - [What Exactly Is an LLM?](https://www.kirupa.com/ai_fundamentals/what_is_an_llm.htm). What a large language model actually is, billions of parameters and all. - [How AI Understands Images](https://www.kirupa.com/ai_fundamentals/how_ai_understands_images.htm). How a model turns a grid of pixels into an answer about what’s in a photo. - [Rules vs. Reasoning](https://www.kirupa.com/ai_fundamentals/rules_vs_reasoning.htm). When plain code following our rules beats a model’s judgment, and when it doesn’t. 3. Stuck on something, or curious about a detail we skipped? [Ask on the forums](https://forum.kirupa.com/), and we’ll help you out. ## Test your knowledge! [Take the What Is AI? Quiz](https://www.kirupa.com/quizzes/what_is_ai.htm). Practice with 6 multiple-choice questions and an explanation after every answer.