Basic

What a language model is (and isn't)

A large language model (LLM) is a program that has read such a huge amount of text that it got very good at guessing what comes next in a sentence. It doesn't "know" things the way you know your own name. It just predicts words. That one trick is what makes it feel smart. This page teaches the ideas, not risky financial advice, well, not risky advice of any kind.

About 2 min of reading

Data Flow

You send text, the model predicts the next words, and it keeps going until the request is done.
1 You send a prompt
↓
2 Model predicts next word
↓
3 Add the word, repeat
↓
4 Stop when complete
Why this works
It predicts words

Every LLM is a giant prediction machine. Give it words and it guesses what likely comes next. Chain enough guesses together, and you end up with sentences, paragraphs, and answers that look deliberate.

It learned from text

LLMs are trained on huge amounts of text from books, websites, and code. They don't "know" facts like a person does, they learned patterns from data, which is a very different thing.

Examples

Guessing the next word

The sky is ____.

The model has seen billions of sentences, so the word most likely to come next is "blue". It's not magic, it's a prediction machine so good at spotting patterns that the guesses usually sound right.

Learning the pattern before you show up

prompt = "The cat sat on the ___."

While it was training, the model watched a huge pile of similar sentences and quietly picked up the pattern. Training is all that learning, done before you ever type anything to it.

It has no answer memorized

You: "What is a dog?"
Model: "A dog is a loyal animal people keep as a pet."

The model didn't pull that fact out of a filing cabinet. It generated the words one at a time from everything it learned during training, and happened to produce something true. That's the whole trick, done well.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

Next Lesson
How models read text: tokens
How models read text: tokens →