DEV Community

Manasés Lovera
Manasés Lovera

Posted on

No, AI Is Not "Just a Token Predictor"

I'm tired.

Every week I open my feed and find another post explaining that AI is "just a chatbot" or "just a fancy autocomplete that predicts the next token." And every week, a few thousand people read it, nod, and walk away with a mental model that is wrong.

It's not wrong because it's a lie. It's wrong because it's a detail being sold as the whole picture. It's like saying a car is "just a spinning axle." Technically something in there spins. But you're going to have a bad time explaining Formula 1 with that.

So let's fix it. From the ground up. No math, no jargon you can't survive.


What is AI?

Artificial Intelligence is the broadest term. It's any system that performs a task we'd normally consider "intelligent" — recognizing a face, planning a route, playing chess, detecting fraud.

Here's the part people forget: AI does not require learning.

The chess engine that beat Kasparov in 1997 didn't learn anything. It was hand-written rules and brute-force search. The GPS in your car finding the shortest route? AI. The system your bank uses to flag a weird transaction? Often just a pile of if statements written by a human.

That's AI. Rules, search, logic, optimization. No neural networks in sight.

Key point #1: AI is the umbrella. Everything below is a subset.


What is Machine Learning?

Machine Learning is a subset of AI where instead of writing the rules, you show the machine examples and it figures out the rules itself.

Old way:

if email contains "VIAGRA" → spam
if email contains "PRINCE" and "TRANSFER" → spam
Enter fullscreen mode Exit fullscreen mode

ML way:

Here are 100,000 emails labeled spam / not spam.
Go find the pattern yourself.
Enter fullscreen mode Exit fullscreen mode

The output is a model — a mathematical function that takes an input and produces an output.

And here's what almost nobody mentions: most ML has nothing to do with text.

  • Predicting house prices from square footage and location
  • Detecting fraudulent credit card charges
  • Recommending the next product on an e-commerce site
  • Forecasting demand for a warehouse
  • Diagnosing disease from lab values

These are all ML. None of them predict tokens. Most of them don't use neural networks. Techniques like linear regression, decision trees, random forests, and gradient boosting (XGBoost) run enormous chunks of the real economy and they are extremely boring and extremely effective.

If you took away every LLM tomorrow, ML would still be everywhere.

Key point #2: ML learns rules from data. Most of it is not text and not deep learning.


What is Deep Learning?

Deep Learning is a subset of ML that uses neural networks with many layers.

The intuition: each layer learns something slightly more abstract than the one before it.

For an image:

  • Layer 1: edges and gradients
  • Layer 2: corners, curves, textures
  • Layer 3: eyes, wheels, fur
  • Layer 4: "this is a cat"

Nobody told it what an eye is. It built that concept because it was useful for the final answer.

Deep learning is why we got:

  • Computer vision — self-driving cars, medical imaging, factory quality control
  • Speech recognition — turning sound waves into words
  • Protein folding — AlphaFold, which cracked a 50-year-old biology problem
  • Game playing — AlphaGo, which found strategies humans missed in 2,500 years of Go

Notice: not one of those is text generation.

Deep learning is a technique. Text is just one thing you can point it at.

Key point #3: Deep learning is a subset of ML. Text is one application among many.


What is an LLM?

Now we get to the thing everybody thinks is "AI."

A Large Language Model is a deep learning model trained on enormous amounts of text, whose training objective is: given this sequence of text, what comes next?

That's it. That's the training objective. So yes — at the level of the training objective, "next-token prediction" is accurate.

Here's why stopping there is intellectually lazy.


"Just Predicting Tokens" — Okay, But How?

Let's actually take the claim seriously and follow it all the way down. Because the phrase "predicts the next token" is doing an enormous amount of hiding.

Here's what has to happen between you typing a sentence and text coming back.

Step 1: Your text becomes numbers (tokenization)

Neural networks don't see letters. They see numbers.

So first your text is chopped into tokens — roughly word-pieces:

"The transformer architecture"
 ["The", " transformer", " architecture"]
 [464, 47385, 10959]
Enter fullscreen mode Exit fullscreen mode

Those numbers are just IDs. Row numbers in a lookup table. They mean nothing yet — token 47385 isn't "bigger" or "more" than token 464.

Step 2: Numbers become embeddings (meaning as geometry)

This is the part that should make you stop and think.

Each token ID gets swapped for a vector — a long list of numbers, often thousands of them:

" transformer"  [0.02, -0.71, 0.33, 0.19, ... ]   (e.g. 4096 numbers)
Enter fullscreen mode Exit fullscreen mode

That vector is called an embedding, and it's the model's representation of meaning. Not a definition. A position in a very high-dimensional space where similar things sit near each other.

