You have used an AI chatbot. You have probably also wondered what on earth is happening behind the screen. The technology is genuinely impressive, but the central idea is far simpler than the hype around it. A large language model, or LLM, is a system trained to predict text. That is the entire foundation. Writing code, drafting emails, summarising a contract — all of it grows out of that one ability, applied at a scale that is genuinely hard to picture.
What follows is the whole thing in plain language. No maths required. By the end you should understand why these models can feel brilliant one moment and embarrassingly wrong the next.
The Whole Trick Is Guessing the Next Word
An LLM plays a guessing game, just an extraordinarily good one. Give it some text and it estimates what comes next. Type The capital of France is and the model — having seen that pattern thousands upon thousands of times in its training data — will almost certainly continue with Paris. It is not looking anything up. It is recognising a pattern and producing the most probable continuation.
Here is a detail that surprises people. Models do not deal in whole words. Text gets chopped into smaller pieces called tokens, and a token might be a short word, a chunk of a longer one, or a single comma. The model predicts one token, tacks it onto the running text, then predicts the next. Round and round it goes until the answer is done. That thoughtful-looking paragraph? It is hundreds of tiny predictions stitched together, one after another.
How a Model Picks Up Patterns in the First Place
None of that prediction works until the model has been trained. Training means showing the system staggering quantities of text and asking it, again and again, to guess the next token in passages where the right answer is already known. Every guess gets scored against reality. Then the model nudges its internal settings — its parameters — a fraction closer. Modern models carry billions of these parameters.
Do that across a vast body of writing and something genuinely strange emerges. The model slowly soaks up the statistical shape of language: grammar, common facts, tone, the architecture of an argument, even the timing of a joke. Nobody hand-codes those rules. They fall out of the sheer volume of examples. Which is exactly why the quality and range of the training material matters so much. A model can only echo patterns it was actually shown. Garbage in, garbage out — the old rule still holds.
Why It Can Feel Like the Thing Actually Gets You
The training text is full of explanations, conversations, and careful reasoning written by real people. So the model learns to imitate those shapes. When it hands you a tidy, step-by-step answer, it is reproducing the form of clear explanations it has seen — not consulting some private vault of knowledge. The distinction is subtle and it matters enormously. The fluency is real. The comprehension is closer to very advanced mimicry of how knowledgeable writing tends to sound.
Attention, or How Models Hold a Thought
Older language software had a miserable time remembering what was said a few sentences back. The breakthrough behind today’s models is a mechanism usually called attention. Put plainly: attention lets the model weigh which earlier words matter most as it picks the next one.
Take the sentence The trophy did not fit in the suitcase because it was too big. What does it point to? You know instantly it is the trophy, not the suitcase. The model has to make that same leap, connecting a word to the right antecedent across the sentence. Attention is the tool that makes those long-range links possible, letting distant words pull on one another while the whole prompt stays in view. The architecture built around this idea is the transformer, and it sits underneath essentially every major LLM in use today.
Confident, Fluent, and Sometimes Flatly Wrong
Once you see the model as a prediction engine rather than a fact lookup, the weird behaviour clicks into place. The thing is tuned to produce text that sounds plausible, not text that has been checked. Most of the time plausible and correct line up, because accurate statements are common in well-written prose. But when the model is unsure, it does not pause. It does not flag the doubt. It just generates the most likely-sounding answer, which can be pure invention. People call these confident fabrications hallucinations, and the name fits.
It also explains why the same question can give you slightly different answers on different days. Models usually inject a small dose of controlled randomness when choosing among likely tokens, which stops the output feeling robotic but also means it is not perfectly repeatable. The model has no sense of its own accuracy. It cannot tell you which parts it is sure about, because it does not hold beliefs the way you do. It holds probabilities.
What Actually Steers an Answer
Two forces shape any single response. The first is training, which hands the model its general abilities and is locked in the moment the model is built. The second is the context you supply right now — your prompt, the conversation so far, any documents or data you attach. Training is the engine. Context is the steering wheel. A clear, specific prompt with the right information attached will beat a vague one almost every time, and it is the part you actually control.
This is the whole idea behind handing a model source documents to work from, an approach often called retrieval. Rather than leaning only on patterns baked in during training, the model gets fresh, relevant text to ground its answer. It still predicts tokens exactly as before. It just has better raw material, which cuts the guesswork and sharpens accuracy on specific topics.
So What Do You Actually Do With This
You do not need the maths to use these tools well. You just need to remember what an LLM really is: a pattern-based text predictor, trained on a mountain of writing, that produces fluent and frequently useful output with no genuine grasp of truth. That one insight changes how you work with it. Lean on it hard for drafting, brainstorming, summarising, explaining, reformatting — anywhere fluency is the actual job. Get careful the moment facts, figures, citations, or safety are on the line, and check anything that matters against a reliable source. Treat it that way and an LLM becomes a genuinely powerful assistant. Treat it as an oracle you trust blindly and it will eventually burn you.
