A large language model (LLM) is a neural network trained on very large amounts of text so that it can predict and generate language. Seen from a high level, an LLM has read an enormous quantity of text and, from that reading, learned the statistical patterns of how language fits together well enough to continue almost any passage plausibly. Nearly everything an LLM appears to do — answering a question, drafting a message, translating a sentence, writing code — comes from that one underlying ability.
What a large language model is
An LLM belongs to the family of systems known as neural networks, and more specifically to deep learning, in which many layers of simple computing units learn patterns directly from data rather than following hand-written rules. Earlier language software relied on grammars and rules that engineers wrote by hand; an LLM instead learns how language behaves by example, from text, without being told the rules explicitly.
The word “large” refers to two things at once: the volume of text a model is trained on, and the number of internal values — parameters — it uses to store what it has learned. It is this combination of scale and learning from data, rather than from hand-written rules, that distinguishes an LLM from earlier language tools.
Next-token prediction: the one thing it does
Underneath the varied tasks an LLM can perform is a single mechanism. Given the text so far — a question, a document, a half-finished sentence — the model produces a probability for every token in its vocabulary, indicating how likely each one is to come next. It then selects a token, appends it to the text, and repeats the whole process with the slightly longer text as its new input. Running this loop many times turns a short prompt into a full response.
Because output is generated one token at a time from left to right, LLMs are described as autoregressive. Nothing is looked up whole from a stored answer bank; each token is computed in context. Whether the model always takes the single most probable token or samples from among the likely ones is what makes its writing more predictable or more varied. The important point is that a fluent paragraph is assembled step by step, not retrieved.
Training on internet-scale text
An LLM acquires its abilities in a first stage called pretraining. The model is shown vast quantities of text — web pages, books, articles, reference works, and publicly available code — and is repeatedly asked to predict a hidden next token. Each guess is compared with the actual token, and the model’s parameters are nudged to predict better next time. This is called self-supervised learning, because the training signal comes from the text itself rather than from labels a person added.
Pretraining alone yields a model that continues text but does not necessarily follow instructions or behave helpfully. Most LLMs used in products therefore go through further stages, often grouped under fine-tuning and alignment, in which the model is trained on examples of good responses and adjusted using human feedback. This shapes a raw text predictor into a system that answers questions, holds a conversation, and declines clearly unreasonable requests.
The Transformer architecture
Modern LLMs are built on a neural-network design called the Transformer, introduced in 2017 and now the basis of essentially all leading models. Its central idea is a mechanism called attention, which lets the model weigh how much each token in the input should influence its interpretation of every other token. Attention is how a model connects a pronoun to the noun it refers to, or ties the end of a long passage back to its beginning.
A practical reason the Transformer displaced earlier approaches is that it processes the tokens of a sequence largely in parallel rather than strictly one after another. That parallelism made it possible to train far larger models on far more text using modern hardware. It is not the only architecture ever proposed for language, but it is the one on which today’s large language models rest.
Parameters and tokens in plain terms
Two words recur in any description of LLMs, and both have concrete meanings. A token is a unit of text the model reads and writes. Text is broken into tokens before processing; a token is often a whole word but can be a piece of a word, a punctuation mark, or a space. A parameter is one of the adjustable numbers inside the model that training sets. Collectively, the parameters are where the model’s learned knowledge of language lives; leading models have them in the billions or trillions.
| Token | A chunk of text the model processes, typically a word or part of a word. Both the input and the generated output are counted in tokens. |
|---|---|
| Vocabulary | The fixed set of possible tokens a given model can read and produce. Every prediction is a choice over this set. |
| Parameter | An adjustable numeric value learned during training. The parameters store what the model has absorbed about language; their count is a rough measure of a model’s capacity. |
| Context window | The maximum amount of text, measured in tokens, the model can take into account at once. It ranges widely, from a few thousand tokens to hundreds of thousands in newer models. |
| Pretraining | The initial stage in which the model learns to predict the next token from large amounts of text using a self-supervised signal. |
| Inference | Using a finished, trained model to generate output. Pretraining is done once and is costly; inference happens every time the model is prompted. |
Why scale matters
A defining lesson of recent years is that scale changes what these systems can do. Increasing three quantities together — the amount of training text, the number of parameters, and the computation spent training — has repeatedly produced models that write more coherently, follow instructions more reliably, and handle more tasks. This broadly predictable link between scale and capability is often called scaling behavior, and it is why LLMs grew so quickly from research curiosities into general-purpose tools.
Scale also has qualitative effects. Some abilities are weak or absent in small models and appear only once a model passes a certain size, which is why capability sometimes seems to arrive in steps rather than smoothly. None of this is free. Larger models demand more data, more specialized computing hardware, and more energy to train and to run, and the gains from each further increase eventually diminish. Scale is a powerful lever, not an unlimited one.
What LLMs can and cannot reliably do
Because a single flexible skill underlies them, LLMs are useful across many language tasks. They can draft and rewrite text, summarize long documents, translate between languages, answer questions, extract and reformat information, classify content, and generate and explain code. Much of their appeal is that one system handles work that once required many separate, purpose-built tools.
Their limits follow from the same design. An LLM produces the most plausible continuation of text, which is not the same as consulting a verified record, so it can state something fluent yet false — an error called a hallucination. It reflects only the text it was trained on and therefore has a knowledge cutoff, with no awareness of events after that point unless it is connected to search or other tools. It can also be sensitive to how a request is phrased, and whether it genuinely understands language or merely imitates understanding is an open debate. The general guidance that follows is to treat an LLM as a capable draft-writer and reasoning aid whose factual claims warrant checking.
| Generally reliable | Drafting, rewriting, and summarizing text; translation; answering common questions; reformatting and extracting information; generating and explaining code. |
|---|---|
| Not guaranteed | Factual accuracy, especially for names, numbers, quotations, and citations; currency of information beyond the knowledge cutoff; precise arithmetic or exact recall without external tools; consistent answers to reworded prompts. |
How LLMs relate to generative AI and AI assistants
Large language models are the text-focused branch of generative AI, the broader category of systems that create new content rather than only classifying or scoring existing data. Image, audio, and video generators are generative AI too; the LLM is the part specialized in language. All of them sit within machine learning, the wider field in which systems learn from data.
It is worth separating the model from the product built around it. An LLM is the underlying trained network; an AI assistant is an application that wraps a model in a chat interface and often adds tools, memory, and safety measures. Well-known model families, developed by different research organizations, include GPT, Claude, and Gemini, and each powers one or more widely used assistants. The assistant a person interacts with is the visible surface of a large language model working underneath.
Frequently asked questions
What is a large language model (LLM)?
A large language model is a neural network trained on very large amounts of text to predict and generate language. Given some text, it estimates the most likely next token and repeats that step to produce sentences, paragraphs, or code. The same underlying ability lets it answer questions, summarize, translate, and draft writing.
What does next-token prediction mean?
It means the model's basic operation is estimating what comes next. From the text so far, the model produces a probability for every token in its vocabulary and selects one, then adds it to the text and repeats. Fluent responses are built one token at a time by this loop, not retrieved whole from a database.
What are parameters and tokens?
Tokens are the chunks of text a model reads and writes, often a word or part of a word. Parameters are the adjustable numbers the model learns during training; they store what it has absorbed about language and number in the billions or trillions. More parameters generally mean more capacity to represent patterns.
Why are larger language models more capable?
Increasing the amount of training data, the number of parameters, and the computation used to train has repeatedly produced models that write more fluently and handle more tasks. Some abilities appear only once a model is large enough. Scale is not free, however: bigger models cost more to train and run, and gains eventually slow.
Why do large language models sometimes get facts wrong?
A model generates the most plausible-sounding continuation, which is not the same as retrieving a verified fact, so it can state something fluent but false, an error called a hallucination. It is also limited by a knowledge cutoff: it reflects the text it was trained on and does not know events after that point unless connected to external tools or search.
Do large language models actually understand language?
This is debated. Large language models capture the statistical structure of language well enough to produce coherent, useful text, but they learn from patterns in text rather than from experience of the world, and they have no built-in check on truth. Whether that amounts to understanding, or a sophisticated imitation of it, remains an open question.
More from highlevel.ai
Continue the high-level view: How AI works, What is generative AI, What is machine learning, What AI runs on, and A high-level history of AI.