Start here: AI from zero
BeginnerReading 2 of 5 · 2 min read

What does a language model do?

A language model reads the text it is given and predicts, one small piece at a time, the most likely continuation.

Read first: What is generative AI?

A language model is the engine inside a chat assistant. It does one thing: given some text, it estimates which small piece of text, called a token, is most likely to come next. It adds that token, looks at the longer text, and repeats. A paragraph is hundreds of these small predictions in a row.

Everything else people notice comes from doing that one thing very well on a vast amount of text. Because the training text contains explanations, arguments and code, the model can continue a question with something that looks like an explanation, an argument or code. Newer reasoning models spend extra steps working through a problem before they answer, but underneath they still predict text.

A model only knows what was in its training text and what you put in front of it. It does not browse the web or remember your last conversation unless the product around it adds those abilities. Knowing where the model ends and the product begins is the first step to understanding agents.

An everyday example

Type "The capital of France is" and the most likely next piece is "Paris". Type "My favourite city is" and there is no single likely answer, so the model picks one of many plausible ones. That difference is the difference between a fact the text agrees on and a guess.

A common misconception

What people think
A language model understands the question the way a person does and then decides what to say.
What actually happens
It predicts likely text. That often produces answers that look like understanding, and sometimes produces fluent nonsense: the model has no separate step where it checks the answer against the world.

Check it yourself

Start one sentence that has an obvious ending and one that has many possible endings, and ask an assistant to complete each three times. Notice which completions stay the same and which change.

Where to go next

Sources