How does an LLM work?
An LLM works by predicting the next piece of text, one small step at a time, based on everything before it. When you type a question, the model breaks your words into tokens (chunks of text), converts them into numbers, and passes them through a giant network of learned patterns called a transformer. At each step it asks a single question: given everything so far, what's the most likely next token?
It picks one, adds it to the sentence, and repeats — token by token — until the answer is complete.
Where does the intelligence come from?
All of it comes from training. The model saw trillions of tokens of human writing and gradually adjusted billions of internal settings, called parameters, until its predictions matched real language. Those settings quietly encode grammar, facts, reasoning patterns, and writing styles — not as neat rules a person wrote down, but as statistical patterns baked into the numbers.
Nobody programs an LLM to know that Paris is in France; it learned that from seeing the words together countless times. This is also why a model can be confidently wrong: it absorbed patterns, not a checked database of truth.
What shapes each answer you get?
Two different things decide what an LLM says:
- Its training — fixed once the model ships, this is the vast background knowledge and skill it carries into every conversation.
- Your prompt and the recent conversation — its live context, the only information specific to you and this moment.
The model has no memory beyond that context window and no live access to the world unless a tool gives it one. Change the prompt and you change the answer, even though the underlying model never moved.
Does an LLM actually understand you?
Not the way a person does. When an LLM feels like it understands you, what's really happening is astonishingly good pattern-matching — next-token prediction, scaled up until it looks like thought. It has no beliefs, intentions, or awareness of being right; it produces the text most consistent with everything it has seen.
That's powerful enough to draft, explain, and hold a conversation, but it's why the output is best treated as a smart, fast first draft to check rather than a final authority.
Related Questions
More in AI Fundamentals