The famous illustration:

king - man + woman ≈ queen
Enter fullscreen mode Exit fullscreen mode

Meaning became arithmetic. Direction in that space encodes concepts — one direction is roughly "gender," another roughly "plural," another "past tense," another "formality." Nobody programmed those axes. They emerged.

Where do embeddings come from? They are learned. They start as random noise. During training, every time the model gets a prediction wrong, the embeddings get nudged. Do that across trillions of tokens and words appearing in similar contexts drift toward each other, and words that don't drift apart. The geometry of meaning gets carved out by the data.

Nobody wrote a dictionary. The model built a map of semantics because having one made it better at predicting.

That is already not "autocomplete."

Step 3: Position has to be injected (positional encoding)

Here's a problem the "it's just autocomplete" crowd never mentions.

A Transformer looks at all tokens simultaneously (that's the whole point — it parallelizes). But that means, out of the box, it has no idea what order the words are in.

To a naked Transformer:

"Dog bites man"

and

"Man bites dog"

are the same soup of vectors. Same tokens, no ordering. One of those is a news story and the model can't tell which.

So order has to be added in explicitly. That's positional encoding: you inject information about where each token sits into its vector.

Early approach: add a distinctive wave pattern (sine/cosine at different frequencies) to each position, so position 5 has a mathematically distinguishable "fingerprint" from position 500.

Modern approach (RoPE — rotary position embeddings): you literally rotate each token's vector by an angle proportional to its position. The elegant consequence — the relationship between two tokens then depends only on the distance between them, not their absolute positions. That's a big part of why models handle very long contexts today.

Read that again: modern LLMs encode word order by rotating vectors in high-dimensional space.

"Autocomplete."

Step 4: Tokens negotiate with each other (attention, stacked)

Now the vectors go through the Transformer layers. At each layer, every token asks every other token, roughly: "how relevant are you to me right now?" — and pulls in information accordingly. Then it gets processed further and passed up to the next layer.

Do this dozens of times.

The vector for "it" that started out as a generic pronoun embedding becomes, layer by layer, a vector that has absorbed the fact that it refers to the trophy, which is large, which is the subject of a comparison.

The same input token has a different vector at layer 40 than it did at layer 1. It's been reshaped by context. The representation gets progressively richer as it climbs.

Step 5: Vectors become a probability distribution

At the top, the final vector gets projected back out against the whole vocabulary — 100,000+ possible tokens — producing a score for each one. Softmax turns those scores into probabilities:

" learning"     → 31%
" architecture" → 22%
" model"        →  9%
" banana"       →  0.0001%
...
Enter fullscreen mode Exit fullscreen mode

And only NOW do we "predict a token." By sampling from that distribution.

So when someone says "it just predicts the next token" — they are describing step 5 of 5, and skipping every single thing that made step 5 possible.

Step 6: How it learned any of this (backpropagation)

And all of the above only works because of training. Here's the loop, honestly:

  1. Show it real text with the next token hidden.
  2. It guesses a probability distribution.
  3. Compare the guess to the actual next token. The gap is the loss.
  4. Backpropagation: mathematically trace that error backward through every layer, computing how much each individual weight contributed to being wrong.
  5. Gradient descent: nudge every weight slightly in the direction that would have reduced the error.
  6. Repeat.

Now scale that:

  • Hundreds of billions of parameters, each nudged
  • Trillions of tokens
  • Tens of thousands of GPUs, for months

Every single one of those nudges is tiny and stupid. But run it long enough and structure precipitates out of the noise: grammar, syntax, factual associations, code semantics, arithmetic circuits, translation, the ability to hold an argument.

Nobody designed those. Nobody wrote a grammar rule. They condensed, because they were useful for reducing loss.

And this is still only the top of the iceberg

Everything above is the simplified version. I skipped:

  • Multi-head attention — many attention mechanisms in parallel, each tracking different kinds of relationships
  • Layer normalization and residual connections — without which deep networks simply don't train at all
  • Feed-forward layers — where a large share of the model's factual knowledge appears to actually live
  • KV caching — why generation doesn't recompute everything from scratch each token
  • Mixture of Experts — routing tokens to specialized sub-networks
  • Optimizers (AdamW), learning-rate schedules, gradient clipping, mixed precision
  • The entire field of mechanistic interpretability, which exists because we built these things and still don't fully understand what's happening inside them

That last one deserves a beat.

We do not fully understand our own models. There are research teams whose entire job is reverse-engineering what circuits formed inside a network we trained ourselves. That is not a thing you say about autocomplete. Nobody is doing interpretability research on your phone keyboard.


So yes — the final step outputs a token.

But getting there required turning language into geometry, injecting word order by rotating vectors, having every word renegotiate its meaning against every other word dozens of times, and shaping hundreds of billions of parameters through trillions of error corrections until abstract capabilities emerged that nobody put there.

"It just predicts the next token" describes the last 1% and calls it the whole machine.

"It's just predicting the next word" is like saying "evolution is just organisms that survive reproduce more." True. Also completely useless for explaining why you have eyes.

Key point #4: LLMs are one narrow branch of the tree. And even that branch is not simple.


What Are Transformers? (And what did Siri actually run on?)

This is where the "AI is autocomplete" crowd loses the plot entirely.

Before Transformers: RNNs and LSTMs

Before 2017, if you wanted a machine to process language, you used a Recurrent Neural Network (RNN) or its improved cousin, the LSTM (Long Short-Term Memory).

These worked sequentially. Word one, then word two, then word three — each step carrying a compressed "memory" of everything before it.

Two fatal problems:

  1. Memory decay. By the end of a long sentence, the beginning had faded to mush. LSTMs helped but didn't solve it. Ask an LSTM to connect a pronoun to a noun 40 words back and it falls apart.

  2. No parallelism. You literally cannot compute step 50 before step 49. Which means you cannot throw 10,000 GPUs at the problem and go faster. Training was slow, so models stayed small.

This is what Siri and Alexa were built on. And it explains everything about why they felt the way they did.

Those assistants weren't "understanding" you. The pipeline was:

Speech → text (acoustic model)
Text → intent classification (which of ~200 buckets is this?)
Intent → slot filling (extract: city = "Boston", time = "tomorrow")
Slots → hardcoded API call
API response → template response ("The weather in ___ is ___")
Enter fullscreen mode Exit fullscreen mode

That's why Siri could set a timer but couldn't hold a conversation. It wasn't generating language. It was classifying your sentence into a pre-existing bucket and reading from a template. Say something outside the bucket list and you got "I'm sorry, I didn't catch that."

It was a very sophisticated switch statement with a voice.

The Transformer (2017)

Then came "Attention Is All You Need."

The core idea, attention, in plain terms: instead of reading word by word and carrying a fading memory, look at every word at once and learn which words matter to which other words.

In the sentence "The trophy didn't fit in the suitcase because **it* was too big,"* what does "it" refer to?

An LSTM struggles. A Transformer draws a direct, weighted connection from "it" → "trophy" in a single step. No decay, no sequential crawl.

Two consequences, and the second one is the earthquake:

  1. Long-range connections became easy. Word 1 can talk to word 5,000 directly.
  2. It parallelizes. Every position computed simultaneously — so you can throw 10,000 GPUs at it.

That second one is why everything exploded. The Transformer didn't just work better — it unlocked scale. And scale turned out to be the thing that mattered.

Transformers also aren't text-only. Vision Transformers (ViT) chop images into patches and treat them like words. Same architecture, completely different modality.

Key point #5: Transformers replaced RNNs/LSTMs, which is why 2026 assistants converse and 2015 assistants filled in templates.


And Transformers Are Just the Foundation

Here's where the "it's just autocomplete" take becomes not merely incomplete, but factually describing a system that no longer exists in production.

A raw Transformer trained on next-token prediction is the base model. That's the engine block. Nobody ships an engine block.

What's actually running in 2026 stacks on top of it:

  • Post-training (RLHF, RLAIF, constitutional methods) — the base model gets reshaped by human and AI feedback into something helpful and safe. The thing you talk to is not the thing that came out of pretraining.
  • Reasoning / test-time compute — models that "think" before answering, generating and evaluating internal chains of reasoning, spending more compute on harder problems. That's a search process, not a single forward pass.
  • Tool use and function calling — the model doesn't guess the weather, it calls an API. It doesn't guess arithmetic, it runs code. That path is deterministic.
  • Retrieval (RAG) — grounding answers in real documents instead of parametric memory.
  • Agentic loops — plan, act, observe the result, re-plan. A control loop with a model inside it.
  • Mixture of Experts — routing different inputs to different specialized sub-networks. It isn't even one monolithic network anymore.
  • Multimodality — images, audio, and video sharing the same representational space as text.

Calling that stack "a token predictor" is like describing a modern web application as "an HTTP request." Yes. There's an HTTP request in there. That is not what's interesting.

Key point #6: The Transformer is the floor, not the ceiling.


The Three Things I Really Want You to Take Away

1. AI is not text. Text is a slice.

Right now, running in production somewhere:

  • A convolutional neural network reading a mammogram
  • A gradient boosted tree deciding whether to approve your loan
  • A reinforcement learning agent cooling a data center
  • A time-series model forecasting electricity demand for a national grid
  • A recommender system deciding what you see next
  • A diffusion model generating an image
  • A graph neural network predicting how a molecule will behave

None of these predict tokens. None are chatbots. Most existed and worked fine before ChatGPT and will keep working if every LLM disappears tomorrow.

The chatbot is the part you see because it's the part that talks to you. That's a UI accident, not an ontology.

2. Stochastic ≠ broken. And it's a setting, not a law of nature.

LLMs are stochastic: same input, different output. This is not a mysterious property of intelligence. It is a sampling parameter.

Remember step 5 — the model outputs a probability distribution. Then it samples from it. There's a knob — temperature — controlling how much randomness you allow.

  • Temperature = 0 → always pick the highest-probability token → effectively deterministic.
  • Temperature > 0 → sample → variety, creativity, surprise.

Why would anyone want randomness? Because if you're writing a story, brainstorming names, or exploring solution space, a model that returns the identical answer every time is useless. Randomness is a feature you are choosing.

And a huge amount of AI is fully deterministic by design. A fraud model given the same transaction returns the same score. Every time. That's the entire point — you cannot have a credit decision that changes on a dice roll.

Deterministic AI is not exotic. It is the default almost everywhere except generative models.

3. Hallucination is a consequence of design, not a curse

An LLM has no "truth" module. It was trained to produce plausible continuations. When it doesn't know something, the training objective doesn't tell it to say "I don't know" — it tells it to produce something plausible. So it does. Confidently.

This is a known, characterized failure mode with known mitigations:

  • Ground it in retrieval — make it cite real documents instead of parametric memory
  • Give it tools — let it query a database instead of recalling one
  • Constrain the output — force valid JSON, valid SQL, valid function calls
  • Lower the temperature — reduce sampling randomness
  • Post-train against it — reward calibrated uncertainty, penalize confident nonsense
  • Verify — run the generated code, check the generated math

A well-engineered system routes factual questions to deterministic tools and uses the LLM for what it's actually good at: language, structure, and reasoning over the results.

"AI hallucinates" is not a fact about AI. It's a fact about using a generative model as a database, which is a design error.


The Actual Hierarchy

ARTIFICIAL INTELLIGENCE
│  (any system doing something "intelligent" —
│   including hand-written rules, search, logic)
│
├── MACHINE LEARNING
│   │  (learns patterns from data instead of hand-coded rules)
│   │
│   ├── Classical ML
│   │   └── regression, decision trees, SVMs, XGBoost
│   │       → fraud, pricing, forecasting, recommendations
│   │       → mostly DETERMINISTIC. runs the economy.
│   │
│   └── DEEP LEARNING
│       │  (multi-layer neural networks)
│       │
│       ├── CNNs         → vision, medical imaging
│       ├── RNNs / LSTMs → old NLP, old Siri/Alexa (obsolete)
│       ├── GNNs         → molecules, networks
│       ├── Diffusion    → image/video generation
│       ├── RL           → robotics, game playing, control
│       │
│       └── TRANSFORMERS
│           │
│           ├── Vision Transformers → images
│           ├── Audio/speech models
│           │
│           └── LARGE LANGUAGE MODELS  ← you are here
│               │
│               │  (tokenization → embeddings → positional
│               │   encoding → stacked attention → softmax
│               │   → sampling; trained via backprop across
│               │   trillions of tokens)
│               │
│               └── + post-training
│                 + reasoning / test-time compute
│                 + tool use
│                 + retrieval
│                 + agentic loops
│                 = the thing you actually talk to
Enter fullscreen mode Exit fullscreen mode

Look how far down "the chatbot" is. That last box is what people are calling "AI."


So, Please

Next time you write the post, or read the post, or repeat the line at a meetup:

  • "AI is a chatbot" → No. Chat is one interface, on one model type, in one branch of the field.
  • "AI is just predicting the next token" → That's the training objective of one architecture for one modality — and even inside that one architecture, it's the last step of six.
  • "AI always hallucinates" → Generative models hallucinate when you use them as fact stores. Ground them, tool them, constrain them.
  • "AI is non-deterministic" → Turn the temperature to zero. Or use any of the deterministic models running your bank, your grid, and your hospital.

The reductive one-liner feels smart. It sounds like you've seen behind the curtain. It gives you the satisfying feeling of debunking hype.

But it doesn't make you the person who understands AI. It makes you the person who read one sentence about AI and stopped.

The field is bigger, older, weirder, and far more interesting than the box you're typing into.

Go look at it.


If this reframed anything for you, drop a comment with the worst "AI is just ___" take you've seen in the wild. I'll go first: "AI is just a really big if-statement."

Top comments (0)