LLM: what a large language model is and how it works
Generative AI reached 53% adoption in the population within three years, faster than the personal computer or the internet, according to Stanford's AI Index 2026. Behind ChatGPT, Gemini and Claude sits the same engine: an LLM. So what is an LLM? A large language model is a program trained on vast amounts of text to predict, piece by piece, the most likely continuation of a text. Repeated very fast, that prediction lets it answer questions, summarize, translate or write code. This guide explains what LLM stands for, how it works, how it is built, which models lead in 2026 and what it cannot do.
LLMs at a glance
| Question | Short answer |
|---|---|
| What does LLM stand for? | Large language model. |
| What does it do? | It predicts the most likely next piece of text after the ones it has read, then repeats. |
| What is it built on? | A Transformer neural network with billions of internal settings. |
| Examples | GPT (OpenAI), Claude (Anthropic), Gemini (Google), Llama (Meta), Mistral (Mistral AI). |
| Main limitation | It produces plausible text, not verified text: it can be wrong with full confidence. |
What is an LLM? A plain definition
A language model is a program that estimates how likely a sequence of words is. A large language model does this at enormous scale, which lets it handle almost any writing task: drafting, summarizing, translating, answering questions or reasoning through a problem. It is one branch of artificial intelligence, and more precisely of deep learning.
The word "large" refers to three things:
- Parameters: the model's internal settings. GPT-3 had 175 billion of them in 2020, ten times more than any previous non-sparse language model.
- Data: Meta says it pretrained Llama 3 on over 15 trillion tokens from publicly available sources.
- Compute: the EU's AI Act, Article 51, presumes a general-purpose model has high-impact capabilities, and so systemic risk, once its training exceeds 10²⁵ floating-point operations.
How an LLM works
Text is split into tokens
An LLM does not read words but tokens: a short word, part of a word or a punctuation mark. According to Google's documentation, a token is about 4 characters, and 100 tokens equal roughly 60 to 80 English words. Each token is turned into a list of numbers that places its meaning relative to others: "dog" lands near "cat" and far from "invoice".
Predicting the next token
The core of the system is a single operation. After "The cat is sleeping on the", the model gives a probability to every possible token: "sofa" is very likely, "cloud" much less so. It picks one, adds it to the text and starts again until the answer is complete. A 300-word reply therefore takes several hundred predictions in a row, which is why the text appears on screen bit by bit.
Attention: linking words together
Good predictions need context. That is the job of the Transformer architecture, introduced by Google researchers in 2017 in the paper "Attention Is All You Need". Its attention mechanism links every word to every other word. In "The trophy did not fit in the suitcase because it was too big", attention helps the model work out that "it" means the trophy. Nearly all current LLMs use this architecture.
How a large language model is built, in 3 steps
A model that can only continue text is not yet an assistant. It takes three phases to get from one to the other:
- Pretraining: the model reads trillions of tokens (web pages, books, code) and learns to predict what comes next. It picks up grammar, general knowledge and patterns of reasoning. This is the longest and most expensive step.
- Supervised fine-tuning: it is shown example questions paired with good answers written by people, so it learns to follow instructions.
- Reinforcement learning from human feedback (RLHF): people rank several of the model's answers, and it learns to produce the ones they prefer.
That last step makes a big difference. In OpenAI's InstructGPT study, raters preferred answers from a 1.3-billion-parameter model tuned this way over those of GPT-3, which is about 100 times larger. Size is not everything: how a model is trained matters just as much.
LLM vs generative AI vs chatbot
These three terms are often mixed up, but they describe three different levels:
| Term | What it is | Example |
|---|---|---|
| Generative AI | Any AI that creates content: text, images, audio, video | An image generator, an LLM |
| LLM | The model that understands and produces text | GPT-5, Claude, Mistral Large |
| Chatbot | The chat app built around a model | ChatGPT, Le Chat, Gemini |
Put simply, the LLM is the engine and the chatbot is the car. The same model can power a chat assistant, a grammar checker, a translation tool or an AI agent that chains actions together. For the bigger picture, read our guide to generative AI.
Best-known LLMs in 2026
There are two families. Closed models can only be used through their maker's service. Open-weight models can be downloaded and run on your own hardware.
| Family | Maker | Country | Access |
|---|---|---|---|
| GPT | OpenAI | United States | Closed (ChatGPT, API) |
| Claude | Anthropic | United States | Closed (Claude, API) |
| Gemini | United States | Closed (Gemini, API) | |
| Llama | Meta | United States | Open weights, Meta license |
| Mistral | Mistral AI | France | Several models under Apache 2.0, others commercial |
An open model lets you keep your data in-house: that is the idea behind a local LLM and open-source AI. To pick an assistant for your needs, see our comparison of the best AI.
What people use LLMs for
The most common everyday uses:
- Writing: a first draft of an email, a job ad or meeting notes.
- Summarizing: a long report, a contract or a message thread, in a few bullet points.
- Translating and rewording: switching language or tone while keeping the meaning.
- Coding: writing, explaining or fixing code.
- Analyzing: pulling facts out of a document, sorting customer reviews.
Answer quality depends heavily on the request. A precise instruction, with context and the format you expect, gives far better results: that is what an AI prompt is about.
Limits of large language models
- Hallucinations: the model can invent a figure or a reference. A 2025 paper argues that training and evaluation reward guessing over admitting uncertainty. See our article on AI hallucination.
- Frozen knowledge: the model only knows what it read up to its training cutoff, unless it can search the web or your documents, which is what RAG does.
- Limited memory: it can only read a set number of tokens at once, its context window. Google puts it at about one million tokens for Gemini models.
- Bias: it reproduces the imbalances of the text it learned from.
- Privacy: what you type into an online service may be stored. Do not paste sensitive data without checking the terms of use.
When an LLM is the wrong tool
An LLM is great with language and much weaker with exactness. Payroll, unit conversions or a legal deadline are better handled by a spreadsheet, dedicated software or an official source. Likewise, for anything recent (a price, a stock quote, a law that just changed), a search engine or the reference website is safer. Use the LLM for the first draft and the rewording, and keep the fact-checking for yourself.
Key takeaways
- Definition: an LLM is a large language model trained on huge amounts of text to predict the most likely continuation.
- How it works: text split into tokens, a Transformer architecture, prediction repeated token by token.
- How it is built: pretraining, supervised fine-tuning, then human feedback.
- Limits: hallucinations, frozen knowledge and bias, so always check what matters.
Frequently asked questions
What does LLM stand for?
LLM stands for large language model. It is an AI program trained on vast amounts of text so it can understand a request and write a response. It is the engine behind assistants such as ChatGPT, Gemini and Claude.
Is ChatGPT an LLM?
Not exactly. ChatGPT is a chat application: the LLM is the model running behind it, from OpenAI's GPT family. The app adds an interface, conversation history, web search and other tools around the model.
What is the difference between AI and an LLM?
Artificial intelligence is the whole field: image recognition, recommendations, fraud detection, driver assistance. An LLM is just one category, specialized in written language. Every LLM is AI, but not all AI is an LLM.
Can I use an LLM for free or on my own computer?
Yes. Most assistants offer a free tier with usage limits. Open-weight models, such as some Mistral or Llama models, can also be installed on a powerful enough computer, without sending your data to an online service.
Does an LLM really understand what it writes?
Not in the human sense: it works with statistical patterns learned from text. Those patterns are rich enough to summarize, translate or reason through a simple problem. But the model has no intent of its own and no built-in way to check that a statement is true.
Sources
- The 2026 AI Index ReportStanford HAI
- Language Models are Few-Shot LearnersarXiv (OpenAI)
- Article 51: Classification of General-Purpose AI Models as General-Purpose AI Models with Systemic RiskEU AI Act (Regulation 2024/1689)
- Understand and count tokensGoogle AI for Developers
- Attention Is All You NeedarXiv (Google)
- Models overviewMistral AI