StarvardStarvard

Starvard University · How AI Works

How AI Works: The Math That Read the Internet

Dinesh builds things with AI every day. Here he explains how it actually works, in plain English, no math degree needed. Words become numbers. Numbers become answers. And underneath it all: taxonomy, all the way down.

Dinesh
Dinesh
How AI Works · Starvard University

Dinesh introduces the course. Twenty-seven seconds. Let us open the hood.

The whole course in 60 seconds

How AI works, in 5 ideas

  1. AI read the internet and turned it into math. Every book, article, and argument, compressed into numbers. Lesson 1
  2. Words become numbers. Every word you type is converted to math before the AI ever sees it. Lesson 3
  3. It predicts the next word, billions of times. That is the whole trick. Fluency from prediction. Lesson 4
  4. Underneath, it is taxonomy. Categories all the way down: this is like that, that belongs with those. Lesson 2
  5. An agent is a model with tools and a loop. The AI plus the ability to act, checking its own work. Lesson 8

The eleven lessons

Lesson 1

The Big Idea: Math That Read the Internet

Here is the entire field of AI in one sentence: someone fed nearly the whole internet into a giant math machine, and the machine learned the patterns.

Every book, every article, every argument, every recipe, every joke. All of it went in as text and came out as numbers, billions of numbers arranged so that things that mean similar things sit near each other. When you ask a question, the machine walks through that math and walks back out with an answer.

A brain made of numbers and network connections

The big idea: human knowledge went in as words and came out as math. Everything else is details.

Lesson 2

It's Taxonomy All the Way Down

Dave said it best: it is basically all taxonomy. And he is right. Underneath the fancy math, what the machine learned is categories: this word belongs with these words, this idea is like that idea, this question belongs in that bucket.

Think about how you think. You see a furry four-legged thing and your brain files it under "dog," which sits under "pets," which sits under "animals." The AI does the same thing, except with millions of categories, all learned from reading everything.

Every time it answers you, it is sorting: what kind of question is this, what kind of answer goes with it, what lives in the same neighborhood. Taxonomy is not a small part of AI. It is the whole game.

A tree of categories branching out

Categories all the way down. The machine sorted the internet into buckets, and now it sorts your questions into them too.

Lesson 3

Words Become Numbers

Before the AI sees your words, they get converted into numbers. Every word, or piece of a word, becomes a long list of numbers, a position in a giant map where similar meanings sit close together.

"King" sits near "queen." "Happy" sits near "joyful." The machine does not know what happiness is. It just knows where "happy" lives on the map, who its neighbors are, and which neighborhoods it visits.

This is why AI is so good with language and so bad at counting: it does not do math like a calculator. It does meaning like a map.

Words transforming into streams of numbers

Words in, numbers around. Your sentence becomes coordinates on a map of meaning.

Lesson 4

The Prediction Machine

Here is the trick the whole industry is built on: the machine predicts the next word. Given everything so far, what word comes next? Then the next. Then the next, billions of times.

That sounds too simple to produce intelligence, and in a way it is. But predicting the next word correctly, across every topic humans write about, requires understanding grammar, facts, reasoning, style, and tone. Fluency emerges from prediction the way wetness emerges from water molecules.

Every answer you have ever gotten from ChatGPT or Muse was built one predicted word at a time.

Next word, next word, next word. Billions of tiny predictions add up to something that feels like thinking.

Lesson 5

Training: Reading the Whole Internet

How did the machine learn all those patterns? By reading. During training, it reads enormous piles of text, books, websites, articles, and practices predicting the next word, over and over, adjusting its billions of numbers each time it is wrong.

This takes months and costs millions of dollars in computing. It is the most expensive reading program in history. But once it is done, the result, the trained model, can answer questions in seconds.

Think of it like school: years of studying, then the exam takes an hour. Training is the studying. Your chat is the exam.

Months of reading, seconds of answering. Training is expensive; using it is cheap.

Lesson 6

Why It Feels Smart (When It's Just Patterns)

AI feels smart because language is how humans show smartness. When something speaks fluently, reasons clearly, and remembers context, our brains file it under "intelligent person." That is our taxonomy misfiring.

What is actually happening: insanely good pattern matching. It has seen so many explanations, arguments, and stories that it can assemble a new one for your exact question. It is not thinking the way you think. It is matching the way only it can.

This does not make it useless. Pattern matching at this scale is genuinely powerful. It just means you should treat it like a brilliant intern with total recall, not a wise sage.

Fluent is not the same as wise. Amazing pattern matcher, yes. Infallible thinker, no.

Lesson 7

Why It Makes Things Up

Sometimes AI states false things with total confidence. The industry calls these hallucinations. Now you know enough to understand why: it predicts plausible next words, not true next words.

The most famous one: two New York lawyers filed a court brief citing six cases ChatGPT invented, complete with fake judges and made-up quotes. The dumbest fake case name? Estate of Durden v. KLM. Tyler Durden. From Fight Club. A real lawyer filed it in federal court and got fined $5,000.

If its training data had the fact, the plausible answer and the true answer usually coincide. But when it does not know, it does not say "I don't know." It predicts the most likely sounding answer, which can be beautifully written nonsense.

The fix is yours: verify important facts, names, numbers, and quotes. The machine proposes; you dispose.

Plausible is not true. Beautiful sentences can carry false facts. Check the important ones.

Lesson 8

So What Is an AI Agent?

Part 2: Dinesh explains the agent in 28 seconds. Model plus tools plus loop.

Now the course title pays off. An AI agent is the language model plus two additions: tools and a loop.

Tools mean it can do things, not just say things: search the web, read your email, check your calendar, run code. The loop means it can work in steps: try something, look at the result, adjust, try again, until the job is done.

Model plus tools plus loop. That is an agent. Everything else is marketing.

A robot helper holding tools for different tasks

Model + tools + loop = agent. The brain, the hands, and the persistence.

Lesson 9

How ChatGPT and Muse Actually Answer You

Let us trace one question through the whole machine. You type "plan my week." First, your words become numbers and land on the meaning map. The model predicts the most likely helpful response, word by word, drawing on patterns from millions of planning examples it read.

If it is acting as an agent, it goes further: it checks your calendar (tool), drafts a plan (prediction), reviews it against your constraints (loop), and adjusts. Then it hands you the result.

The whole journey, from your sentence to its answer, takes seconds. Underneath: taxonomy, numbers, prediction, tools, and one more loop.

Words to numbers to prediction to tools to answer. Seconds on the surface, the whole machine underneath.

Lesson 10

What It Can't Do

Knowing the limits makes you powerful. AI cannot truly know things it never read. It cannot want anything or care about outcomes. It cannot verify facts against reality, only against patterns.

It is bad at precise math, bad at knowing what it does not know, and bad at keeping secrets you tell it (assume anything you type can be seen). It does not get tired, but it also does not get inspired.

Use it for drafting, summarizing, brainstorming, organizing, and explaining. Keep judgment, decisions, and relationships for yourself.

Draft with AI, decide with your brain. The limits are the instructions.

Lesson 11

Your Turn: Use It Well

You now understand the machine better than 99 percent of its users. Here is how to turn that into an advantage:

Starvard's only homework: ask it one hard question today, then verify the answer. You are now its supervisor.

Graduation

Categories, All the Way Down

The internet went in as words and came out as math. The math sorted everything into categories. Now it sorts your questions too, predicts the answers word by word, and with tools and a loop, it acts. That is AI. Dave was right.

Keep going: AI for Normal People puts all of this to work, and all free Starvard courses.

Back to Starvard University

Keep learning

This course is part of Starvard University, striving for greatness.

Explore Starvard · All free courses