How AI Actually “Thinks” (It Doesn’t)
Understanding the mechanism behind the magic — explained the way your smartest colleague would explain it at lunch
How AI Actually “Thinks” (It Doesn’t)
Understanding the mechanism behind the magic — explained the way your smartest colleague would explain it at lunch
Let me start with something that’ll change how you use AI tools forever.
When you type a question into ChatGPT and it responds with something that sounds thoughtful, nuanced, and almost wise — there is no thinking happening. No reflection. No understanding. Not even a pause.
What’s happening is something weirder, more mechanical, and honestly more impressive.
I’ve been trying to explain this to people in my life — friends who work in non-technical fields, colleagues who use AI daily but treat it like a magic box — and I kept running into the same problem: the standard explanations are either too simple (“it predicts the next word”) or too technical (“transformer architecture with multi-head self-attention”). Neither actually makes you feel like you understand what’s going on.
Photo by AbsolutVision on Unsplash
So here’s my attempt at the middle path. The one that makes you go “oh, that’s what it’s doing.”
I. The biggest myth about AI
Most people carry an unconscious mental model that looks something like this:
You ask a question → AI thinks about it → AI understands your intent → AI responds
That’s a human model. That’s how we process questions. And it’s completely wrong for how AI works.
A Large Language Model — which is what ChatGPT, Claude, Gemini, and every major AI assistant is — doesn’t “think” the way we do. It doesn’t pause. It doesn’t reason through possibilities. It doesn’t have a model of the world it consults.
What it does is far simpler and, in a strange way, far more mind-bending.
It predicts the next most likely piece of text.
That’s it. Every response you’ve ever received from an AI is the output of millions of tiny predictions, each one saying: given everything before this point, what piece of language is most likely to come next?
The intelligence you experience is an emergent property of doing this at enormous scale with extraordinary accuracy. But the mechanism is always, always the same: predict the next token.
II. Tokens — what AI actually reads
Before we can understand prediction, we need to understand what AI is even predicting over.
Humans read words. AI reads tokens.
A token is a small chunk of text — usually a word or part of a word. “Artificial” might be one token. “Intelligence” might be another. Or it might be broken into “Art” + “ificial” depending on the tokenizer. Punctuation is its own token. Spaces sometimes are too.
Why does this matter? Because every single thing that happens in an AI model — every step in the process — operates on these tokens, not on ideas. The model never grasps “the concept of France.” It operates on the token “France” as a specific numerical pattern it learned during training.
Which brings us to the next strange thing.
III. Words become numbers — embeddings
The moment your text enters a language model, something happens that feels almost violent: all the words get converted into numbers.
Not in an obvious way — like “A = 1, B = 2.” In a mathematical way that preserves relationships between words.

This is called an embedding. Every token has a numerical representation — a vector, a point in very high-dimensional space — and the positions of these points capture semantic relationships.
“King” and “Queen” end up mathematically close to each other. “Dog” and “Puppy” cluster together. “Car” and “Bicycle” are near each other but further from “Dog.”
This is how AI understands that two words are similar without ever actually understanding either word. It doesn’t know what a dog is. It knows that “dog” is the kind of number that tends to appear near “puppy,” “bark,” “leash,” and “vet” — and far from “quarterly earnings” and “interest rates.”
The relationships in language get encoded as relationships in space. It’s elegant and strange and completely mechanical.
IV. The prediction engine — what actually happens when you press Enter
Once your text has been turned into tokens, and those tokens have been converted into numerical vectors, they travel through the part that does the actual work: the neural network.
The neural network is not a rule book. It’s not a database of facts. It’s a system of billions of mathematical operations — “parameters” — that were adjusted during training to get better and better at one thing: predicting what text should come next.

Here’s the actual sequence for something like “The capital of France is…”:
- Text gets split into tokens: [“The”, “capital”, “of”, “France”, “is”]
- Each token becomes a vector (a long list of numbers)
- Those vectors pass through billions of learned mathematical operations
- The model outputs a probability score for every possible next token
- “Paris” gets 94% probability. “London” gets 4%. “Banana” gets 0.0001%.
- The highest-probability token is selected: “Paris”
- “Paris” is added to the sequence, and the whole process runs again
Token by token. Every time. Until the response is complete.
This is why AI responses don’t arrive all at once — they literally can’t. Each token depends on all the tokens before it. The word after “Paris” is being predicted based on “The capital of France is Paris,” not just “The capital of France is.” The model is never predicting a complete answer. It’s predicting the immediate next step, one small piece at a time.
V. Attention — how AI figures out which words matter
Here’s where it gets more interesting.
If AI is just doing next-token prediction, how does it figure out which earlier words are relevant to what comes next? A sentence can be long. Not every word that came before matters equally to the word that comes next.
The answer is attention — and it’s the core innovation of modern language models.

When the model is deciding what “bank” means in a sentence, it doesn’t treat all the surrounding words as equally important. It assigns different attention weights to each word — a kind of relevance score that says “this word matters more for figuring out the current word.”
In “He sat by the bank and fished,” the word “fished” gets a very high attention weight when the model is processing “bank.” That high-weight connection is what allows the model to correctly resolve “bank” as a riverbank, not a financial institution.
This happens invisibly, across hundreds of layers of the network, for every single token in the sequence. It’s not magical. It’s multiplication — billions of times — done very, very fast.
The result is a model that can hold context across thousands of words, resolve ambiguity, maintain narrative threads, and produce responses that feel contextually aware. Not because it understands in any human sense. Because attention allows each prediction to be informed by the entire sequence that came before it.
VI. Why AI hallucinates — the most important thing to understand
You’ve probably seen AI confidently state something completely wrong. A fake case citation. A book that doesn’t exist. A historical “fact” that never happened. Stated with full confidence, no hedging, no disclaimer.
This is called hallucination, and once you understand how prediction works, you understand immediately why it happens.

