What it is
An LLM turns text into a probability for every possible next token
The clearest way to see what an LLM does is to run a small one and look at what comes out. Alibaba's Qwen2.5-3B-Instruct runs on a laptop through Ollama, and the input below is the raw start of a sentence with no chat formatting around it, "The customer was charged twice for the same order, so this support ticket should go to the". What comes back is a probability for every entry in the model's vocabulary, which is 151,936 tokens for this one, and those probabilities add up to 1.

The top answer, " billing", gets 30.2%. " Billing" with a capital B is a separate token and gets another 3.6%, and three of the top ten are runs of underscores. The ten most likely tokens only add up to 62.9%, and the other 37.1% is spread across the rest of the vocabulary.
To produce text, the model picks one token from that distribution, adds it to the input and runs again. When it takes the most likely token every time, which is what a temperature of 0 does, this model writes " billing department. A. Correct B." and keeps going. It completes the sentence and then writes what looks like a multiple-choice quiz, and within 60 tokens it has moved on to an unrelated quiz question about power supply systems, because it's continuing the text the way its training data would.
This model has been post-trained to answer and stop, and that behavior depends on its chat template, the special tokens that mark where a user's message ends and the assistant's reply begins. Sent through the template, the same sentence gets a 72-token answer that starts "This support ticket should be directed to the billing or customer service team", and then the model writes its end-of-turn token, which tells the software to stop. The section on how it works covers post-training, and How LLMs Actually Run Things walks through tokens and this loop step by step.
Most frontier LLMs now take images as well as text as input. As of September 18, 2026, Anthropic's and OpenAI's model docs list text and image input with text output for all their current models. The amount of input a model can take at once is its context window. That's about 1 million tokens for OpenAI's and Anthropic's current models, apart from Claude Haiku 4.5 at 200,000.
Keep reading
The rest of this article is free with an account
Create a free account to read the remaining 6 sections. It takes about twenty seconds and there's nothing to pay. The same account opens the slide decks and CV reviews.
- 02LLMs do most of the text work in AI products, from chat to coding agents
- 03Inside, an LLM is a stack of transformer layers trained on trillions of tokens
- 04The LLMs you'll see, as of September 18, 2026
- 05Pick an LLM when the output is language, and a neighbor when the answer is narrower
- 06How to try it
- and 1 more
