LLMs (large language models) are AI models trained on huge amounts of text to do one thing extremely well: predict the next token — a word or a piece of a word — in a sequence. Repeating that prediction one token at a time lets an LLM answer questions, summarize documents, translate, and write code. GPT, Claude, Gemini, Qwen, and Llama are all LLM families.
Below: what each word in the name means, how LLMs work without the math, what tokens and context windows are (and why they decide what you pay), today's leading models, what LLMs do well and badly, and where teams put them to work.
LLM meaning: what “large”, “language”, and “model” tell you
Each word in the name describes one property of the technology:
• Large: the model has billions to trillions of parameters – the adjustable numbers it tunes during training. Alibaba's Qwen4-Max, released in November 2026, has 2.4 trillion parameters.
• Language: it reads and writes text. Most current LLMs also handle images, audio, or code, which is why they are often called multimodal.
• Model: it is a neural network that has learned statistical patterns, not a database of facts or a set of hand-written rules.
An LLM is also not the same thing as a chatbot: ChatGPT, the Claude app, and the Gemini app are products built on top of LLMs.
How do LLMs work?
An LLM works by splitting text into tokens, predicting the most likely next token, appending it, and repeating that loop until the answer is complete. Everything the model “knows” was compressed into its parameters during training, which happens in two stages before anyone types a prompt.
1. Pretraining: learning to predict the next token. The model reads a vast corpus of web pages, books, code, and papers, and plays one game billions of times: guess the next token, compare the guess with the real one, and adjust its parameters slightly. To get good at that game, it has to absorb grammar, facts, writing styles, and reasoning patterns. Almost every LLM does this with the transformer architecture, introduced by Google researchers in the 2017 paper “Attention Is All You Need”. Its key idea, attention, lets the model weigh how much each input token matters to every other token, so a pronoun can be tied to the right noun several sentences back.
2. Fine-tuning and alignment: learning to be an assistant. A pretrained model only continues text. To make it follow instructions, developers train it further on curated examples of good answers and on feedback about which of two answers is better, given by people (reinforcement learning from human feedback, or RLHF) or by other AI models. This stage teaches format, tone, when to refuse, and when to call a tool. Companies can fine-tune a model further on their own data, although many start with better prompts and retrieval because those are cheaper to change.
3. Inference: generating the answer. Inference is the model at work. Your prompt is converted into tokens and processed, then the model generates the answer one token at a time, with each new token conditioned on everything before it. Many current models also reason before they answer: they first produce hidden reasoning tokens, which helps on hard tasks and is billed as output.
The short version: an LLM does not look answers up. It generates the most plausible continuation of your text, based on patterns learned in training. That one fact explains both what LLMs do brilliantly and how they fail.
Tokens and context windows: why they decide what you pay
What is a token in an LLM?
A token is the unit of text an LLM reads and writes: a whole word, part of a word, a punctuation mark, or a space-delimited fragment. For English text, OpenAI's rule of thumb is that one token is about four characters or three-quarters of a word, so 100 tokens are roughly 75 words. Counts differ between models and languages, because each model family uses its own tokenizer: the same paragraph can produce a different number of tokens, and a different bill, on two models.
Tokens matter because they are the unit for everything practical: what the model can read at once, how fast it answers, and what you pay.
What is a context window?
The context window is the maximum number of tokens an LLM can work with in one request: system instructions, conversation history, attached documents, tool results, and, for most models, the answer it writes. Anything outside the window, the model simply does not see. Many flagship models released in 2026 offer about 1 million tokens – Claude Sonnet 5.5 and Qwen4-Max among them – which is roughly 750,000 words of English.
A bigger window doesn't mean bigger memory for free. Every token you put into it is processed and billed on every call.
Why tokens drive LLM cost
LLM APIs charge per million tokens, with separate prices for input (what you send) and output (what the model writes). Output usually costs several times more: Anthropic lists Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output tokens as of November 2026. Three mechanics make bills grow faster than usage:
• History is re-sent on every turn. The model keeps no memory between requests, so the twentieth message in a chat pays again for the first nineteen.
• Reasoning tokens count as output. Hidden thinking is billed even though you never see it.
• Agents multiply calls. An AI agent that plans, calls tools, and checks results can make dozens of model calls for one task, each carrying a growing context.
Prompt caching softens the first problem: Anthropic bills cached input for Sonnet 5.5 at $0.10 per million tokens, one-twentieth of the regular rate. Context compression reduces what is sent in the first place; our benchmark on coding agents shows what it saves on a real bill.
Cost already slows adoption. In McKinsey's State of AI in 2026 survey, about one in five respondents said AI operating costs, including token costs, constrained their AI use. For why token bills break the usual cloud cost playbook, see FinOps for AI.


