STATIONLAWS
NEWS • EXPLAINERS • LAW
Home / Technology

How Large Language Models Work, in Plain Terms

Published: December 2, 2026 • 4 min read
How Large Language Models Work, in Plain Terms
Quick Summary

A large language model is a program trained on huge amounts of text to predict what comes next in a sequence. That one skill, applied at scale, produces fluent writing, translation and summaries. It also explains why these systems sometimes state things that are false.

A prediction machine

The core idea is older and simpler than the chatbots built on it. Google's machine learning course defines a language model as something that estimates the probability of a token, or a sequence of tokens, occurring within a longer sequence.

The course gives an example. Take the sentence "When I hear rain on my roof, I _______ in my kitchen." A language model does not know what rain is. It assigns probabilities to possible ways of filling the blank, such as "cook soup" or "warm up a kettle," based on patterns in the text it was trained on. An application then picks from the likely candidates.

Repeat that step many times, each new piece of text feeding the next prediction, and you get sentences, paragraphs and whole essays. Tasks like translating and summarizing turn out to be versions of the same prediction problem.

What a token is

Models do not read whole words the way people do. They break text into tokens. According to the Google course, a token can be a word, part of a word or a single character, and most modern models split text into subwords. The word "unwatched," for example, might become three tokens: "un," "watch" and "ed."

For English, the course gives a rule of thumb: one token corresponds to roughly four characters, or about three quarters of a word, so 400 tokens is around 300 English words. This is why AI services often describe their limits and usage in tokens instead of words.

Why context changed everything

Earlier language models looked at only a few words at a time. The Google course uses the phrase "orange is" as an example. With only two words to go on, a model cannot tell whether the next word should be "ripe," about the fruit, or "cheerful," about the color. More context settles it.

Large language models are built on a design called the Transformer, which the course describes as the most successful and widely used architecture for these systems. Its key feature is self-attention. For each token in the input, the model in effect asks how much every other token affects the interpretation of this one.

The course illustrates this with a sentence: "The animal didn't cross the street because it was too tired." A reader knows "it" means the animal. Self-attention lets the model weigh "animal" as more relevant than "street" when it processes "it." Change the last word to "wide," and the weighting should shift toward the street.

A full model stacks many layers of this mechanism. In the course's description, earlier layers may pick up basic syntax, while deeper layers combine that into broader things such as sentiment and themes across the whole input.

How a model is trained

Training starts with an enormous amount of text. The Google course describes a first phase in which some tokens in the training text are hidden and the model tries to predict them. When it guesses wrong, its internal settings are adjusted slightly. Over a vast number of examples, the model learns patterns that help it fill the gaps.

Those internal settings are called parameters. The course says Transformers can contain hundreds of billions or even trillions of them, which is the "large" in the name. Size is also why these models are costly to build and run.

After the general training, a model can be adapted. The course describes several methods:

  • Fine-tuning gives the model extra training on examples from a specific task.
  • Distillation creates a smaller version that runs faster and uses fewer resources, at some cost in quality.
  • Prompt engineering changes nothing inside the model. The user simply gives clearer instructions or examples in the request.

What these models are not

A language model is not a database that looks up stored facts, and it does not check its output against the world. It produces text that is statistically plausible given its training and the prompt. Often that text is accurate. Sometimes it is fluent, confident and wrong. The Google course lists these errors, known as hallucinations, among the main problems of large language models, along with heavy computing costs and bias carried over from training data.

This has practical consequences for everyday use:

  • Check names, dates, figures and citations against a reliable source before relying on them.
  • Give context. The course notes that models respond better with it, and an example of the format you want often helps.
  • Treat the output as a draft from a well-read assistant that can misremember, not as a final authority.

Where to learn more

Readers who want the mathematics can find it in free university material. The textbook Speech and Language Processing by Dan Jurafsky of Stanford University and James H. Martin of the University of Colorado Boulder is available online in draft form. Google's course is aimed at beginners with some technical background and includes short exercises.

Sources