← Table of Contents · Page 22 of 868
HOW LLMs WORK FOR THE NON-SPECIALIST
Part 5 of 13
PREDICTION OF THE NEXT TOKEN, AND WHY MODELS SEEM TO UNDERSTAND
At its core, an LLM does one thing over and over: it predicts the next token.
Given all the tokens so far, it calculates a score for every possible next token, picks one, adds it to the text, and repeats.
A complete answer is built one token at a time, each new token depending on all of the earlier ones.
This may sound too simple to produce thoughtful answers, yet it does.
The reason is that predicting text well requires absorbing a great deal about the world.
To continue the sentence "The capital of France is", the model must have learned a fact.
To continue a math word problem correctly, it must have picked up the patterns of reasoning in worked solutions.
To continue a piece of code, it must have learned how programs are structured.
So the model's habit of predicting the next token turns out to force it to learn grammar, facts, styles, and ways of reasoning.
Does the model truly understand?
Experts disagree about the right way to use that word.
What is safe to say is this.
The model behaves in ways that look like understanding in many situations, and it can be very useful.
But its way of producing answers is different from a person's, and it can fail in ways that a person who really understood would not.
For example, it may follow a pattern that looks right but is wrong, or it may agree with a false claim you supplied.
As an engineer, you do not need to settle the philosophical question.
You need to remember that the model is a pattern completer, so it is strongest where patterns in its training are strong, and it needs checking where being right matters.
Advertisement
Read Aloud:
0:00 / 0:00