What Is an LLM? Large Language Models Explained
An LLM is the model that predicts text one token at a time. ChatGPT and similar apps are products built on top of one. Here is how the pipeline actually works, with a worked example.
An LLM is a statistical model trained on massive amounts of text that generates language by predicting the next most likely token, one step at a time, based on everything that came before it. It does not look anything up or reason the way a person does. It has absorbed enough patterns from its training text that predicting a plausible next word usually means producing something coherent, useful, and often true. GPT-4, Claude, Gemini, and Llama are all LLMs. ChatGPT is not one of them: it is a chat product built on top of an LLM.
The model and the chatbot are not the same thing
This is the mix-up that trips up most people building with AI who are not machine learning engineers. An LLM, on its own, is a set of trained weights plus a tokenizer and a decoding process. It takes text in and produces a probability distribution over what token comes next, nothing more. ChatGPT, Claude.ai, and Gemini's web app are chatbots: an interface wrapped around one or more underlying models, plus a system prompt, memory, safety filtering, and formatting rules the raw model does not have by itself.
That wrapping is why a raw API call and a chatbot app can answer the same question differently even when the underlying model is nominally identical. OpenAI's own developer documentation draws this line explicitly: the API hands you the model with minimal scaffolding, so you control the system prompt and behavior yourself, while the ChatGPT product ships its own defaults you do not control. For the fundamentals of how AI models are trained and run, the pillar guide covers the full picture.
How an LLM works: a prompt-to-output example
The mechanics are easier to see with a real sentence than with an abstract description. Take: "The cat sat on the mat."
Step 1: tokenization
Before the model does anything, your text gets cut into tokens, the chunks the model actually operates on. Per OpenAI's help center documentation on tokens, common English words typically become a single token each, while rarer or longer words split into pieces. Feed the sentence above through a typical tokenizer and you get roughly seven tokens: The, cat, sat, on, the, mat, and a final period. Understanding how tokens work also explains why LLM pricing and length limits are measured in tokens, not words or characters.
Step 2: next-token probability
Now suppose the model has already produced "The cat sat on the" and has to choose what comes next. It does not pick a word directly. It computes a probability across its entire vocabulary, tens of thousands of candidate tokens, for what is likely to follow. For a sentence like this, the distribution might look something like this (illustrative numbers, not output pulled from a specific model):
Candidate next token | Approximate probability |
|---|---|
mat | 58% |
floor | 12% |
rug | 9% |
chair | 4% |
windowsill | 3% |
everything else | 14% |
Step 3: sampling
A decoding rule then picks the actual token. At a setting of zero randomness, often called temperature 0, the model always takes the top-probability option, "mat", giving the same output every time. Most chat products run with some randomness, so the model sometimes lands on "floor" or "rug" instead, which is why asking the same question twice can come back phrased differently. Next-token prediction is exactly this loop repeated: compute a distribution, sample one token, append it to the sequence, and repeat until the model emits a stop signal or hits its length limit.
What "trained on text" actually means
An LLM's knowledge comes from its training data, a large snapshot of text collected up to some cutoff date, combined with whatever you put directly in your prompt. It has no live connection to the internet by default. Two practical consequences follow. First, its knowledge of recent events is frozen at that cutoff unless the product wrapped around it adds live search or other tools. Second, it can only "see" a limited amount of text at once, its context window, so very long documents or conversations eventually fall outside what it can consider when generating a reply. The pretrained model itself, before any chat-specific fine-tuning, is what most people mean by a foundation model.
LLM vs chatbot: a side-by-side comparison
Laid out directly, the practical differences are:
Aspect | Raw LLM (the model) | Chatbot product (ChatGPT, Claude.ai, etc.) |
|---|---|---|
What it actually is | trained weights, tokenizer, decoding process | a model plus interface, system prompt, memory, and safety rules |
Memory across sessions | none by default | often remembers earlier conversations |
Access to tools or live data | none unless you build it in | frequently wired to search, code execution, file upload |
Who sets the system prompt | you, if calling the API directly | the product's developers |
How you pay | per token, metered | flat subscription or free tier |
Products increasingly connect the underlying model to outside tools and data through standards like the Model Context Protocol, which is a separate layer from the model itself. It is part of the app, not the LLM.
Why this distinction matters if you're building with AI
If you are wiring an LLM into your own product, the distinction is not academic. You can usually swap one model for another, GPT for Claude, a smaller open model for a larger one, without users noticing much, because your app layer, the system prompt, retrieval pipeline, and guardrails, is doing a lot of the work a chatbot product does for you. It also means "the model improved" and "the app got smarter" are different claims that get conflated constantly in AI news. When a lab ships a new release, it helps to separate whether the underlying model is actually a meaningful upgrade from whatever product changes shipped alongside it.
Frequently asked questions
Is an LLM the same thing as ChatGPT?
No. ChatGPT is a chat product built around one or more LLMs from the GPT family, plus a system prompt, conversation memory, and safety rules. The LLM itself is just the underlying model doing next-token prediction. ChatGPT is one specific way of packaging it.
How does an LLM decide what to say next?
It converts the prompt into tokens, computes a probability for every possible next token given that context, samples one token according to those probabilities, appends it to the sequence, and repeats the process until it reaches a stopping point.
Can an LLM actually understand what it's writing?
Not in the way a person does. It has no beliefs, goals, or awareness. It has learned statistical patterns so thoroughly that its predictions often match what genuine understanding would produce, but there is no comprehension driving the process, only pattern completion.
What's the real difference between an LLM and a chatbot app?
The LLM is the prediction engine: weights, tokenizer, decoding. The chatbot app is everything built around it, interface, system prompt, memory, tool access, and moderation, that turns raw predictions into something usable.
Do LLMs learn from my conversations in real time?
No, not typically. A deployed LLM's weights are fixed after training, so it generates every reply using the model as it existed at the end of its last training run. Some products log conversations to inform a future training run, but that is a separate process from live learning during your chat.
How did this land?
About the author

Senior Editor, AI & Product
Cecilia leads the Swarmz editorial desk. She has spent a decade turning complex AI and product topics into writing people actually finish, and she owns the blog's quality bar.


