# What AI & Machine Learning Actually Are

> AI is a big umbrella, machine learning is the part of it that learns rules from examples instead of being hand-coded, and today's chatbots are powerful pattern-matchers - not minds - that can be confidently wrong.


---

# What AI & Machine Learning Actually Are

You hear the words every day now. AI this, machine learning that, deep learning, LLMs, neural networks.
Maybe you've nodded along in a meeting while quietly unsure whether those are four names for the same
thing or four different things. Maybe a tool at work suddenly has "AI" stamped on it and you can't tell if
that's real or marketing. You're not behind - almost nobody was handed a clear, hype-free explanation of
what these words actually mean.

This guide fixes that, from zero. No math, no jargon you haven't been given first, and no breathless
claims about robots. By the end you'll have a working mental model of what AI and machine learning really
are, the one big idea that separates them from ordinary code, and a clear picture of what today's AI can
and can't do - so you can read past the hype and reason about this stuff on your own.

## How to read this
- **Total beginner?** Read in order - each phase builds on the last, and none assumes the one before was
  "obvious."
- **Just want the buzzwords untangled?** Phase 1 alone clears up the AI / ML / deep learning / LLM soup in
  one sitting.

## The phases
1. **[AI vs ML vs Deep Learning vs LLMs](01-the-nested-circles.md)** - the nested-circles mental model and
   a plain-language definition of each buzzword, so the soup finally separates.
2. **[Rules vs Learning](02-rules-vs-learning.md)** - the one idea everything rests on: old code is rules a
   human wrote; machine learning *learns* the rules from examples. When that wins, and when it doesn't.
3. **[What AI Is and Isn't](03-what-ai-is-and-isnt.md)** - the clear-eyed framing: today's AI is powerful
   pattern-matching and prediction, not understanding - which is exactly why it's sometimes confidently
   wrong.

> This is the front door to the AI & ML track. The deeper mechanics - how a model is actually trained, how
> to call a model from your own code, and the day-to-day craft of working with data - each get their own
> guide and build on the model you install here.


---

# AI vs ML vs Deep Learning vs LLMs

Here's the thing nobody tells you up front: these four words are not four competing technologies. They're four circles nested inside each other, like Russian dolls. Once you see the nesting, the buzzword soup separates into a clear picture - and you'll never again wonder whether "AI" and "machine learning" are the same thing (they're not, but one lives inside the other).

Let's build that picture before we define anything.

## The one diagram that untangles it all

```mermaid
flowchart TD
  subgraph AI["ARTIFICIAL INTELLIGENCE - make a machine seem smart"]
    subgraph ML["MACHINE LEARNING - learn from examples, not hand-written rules"]
      subgraph DL["DEEP LEARNING - ML using big neural networks"]
        LLM["TODAY'S LLMs<br/>(ChatGPT, Claude, …)"]
      end
    end
  end
```

Every inner circle *is* an example of the circle around it. An LLM is a kind of deep learning. Deep learning is a kind of machine learning. Machine learning is a kind of AI. So when someone says "we use AI" and someone else says "we use machine learning," they might be describing the exact same system - just at different zoom levels. Now let's define each ring, from the outside in.

## Artificial Intelligence - the outermost circle

**What it actually is.** AI is the oldest and broadest term, and it's deliberately vague. It just means: *getting a machine to do something that, if a human did it, you'd call "intelligent."* Playing chess. Recognizing a face. Understanding a sentence. Planning a route. That's the whole umbrella.

**Why people get this wrong.** Most people hear "AI" and picture a thinking, conscious mind - the movie robot. But the word has covered far humbler things for decades. The chess opponent on an old computer was AI. The little ghosts chasing you in Pac-Man were running AI. None of those "think." AI is a goal ("seem smart at this task"), not a claim about consciousness.

📝 **Terminology.** *Artificial Intelligence (AI)* = the broad field of making machines perform tasks that normally require human intelligence. It says nothing about *how* - only about the goal.

**The gotcha.** Because AI is so broad, it's the favorite word of marketing departments. "Powered by AI" can mean a genuine learning system - or a handful of `if` statements someone wrote on a Tuesday. The word alone tells you almost nothing. The next ring in is where the real distinction lives.

