be/brief
Request access
← Briefly
Concept

What is an LLM (large language model)?

The short answer

A large language model is a neural network, almost always a transformer, trained on massive text to predict the next token, the next fragment of text, from everything before it. Abilities like following instructions and step-by-step reasoning are not programmed in. They emerge from that single objective once the model is large enough.

Strip away the chat interface and the branding, and a large language model does one thing: it reads a stretch of text and predicts what comes next. Everything a person experiences as answering questions or reasoning through a problem is built on top of that single mechanical act, repeated one fragment at a time.

What a large language model actually is

An LLM is a neural network trained on a very large body of text. Almost all of them share one architecture, the transformer, and one training goal: given some text, predict the next unit of text. That unit is a token, usually a word or a word fragment rather than a whole word. During generation the model predicts a token, appends it, and predicts again, so a paragraph is thousands of these guesses laid end to end.

The “large” is literal on two counts. The training data runs to a large fraction of the public web and digitised books. The model’s learned settings, its parameters, number in the billions for the biggest systems.

Large language model (LLM): a neural network, almost always a transformer, trained on a large text corpus to predict the next token given the preceding text. At generation time it strings those predictions together into fluent output.

How next-token prediction works

Text goes in as tokens. For each position, the model outputs a probability for every token it could produce next, one is chosen, and the process repeats. The model is never told the rules of grammar or the facts of history. It only adjusts its parameters to make the real next token more likely across the training data. Fluent grammar and apparent world knowledge both fall out of getting very good at that one prediction task.

Why the transformer changed things

The behaviours people find striking rest on the architecture underneath. The transformer, introduced by Vaswani and colleagues in 2017, replaced the earlier recurrent designs that read text strictly left to right, one step at a time. Its central idea is attention: for each token, the model weighs how much every other token in the context should influence the prediction. The paper’s own framing is that the architecture is “based solely on attention mechanisms, dispensing with recurrence and convolutions entirely” (Vaswani et al., 2017). Attention made it practical to train on enormous corpora, because the computation parallelises in a way the older sequential models could not.

Where the useful behaviours come from

The model was trained only to predict text, yet at scale it does far more. Brown and colleagues showed that a sufficiently large model could perform a new task from nothing but a few examples written into the prompt, “without any gradient updates or fine-tuning” (Brown et al., 2020). This is in-context learning, and it was not designed in. It appeared as the model grew.

That pattern has a name. Wei and colleagues define an ability as emergent when it “is not present in smaller models but is present in larger models” (Wei et al., 2022). Step-by-step reasoning is one such ability: prompting a model to work through a problem in intermediate steps improves its answers, and that gain “emerge[s] naturally in sufficiently large language models” via chain-of-thought prompting (Wei et al., 2022). No one wrote a reasoning module. Scale plus attention produced the behaviour.

Why it predicts rather than knows

The single most useful thing to understand about an LLM is that it has no store of facts to look up. When it answers a question correctly, it is producing the most plausible continuation of your prompt, and the correct answer happens to be that continuation. When it answers wrongly with total confidence, the same machinery is running. A fluent falsehood is just a plausible continuation that is not true. This is why models hallucinate, and it is not a defect a bigger model fully removes.

It also explains the tooling built around these models. Retrieval-augmented generation, or RAG, fetches real documents and places them in the prompt so the model predicts from grounded text rather than from memory alone. An AI agent wraps the model in a loop that lets it act and check each result before moving on, compensating for the fact that any single prediction carries no guarantee of being right. Both exist because prediction, however fluent, is not retrieval.

Sources

Questions, answered

What is a token?

The unit of text a language model reads and predicts. A token is usually a word or a word fragment rather than a whole word, so a sentence is broken into several of them before the model processes it.

What does the 'large' in large language model mean?

Two things at once: the training data runs to a large fraction of the public web and digitised books, and the model has billions of learned settings, called parameters. The biggest systems run to hundreds of billions of them.

Is an LLM just predicting the next word?

Mechanically, yes. It repeatedly predicts the most plausible next token given what came before. What is surprising is how much useful behaviour, from answering questions to step-by-step reasoning, falls out of doing only that at sufficient scale.

Why do LLMs make things up (hallucinate)?

Because a model has no store of facts to look up. It generates the most plausible continuation of the prompt, and a confident falsehood is simply a plausible continuation that happens not to be true. Retrieval and verification tooling exist to compensate.

Brief is a team of AI associates you direct in plain language. Opening to a small group at a time.

Request access