seegongsik
Saved words
AI

The machine that guesses the next word: LLM

A large language model, LLM for short. It writes, translates, and even helps you code, so it feels like magic, right? But look inside and it is surprisingly simple. What an LLM does is really just one thing. It looks at the words so far and guesses the word that comes next. String those guesses together one word at a time, and you get a long sentence, an answer. Is that really all? Let's check together.

01

Guess the word that comes next

Think of typing on your phone.
You tap a word and the keyboard
quietly suggests the word that might come next.
An LLM really does that same job.
It is just astonishingly good at it.
It reads all the words so far
and picks the most plausible next word.
It attaches that one word
and then picks the word after that.

The sky
pick the next word
Tap a candidate word to continue the sentence
0 / 3

Tap a word to continue the sentence. Each tap shows next-word candidates with their probabilities. One word at a time, the sentence grows.

Surprising, right?
It merely picked the next word,
yet a sentence that makes sense appeared.
The secret is the number beside each candidate.
That number is a probability.
It is a score showing how likely
a given word is to come next.
The LLM picks a high one among them.
Let's see exactly what probability means next.

02

Pick one by probability

Probability is not hard.
For each possible next word
it assigns a score of how plausible it is.
The higher the score, the more plausible.
For example, after the sky is clear
a word like bright scores high
while pitch-dark scores low.
The LLM usually picks the higher-scoring word.
Then it attaches that chosen word to the sentence.

Since it rained
Pick the highest-probability word and attach it
0 / 3

At each step, tap the word with the highest probability to pick it. The chosen word joins the sentence and you move to the next step. The candidates are preset, so they appear the same every time.

Each time you picked one word
the sentence grew by one slot.
Then it reread the longer sentence
and offered fresh next-word candidates.
Pick, attach, pick again.
Repeat this tiny move countless times
and you get paragraphs and long answers.
An LLM's writing does not pop up whole;
it piles up one step at a time like this.

03

It changes by looking at context

But next-word probabilities are not fixed.
Depending on which words came before,
they shift dramatically in an instant.
After I am hungry, food words feel right;
after the boat at the harbor, sea words
become the plausible ones.
With the same word boat, a different context
completely changes what comes next.
This ability to choose what to look at is attention.

context
I was hungry, so I grabbed
rice67%
bread22%
the sea2%
Tap to change the context and the next-word spread shifts

Tap to change the earlier word. Even at the same spot, a different context completely reshuffles the next-word probability bars. That means attention is looking back.

Just one earlier word changed,
yet the next-word probabilities flipped entirely.
Here lies the secret of why an LLM seems smart.
It surveys the whole prior context
and picks the next word that fits the situation.
That is why, even for the same question,
the answer differs quite a bit
depending on what context you lay down first.
Reading context well is, in effect, the skill.

04

Many abilities grow from one

Here something amazing happens.
We only made it good at guessing the next word,
yet abilities no one asked for tag along.
Given a long text then summary follows,
it plausibly continues with a summary;
given Korean then English follows,
it continues with a translation;
given a problem then code follows,
it even manages to code.
Abilities that appear on their own are called emergent.

lead-in flow
long text … to sum it up,
next word
the key is
All three merely looked at the lead-in and picked the next word
Tap to switch the ability

Tap to switch the ability. Summary, translation, and coding all come from the same next-word guessing. Only the lead-in flow differs; the machine's job is one.

Only the button changed, yet the task looked different.
But inside, it is all the same.
Look at the lead-in and guess the next word.
Polishing this one thing on vast amounts of text
made many abilities come along as a bonus.
Still, remember one thing for sure.
An LLM does not know the truth;
it only picks the most plausible next word.
So it can be wrong while sounding sure.

05

Let's wrap up

Gathered on one line, it is this.
An LLM looks at the prior context
and guesses the next word by probability.
It scores each candidate and picks a high one,
attaching one word at a time to build long text.
When earlier words change, probabilities change too,
and choosing what to look back at is attention.
Getting good at this one thing
made summary, translation, and coding emerge.
Just never forget it picks plausibility, not truth.

Tap the key points in order to review

Tap the key points in order to review. (guess the next word -> pick by probability one word at a time -> changes with context, attention -> many abilities emerge)

Now you can see what an LLM really is.
Not magic, but a machine that guesses
the next word by probability.
Doing a simple thing well at an enormous scale
let unexpected abilities bloom.
In fact, a model like me,
talking with you right now, is just such a machine.
But chasing only plausibility
sometimes makes it confidently wrong.
Next, let's explore these limits and responsibility.

In one lineAn LLM is a machine that looks at the prior context and guesses the next word by probability. For each candidate word that might come next, it scores how plausible it is as a probability, then picks a high one. It attaches the chosen word to the end of the sentence, and with the longer sentence it guesses the next word again. Repeating this one word at a time, it builds a long text. When the earlier words change, the next-word probabilities change too, and this ability to choose which prior context to look at is exactly the attention you learned before. And because it was trained on huge amounts of text to do this one thing well, abilities no one asked for tagged along. It summarizes, translates, and codes. Such abilities that appear on their own are called emergent. But remember. An LLM does not know the truth; it only picks the most plausible next word. So it can be confidently wrong. Its limits are covered in the next lesson.
AI
Was this helpful? Support seegongsik