## Machine Learning - the circle that learns

**What it actually is.** Machine learning is the slice of AI where the machine isn't handed the rules by a human - it *figures the rules out itself* by studying examples. You don't write "a cat has pointy ears and whiskers." You show it thousands of labeled photos and let it work out, on its own, what separates "cat" from "not cat."

**Why this is the important ring.** This is the shift that made the last decade possible, and it's so central that the whole next phase is devoted to it. For now, hold onto this: *traditional code is rules written by a human; machine learning is rules learned from data.* Same goal (do the smart task), opposite method.

📝 **Terminology.** *Machine Learning (ML)* = a way of building AI where the system learns patterns from data rather than following rules a programmer wrote by hand.

**The gotcha.** Not all AI is machine learning. A rule-based system - even a clever, useful one - is AI but *not* ML, because a human still wrote every rule. When someone says "machine learning," they're making a specific claim: this thing *learned*. That's a stronger, more meaningful statement than "AI."

## Deep Learning - ML with neural networks

**What it actually is.** Deep learning is machine learning done with a particular tool: a **neural network** - a model loosely inspired by how brain cells connect, built from many simple math units wired in layers. "Deep" refers to having *many* layers stacked up, one feeding the next.

You don't need to know how a neural network works internally to use this guide. The only thing to hold onto: deep learning is *still machine learning* (it learns from examples) - it's just the flavor of ML that uses these layered networks, and it turned out to work astonishingly well on messy real-world data like images, audio, and language.

📝 **Terminology.** *Neural network* = a model made of many small, connected math units arranged in layers, whose connection strengths are adjusted during learning. *Deep learning* = machine learning that uses neural networks with many layers.

**Why it matters.** For a long time, ML worked best when humans pre-digested the data - picking out which features mattered. Deep learning's superpower is that, given enough data and computing power, the network figures out the useful features *itself*. That's why nearly every "AI" breakthrough you've heard about recently - image recognition, voice assistants, chatbots - is deep learning under the hood.

## Today's LLMs - the innermost circle

**What it actually is.** An **LLM** - Large Language Model - is one specific, wildly successful kind of deep learning, aimed at language. ChatGPT, Claude, Gemini, and their kin are all LLMs. "Large" is literal: they're neural networks trained on an enormous amount of text. Their core trick is almost embarrassingly simple to state: *given some text, predict what word probably comes next* - over and over, one piece at a time, until they've produced a whole answer.

📝 **Terminology.** *LLM (Large Language Model)* = a very large neural network trained on huge amounts of text to predict and generate language, one piece at a time.

**Why people get this wrong.** Because an LLM writes in fluent, confident sentences, it's natural to assume there's understanding behind the words. But the machinery underneath is prediction, not comprehension. That distinction is the whole subject of Phase 3 - for now, just notice that the most human-*seeming* AI sits at the very center of these circles, and is still, mechanically, a pattern-predictor.

**The gotcha.** "AI" in 2026 conversation usually means "an LLM," because that's the kind that went mainstream. But remember the diagram: LLMs are the smallest circle. Spam filters, recommendation feeds, fraud detection, and photo tagging are all AI/ML too - and most of them aren't LLMs. Don't let the newest, loudest example shrink your picture of the whole field.

## Recap

1. The four words are **nested circles**, not rivals: AI ⊃ machine learning ⊃ deep learning ⊃ today's LLMs.
2. **AI** is the broad goal - "make a machine seem smart" - and says nothing about how.
3. **Machine learning** is the part of AI where the machine *learns rules from examples* instead of being hand-coded.
4. **Deep learning** is ML using **neural networks** with many layers - the flavor behind most modern breakthroughs.
5. **LLMs** are one famous kind of deep learning, aimed at language, that work by predicting the next piece of text.

That middle ring - learning instead of being told - is the idea the whole field turns on. Next, we'll slow right down and look at what that shift really means.


---

# Rules vs Learning

If you remember one idea from this whole guide, make it this one. Everything strange, powerful, and sometimes frustrating about AI flows from a single shift in *how the rules get made*. Get this, and machine learning stops being magic and becomes something you can reason about.

## The old way: a human writes the rules

