What is an LLM in AI?

Updated 2026-07-154,480 searches/mo across 2 ways of asking itRanked #58 of 519· prompt engineering and LLM
Short answer

An LLM is a large language model — a program trained on enormous amounts of text to predict the next token in a sequence. ChatGPT, Gemini, and Claude are LLMs. It does one thing repeatedly: given the text so far, pick the most probable next chunk, append it, repeat. Everything else emerges from that.

Why — the first-principles explanation

An LLM does something startlingly simple, and the surprise is what that simple thing turns out to be capable of.

First it breaks text into tokens — words, word-fragments, or characters. Then it learns, across a staggering volume of text, which tokens tend to follow which. It stores those relationships as embeddings: long lists of numbers where tokens used in similar contexts end up with similar numbers. That's the training. When you use it, the model looks at your tokens, calculates a probability for every token in its vocabulary, picks one, appends it to the sequence, and feeds the whole thing back in to pick the next. Output is built one token at a time, and each new token becomes part of the input for the next. That loop is the entire machine.

The word doing the heavy lifting is large. Small next-word predictors have existed for decades and were toys — your phone's keyboard is one. What changed is scale: more parameters, more text, more compute. Somewhere along that curve, systems that were only ever trained to predict text started doing arithmetic, writing working code, and translating languages nobody explicitly taught them. Nothing was added. The capabilities fell out of prediction, because predicting text well enough eventually requires modeling the things the text is about. To guess the last word of "the detective realized the killer had to be..." you need something functionally like understanding the plot.

This mechanism explains the strengths and the failures with the same breath. LLMs are fluent because fluency is literally the objective. They're broadly capable because text covers everything. And they hallucinate — state confident falsehoods — because nothing in "predict the probable next token" distinguishes true from plausible. A convincing wrong answer and a right answer can look equally probable. Researchers at OpenAI argued in 2025 that this gets reinforced by how models are graded: benchmarks penalize "I don't know," so guessing scores better than admitting uncertainty, exactly like a student on a multiple-choice exam. One more constraint worth knowing: an LLM has a context window, a hard cap on how many tokens it can hold at once, covering input and output together. It isn't a mind that remembers you. It's a function that sees a fixed-size block of text and returns the next token.

An example that makes it click

Your phone's keyboard suggests the next word as you type. Tap it over and over and you get mush — "I am going to be a good time to get the same thing." That's a tiny language model. Same idea, same loop.

Now imagine that predictor read most of the internet, kept billions of adjustable knobs instead of a few thousand, and considered thousands of previous words instead of three. It stops producing mush and starts producing essays, working Python, and passable legal analysis. Nobody taught it law. It's still just guessing the next chunk — but to guess well across everything humans wrote, it had to build something that behaves a lot like knowing things. And it still guesses when it doesn't know, which is why it sometimes hands you a beautifully worded fact that is simply invented.

Key facts

Infographic: What is an LLM in AI — short answer and key facts
Visual summary — What is an LLM in AI?
▶ The 60-second explainer (script)

An LLM is a large language model — ChatGPT, Gemini, Claude. And it does one thing. It predicts the next chunk of text. Here's the actual mechanism. First, your text gets chopped into tokens — words or pieces of words. The model has learned, from an enormous amount of text, which tokens tend to follow which. It scores every token in its vocabulary, picks the most probable one, sticks it on the end, and feeds the whole thing back in to pick the next one. One token at a time. That loop is the entire machine. So why is it impressive? The word large. Your phone's keyboard does the same thing and produces gibberish. Scale it up — billions of parameters, most of the internet as training text — and something strange happens. It starts doing math. Writing code. Translating. Nobody added those. They fell out of prediction, because to predict text well enough, you eventually have to model what the text is about. Guess the end of the sentence 'the detective realized the killer had to be' and you need to understand the plot. But the same mechanism explains the failures. Nothing in 'predict the probable next token' separates true from plausible. A convincing lie and a fact look equally likely. OpenAI researchers argued in 2025 that grading makes it worse — benchmarks punish 'I don't know,' so guessing wins. It's a student bluffing on an exam. Fluent, confident, sometimes wrong.

What authoritative sources say

Microsoft Learn — Understanding tokensofficial — LLMs tokenize text, store relationships between tokens as embeddings, generate output iteratively one token at a time by appending each predicted token to the input, and are bounded by a maximum context window covering input and output together. GPT models use Byte-Pair Encoding subword tokenization. source ↗
Kalai, Nachum, Vempala & Zhang, "Why Language Models Hallucinate" (arXiv:2509.04664), September 2025edu — Language models hallucinate because training and evaluation reward guessing over acknowledging uncertainty; hallucinations originate as errors in binary classification and persist because benchmarks penalize abstention. source ↗
Lewis et al., "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks," NeurIPS 2020 (arXiv:2005.11401)edu — Language models store factual knowledge in their parameters but their ability to access and precisely manipulate that knowledge is limited, and updating their world knowledge remains an open research problem. source ↗

People also ask

Does an LLM understand what it's saying?

Genuinely contested, and beware anyone certain either way. It provably builds internal representations that track real-world structure — but it was optimized for plausible text, not truth, which is why it can be fluent and wrong at once.

Does it learn from my conversations?

Not during the conversation. The weights are frozen at training time. It appears to remember because your earlier messages are re-fed as input each turn — once they fall outside the context window, they're gone.

How large is large?

Modern frontier models run to hundreds of billions of parameters trained on trillions of tokens. There's no official threshold where a language model becomes 'large' — it's a description, not a category.

Are ChatGPT and an LLM the same thing?

No. The LLM is the model; ChatGPT is a product wrapped around one, adding a chat interface, search, memory features, and safety layers. Same distinction as an engine versus a car.

Why does it make things up?

Because predicting probable text doesn't distinguish true from plausible. It has no separate fact-check step — and evaluation practices that punish 'I don't know' actively train it to guess rather than abstain.

The same question, asked other ways

This page answers all of these. Their searches are counted together in the ranking — one question, 2 phrasings. How we rank →

Related questions