The model is optimising for most probable, not for most true.
Those two things are usually the same. If you ask what the capital of France is, “Paris” is both highly probable and factually true. The model’s training on human-generated text means that accurate statements tend to be more probable than inaccurate ones — because humans generally write about real things.
But they’re not always the same. Sometimes the most fluent, contextually appropriate, grammatically smooth continuation of a sentence is one that contains an inaccuracy. The model doesn’t know it’s wrong — it has no mechanism to verify claims against reality. It only has a sense of what language patterns tend to follow other language patterns.
When a person says something confidently wrong, we assume they believe it. When AI says something confidently wrong, there’s no belief involved at all. There’s just a prediction that the confident phrasing was the appropriate next output given the input it received.
This is why you should always verify AI-generated factual claims against primary sources. Not because AI is careless, but because it literally has no access to truth — only to patterns in language.
VII. Does it understand? The honest answer.
This is where even experts disagree, and where honesty matters more than confidence.
Here’s what we can say definitively:
AI does not have consciousness. There is no inner experience. No sensation of understanding. When Claude or ChatGPT produces an insightful response, nothing is “experiencing” that insight.
AI does not have beliefs or intentions. It cannot want anything. It cannot believe anything. It produces outputs that are consistent with wanting and believing, but those outputs emerge from probability calculations, not internal states.
AI does not reason the way humans do. When you solve a problem, you hold a model of the world in your head and manipulate it. AI produces text that looks like the output of that process without having the process itself.
What AI does have — and this is genuinely remarkable — is an enormously powerful compression of human language patterns. During training, it processed more text than any human could read in thousands of lifetimes. The relationships between ideas, the logical structures of arguments, the patterns of what makes an answer good or bad — all of this got encoded, imperfectly and statistically, into billions of parameters.
The result can look like reasoning. It can look like understanding. It can look like creativity.
Whether any of those appearances amount to the real thing is a genuinely open question that some of the most serious philosophers and AI researchers in the world disagree about.
What it definitely is: a prediction engine of extraordinary sophistication, doing something no human can do at anything close to its speed and scale, producing outputs that emerge from statistical patterns rather than comprehension.
VIII. What this means for how you use AI
Understanding the mechanism changes how you interact with these tools.
Prompts are probability manipulation. When you give AI more context, you’re narrowing the probability distribution — making it more likely that the next token will be in the direction you want. This is why specific, detailed prompts produce better results than vague ones.
AI doesn’t know what it doesn’t know. A human who’s uncertain will usually hedge. AI will produce a confident-sounding response even in domains where its training data was sparse or contradictory. The confidence of the output is not evidence of the accuracy of the content.
The same question gets different answers. Because generation involves probability and some randomness, the model won’t always produce the identical response to the same prompt. It’s always sampling from a distribution, not retrieving a stored answer.
AI is strongest where human language is densest. The places where prediction works best are the places where humans have written the most, most consistently, and most accurately. Mathematics, well-documented programming patterns, established scientific consensus — these are AI’s strongest domains. Edge cases, recent events, obscure specialties — weaker.
It’s a starting point, not an authority. Use AI outputs the way you’d use advice from a very well-read, very fast colleague who occasionally makes things up. Valuable for direction, synthesis, drafts, and exploration. Unreliable as a final source.
The close
The reason understanding this matters isn’t academic.
It’s because every interaction you have with an AI tool is shaped by what you think is happening on the other side. If you think it’s thinking, you’ll trust it in the wrong ways. If you think it’s just a calculator, you’ll underuse it in the wrong ways.
The accurate picture is somewhere in the middle. A system that does something no human mind does — predicts language at enormous scale with extraordinary accuracy — and produces outputs that can be indistinguishable from understanding, without actually being it.
That’s not a limitation. It’s a description of what the tool is.
And knowing what a tool actually is is the first step to using it well.
I spent two months building this system by trial and error. A lot of error. A lot of wasted time figuring out what prompt structures actually worked vs. which ones sounded good but produced mediocre outputs.
I documented all of it. The prompt templates. The workflows. The automation blueprints. The freelancer positioning strategy. The copy-paste prompts I use on every project.
I turned it into a complete, implementation-focused guide called **The AI Data Analyst System: How to Use Claude to 10x Your Productivity.**
I write about data, AI, and analytical careers. Follow @analystuttam for more.
메타데이터
- post_id
- 0d39ea6f6e26
- slug
- how-ai-actually-thinks-it-doesnt-0d39ea6f6e26
- url
- https://medium.com/ai-analytics-diaries/how-ai-actually-thinks-it-doesnt-0d39ea6f6e26
- canonical_url
- https://medium.com/ai-analytics-diaries/how-ai-actually-thinks-it-doesnt-0d39ea6f6e26
- author_url
- https://medium.com/@analystuttam
- status
- ok
- fetched_at
- 2026-07-14 13:23:55