For most of computing history, software worked one way. A person thought hard about a problem, worked out the rules, and typed those rules into the computer as explicit instructions. The computer didn't decide anything - it followed orders, exactly, forever.

```mermaid
flowchart LR
  H["human writes rules<br/>'IF email says FREE MONEY → spam'"] --> C[computer follows them] --> A[answer]
```

**What it does in real life.** Say you want to block spam email. The old way: you sit down and write rules. *If the subject says "FREE MONEY," mark it spam. If it has more than five exclamation marks, mark it spam. If the sender isn't in the contact list and mentions "winner," mark it spam.* You, the human, supplied every rule, and the computer applied them mechanically.

This works beautifully when you actually *can* write the rules down. Calculating tax, sorting a list, checking a password - the rules are known, exact, and finite. For those, hand-written code is the right tool, full stop.

**The gotcha.** The trouble starts when the rules are real but too messy and numerous to ever finish writing. Spam is exactly that kind of problem - and watching it break is the best way to feel why machine learning had to exist.

## Where hand-written rules fall apart

Picture yourself maintaining that spam filter. You write your rules, and for a week they work. Then:

- Spammers learn to write "F.R.E.E M0NEY" to slip past your "FREE MONEY" rule. You add a rule. They change the spelling again. You add another rule.
- A legitimate email from your bank gets caught because it said "winner" (you'd won a survey raffle). You add an *exception*. Now your rule list has rules about its own rules.
- Spam in a new language shows up. None of your English rules apply. You start over.

```mermaid
flowchart LR
  R[you write a rule] --> S[spammers adapt] --> R2[you write another rule] --> S
```

You're in an endless arms race, hand-writing more and more brittle rules, and the list never converges. The real "rule" for what counts as spam genuinely exists - you can recognize spam instantly - but it's a fuzzy, shifting pattern made of thousands of subtle signals. It lives in your gut, not in any list you could finish typing.

💡 **Key point.** Some patterns are real but too complex, fuzzy, or fast-changing for a human to write down as explicit rules. That gap - "I know it when I see it, but I can't write the rule" - is exactly the gap machine learning was built to fill.

## The new way: show it examples, let it learn the rules

Machine learning flips the arrow. Instead of you writing the rules, you give the machine a big pile of *examples* - emails already labeled "spam" or "not spam" - and let it work out the rules itself.

```mermaid
flowchart LR
  E[labeled examples] --> L[the machine learns the patterns] --> M[a 'model']
  N[new, unseen email] --> M
  M --> P["prediction: '92% spam'"]
```

📝 **Terminology.** *Training data* = the labeled examples you feed the machine to learn from (here: thousands of emails each marked spam or not-spam). *Model* = the result of that learning - the bundle of learned patterns that you can now feed a new email to get a prediction.

**What it does in real life.** You collect, say, a hundred thousand emails already marked as spam or not, and hand the whole pile to a learning algorithm. It chews through them and adjusts itself until it's good at telling the two groups apart - discovering on its own that certain word combinations, sender patterns, and link styles tend to mean spam. You never wrote "F.R.E.E M0NEY is suspicious." It learned that, and ten thousand subtler signals you'd never have thought of, straight from the examples.

**A real example.** Here's the shape of it in plain pseudo-code - not a real library, just the *flow*, so you can see how different it is from writing rules:

```text
# You don't write the rules. You provide examples and let it learn.

examples = load_emails_already_labeled_spam_or_not()   # the training data

model = learn_from(examples)                            # the machine finds the patterns

new_email = "Congratulations! You are a WINNER!!!"
model.predict(new_email)
# ► { label: "spam", confidence: 0.92 }
```

*What just happened:* You never told the machine what spam looks like. You handed it labeled examples, it learned the patterns into a `model`, and now that model can look at an email it has never seen and give its best guess - here, "probably spam, 92% sure." When spammers change tactics, you don't rewrite rules; you feed it fresh examples and it re-learns. The arms race becomes "keep showing it new examples," not "keep hand-coding new rules."

**Why this saves you later.** This is why so many products quietly switched to ML. Anywhere the pattern is real but too messy to spell out - spam, fraud, "you might also like…", recognizing your friend in a photo, flagging a weird login - learning from examples beats hand-written rules, and keeps up as the world changes.

## So when does learning *not* win?

Being clear-eyed matters here, because the hype pretends ML is always the answer. It isn't. Hand-written rules are the better choice when:

- **The rules are simple and known.** Calculating sales tax doesn't need a model. The rule is exact, it won't drift, and a model would only add cost, unpredictability, and a way to be subtly wrong.
- **You need a guaranteed, explainable answer.** A model gives you "92% spam," a *probability*. For something like "is this user old enough to sign up?" you want a hard, auditable yes/no - a rule, not a guess.
- **You don't have the examples.** Learning needs data. No big pile of labeled examples means nothing to learn from, and a half-trained model is worse than a plain rule.
- **Mistakes are unacceptable and the logic is clear.** If you can write the correct rule and a wrong answer is dangerous, write the rule. Don't reach for a probabilistic guesser where certainty is available.

⚠️ **Gotcha: "AI" is not automatically the smarter choice.** Reaching for machine learning when a five-line rule would do is a classic, expensive mistake. Learning shines on fuzzy, shifting, example-rich problems; rules shine on exact, stable, explainable ones.

## Recap

1. **Traditional code = rules a human writes by hand.** The computer just follows them.
2. **Machine learning = rules the machine learns from examples** (the *training data*), bundled into a *model* that predicts on new, unseen inputs.
3. ML earns its keep when the pattern is **real but too messy, fuzzy, or fast-changing to write down** - like spam.
4. Hand-written rules still win when the logic is **simple, known, stable, or must be exact and explainable.**
5. The skill is **choosing the right one** - "use AI" is not automatically the smarter answer.

We've said machine learning "learns the patterns." But it's worth being brutally clear about what that does and doesn't give you - because a pattern-learner that sounds human is easy to overtrust. That's next.


---

# What AI Is and Isn't

This is the phase that protects you. By now you know AI is mostly machine learning, and machine learning is pattern-matching learned from examples. That single fact - *it's a pattern-matcher, not a mind* - explains almost every way modern AI surprises, delights, and burns people. Hold onto it, and you'll trust these tools exactly as much as they deserve: a lot for some things, not at all for others.

## What today's AI actually is: prediction, not understanding

**What it actually is.** When an LLM answers you, it is not looking up a fact or reasoning the way you imagine. At its core it's doing what Phase 1 described: predicting the next likely piece of text, then the next, based on patterns absorbed from a vast amount of training data. It's extraordinary at producing text that *sounds* right - because sounding right is literally what it learned to do.

**Why people get this wrong.** The output is so fluent, so confident, so human in shape, that your brain fills in a mind behind it. It feels like talking to someone who *knows*. But "writes a convincing sentence about X" and "understands X" are different abilities, and today's AI has the first far more than the second.

💡 **Key point.** Today's AI is **powerful pattern-matching and prediction** - not understanding, not reasoning the way you do, and not magic. Almost everything surprising about it makes sense once you hold that picture instead of "tiny mind in a box."

⚠️ **Gotcha: don't anthropomorphize it.** It's natural to say the model "thinks," "knows," "wants," or "believes." Those words quietly smuggle in a mind that isn't there, and they'll lead you to trust it in exactly the wrong moments. A safer habit: "the model *predicts*," "the model *produces*," "the model's output *suggests*." Keep the human verbs for humans.

## It can be confidently wrong

**What it does in real life.** Because the goal is plausible-sounding text - not true text - an AI will sometimes produce an answer that is fluent, confident, and completely made up. It might invent a citation, a quote, a function that doesn't exist, or a "fact" that was never true. This has a name.

📝 **Terminology.** *Hallucination* = when an AI generates confident, plausible-sounding output that is flatly false. It's not lying (lying needs an intent it doesn't have) - it's producing text that fits the pattern of a good answer without any check on whether it's real.

