What Is a Large Language Model (LLM)?

Last reviewed Jul 7, 2026AI Foundations · beginner

What you'll learn

  • Explain in plain terms what an LLM does: predict the next token
  • Understand why that simple idea produces fluent, flexible answers
  • See why 'predicts plausible text' explains hallucinations

A next-word predictor, scaled up

Strip away the hype and an LLM does one thing: given some text, it predicts the most likely next chunk of text (a token). Then it adds that token and predicts the next, and the next — producing sentences one piece at a time. That’s it. The astonishing part is that when you train this next-token game on a huge slice of human writing, the model has to absorb grammar, facts, reasoning patterns, styles, and code just to get good at predicting — and those capabilities fall out as a side effect.

This is why one model can summarise an email, write a poem, draft SQL, and explain photosynthesis: they’re all just “continue this text sensibly” under the hood.

Why it’s brilliant and why it makes things up

The same mechanism explains the failure mode. The model is optimised to produce text that looks like a good answer. Most of the time, plausible and correct line up. But when the model doesn’t “know” something, it doesn’t stop — it generates the most plausible-sounding continuation anyway, which can be a confidently stated falsehood. That’s a hallucination, and it’s not a bug you can fully switch off; it’s a direct consequence of how the model works.

What the base model doesn’t have

A plain LLM has no live internet, no memory of you, and a knowledge cutoff — it knows nothing after its training date. Features like web search, document upload, and memory are added around the model to patch these gaps. Knowing what’s core (prediction) versus bolted-on (search, memory) tells you exactly when to trust an answer and when to hand the model a source.

Next up: the unit the model actually reads and writes — tokens — and why they cap how much it can consider at once.

Try it yourself — Watch it predict
Prompt
Finish this sentence in five different ways, each with a different tone
(formal, casual, funny, poetic, technical):
"The best thing about learning AI is..."
Sample output
1. Formal: "...its capacity to augment human decision-making across domains."
2. Casual: "...you can build stuff that felt like sci-fi a year ago."
3. Funny: "...realising the robot also can't spell 'necessary' on the first try."
4. Poetic: "...watching thought take shape from a scattering of words."
5. Technical: "...the transfer of representations learned at scale to new tasks."

Sample output — AI responses may vary.

Common mistakes

  • Thinking an LLM 'looks things up' in a database. It doesn't — it generates text from learned patterns unless it's explicitly connected to search or your documents.
  • Treating confident phrasing as evidence of correctness. Fluency and accuracy are independent in an LLM.
  • Assuming it 'remembers' past chats by default. Most memory is either off or a bolted-on feature, not core to the model.

How to check the AI's answer

  • For any factual claim, ask the model for its source and check it — or use a tool with live web search and read the cited page.
  • Re-ask the same question in a new chat. If answers contradict each other, treat all of them as unverified.

Key terms

Large language model (LLM)A deep-learning model trained on vast text to predict the next token; the engine behind modern chatbots.
HallucinationWhen a model produces confident, fluent text that is factually wrong or invented.
Knowledge cutoffThe date after which a base model has no training data, so it doesn't know later events unless given tools.

Test yourself

3 questions · answers reveal after you check.

1. At its core, what does an LLM do?

An LLM is fundamentally a next-token predictor. Everything else (search, memory) is added around that core.

2. Why do LLMs 'hallucinate' (state false things confidently)?

The model generates text that fits the pattern of a good answer. Plausible and true usually coincide — but not always.

3. By default, a plain LLM answering a question is…

Unless connected to retrieval or web search, it generates from its trained parameters — which have a knowledge cutoff.