⚠️ **Gotcha: confidence is not accuracy.** The model has the same smooth, assured tone whether it's right or catastrophically wrong - because tone is part of the pattern, and truth isn't something it's checking. A human expert usually *sounds* unsure when they're unsure. An LLM often doesn't. Never read confidence as a signal of correctness. For anything that matters, *verify* against a real source.

**Why this matters.** This is the single most expensive misunderstanding people have about AI: treating a fluent answer as a checked answer and shipping it - a fake legal citation, a wrong dosage, a bug-ridden snippet pasted straight into production. The fix isn't "don't use AI." It's "use it as a fast, fallible draft-maker, and keep a human responsible for what's true."

## It mirrors its training data - including the bias

**What it actually is.** A model knows only what it learned from. It has no experience of the world beyond its training data, so whatever patterns are *in* that data, good and bad, get baked into the model. Human-generated data always carries human biases, and the model tends to reproduce them, fluently and without flagging that it's doing so.

**A real example.** Imagine a hiring tool trained on a company's past ten years of hiring decisions to predict "good candidate." If that company mostly hired one kind of person, the patterns in that data encode the skew. The model dutifully learns it and starts down-ranking everyone else - not out of malice, but because it learned exactly what it was shown.

*What just happened:* The model didn't "decide" to be unfair. It learned the pattern in its examples, and the pattern was unfair. The bias was in the data; the model just made it scalable and gave it an authoritative, neutral-sounding voice. "The computer said so" can be biased precisely *because* a human process was biased first.

**Why this saves you later.** When an AI's output feels off, lopsided, or stereotyped, look at the data it learned from, not at a malfunctioning mind. A model is a mirror of its inputs, and mirrors don't correct what they reflect.

## It has no ground truth of its own

**What it actually is.** Pull all of the above together and you reach the deepest point: an LLM has no independent connection to reality - no senses, no memory of having checked anything, no built-in fact that "Paris is the capital of France," only the statistical fact that those words tend to go together in its training data. There's just the learned pattern of what text usually looks like.

```mermaid
flowchart TD
  subgraph Imagine["What you imagine is happening"]
    Q1[question] --> LU[looks up the truth] --> TA[true answer]
  end
  subgraph Actual["What is actually happening"]
    Q2[question] --> PR[predicts plausible next words<br/>from learned patterns] --> PA["plausible answer<br/>(often true, sometimes not - <br/>and it can't tell which)"]
  end
```

⚠️ **Gotcha: it predicts *plausible*, not *true*.** This is the whole phase in one line. The model is optimized to produce text that *fits* - that looks like a right answer. Most of the time, fitting and being true line up, which is why these tools are genuinely useful. But when they diverge, the model has no way to notice, because it was never tracking truth in the first place.

## So what is it actually good for?

None of this means AI is useless - it means you aim it at the right jobs. Pattern-prediction trained on oceans of text is genuinely excellent at:

- **Drafting and rephrasing** - first drafts, summaries, tone changes, where *you* are the final judge.
- **Surfacing and brainstorming** - options, angles, starting points you'll then check.
- **Transforming text you already trust** - reformatting, translating, extracting, where the source is known-good.

…and genuinely risky, used unsupervised, at anything where being *confidently, invisibly wrong* is expensive: facts you can't verify, math you won't check, decisions about real people, code you paste without reading. Lean on it where plausible-and-fast helps and you stay responsible for the truth; distrust it where only true-and-checked will do.

## Recap

1. Today's AI is **pattern-matching and prediction**, not understanding - fluent text is the thing it learned to make.
2. **Don't anthropomorphize it.** "Predicts" and "produces," not "thinks" and "knows."
3. It can be **confidently wrong** (*hallucination*), and **confidence is not accuracy** - verify what matters.
4. It **mirrors its training data**, biases and all, in an authoritative-sounding voice.
5. It has **no ground truth** of its own: it predicts *plausible*, not *true* - they usually agree, until they don't.
6. Used for the right jobs, with a human owning correctness, that pattern-matcher is genuinely powerful.

That's the solid foundation for everything else in this track. With this mental model in place, you're ready to go a level deeper.

## Where to go next

- **[How a Model Learns](/guides/how-a-model-learns)** - how a model is actually trained from data.
- **[Using an LLM API](/guides/using-an-llm-api)** - call a model from your own code, now that you know what it really is.
- **[ML Basics for Data People](/guides/ml-basics-for-data-people)** - the everyday craft of working with data and models, if that's your world.
