AI
How large language models work, in plain language
AI assistants can write, explain and code, but how do they produce an answer? A jargon-free look at tokens, training and why they sometimes get things wrong.

Millions of people now use AI assistants every day, often without knowing what happens between typing a question and reading the answer. You do not need a technical background to understand the basics, and knowing them makes you a better and safer user.
Words become tokens
A large language model does not read text the way we do. It first splits the text into small pieces called tokens. A token can be a whole common word, part of a longer word, a number or a punctuation mark. The model works with these pieces as numbers.
The core idea: predict what comes next
At its heart, a language model is a very advanced next-piece predictor. Given the tokens so far, it calculates how likely each possible next token is, picks one, adds it to the text and repeats. It does this again and again, one token at a time, until the answer is complete. When the result reads like a thoughtful reply, it is because the prediction process has learned a great deal about how language and knowledge are structured.
How it learns
During training, the model reads an enormous amount of text and repeatedly tries to predict the next token. When it is wrong, its internal settings, called parameters, are adjusted slightly. After billions of such adjustments, the parameters hold a compressed, statistical picture of grammar, facts, reasoning patterns and styles. Modern models have billions or even trillions of these parameters.
A key invention behind this progress is the transformer design, introduced in 2017. Its attention mechanism lets the model weigh which earlier words matter most for understanding the current one, which is how it keeps track of meaning over long passages.
From raw model to helpful assistant
A model trained only to predict text is not yet a good assistant. A second stage, often called fine-tuning, teaches it to follow instructions and give useful, safe answers. A common method uses feedback from human reviewers who compare answers and indicate which they prefer, and the model is adjusted toward those preferences. That is why a modern assistant answers questions politely instead of just continuing your sentence.
What the context window is
The model can only consider a limited amount of text at once, called its context window. It includes your question, earlier parts of the conversation and any documents you provide. If a conversation grows too long, the oldest parts may fall out of view, and the model can seem to forget them.
Why it sometimes gets things wrong
Because the model predicts plausible text, it can produce statements that sound confident but are false. This is often called hallucination. It happens most with obscure facts, exact figures, citations and recent events. A few other limits are worth knowing:
- The model's knowledge stops at its training cutoff unless it is connected to search or other tools.
- It does not look facts up by default. It generates an answer from patterns.
- It can be sensitive to how you word a question.
Tools make a difference
Many assistants can now use tools: searching the web, running code, reading files or checking a calculator. When these are available, the assistant can base answers on fresh sources and exact calculations instead of memory alone. It is usually a good sign when an answer shows where its information came from.
How to use this knowledge
- Treat the answer as a draft that needs checking, especially for health, legal and money decisions.
- Ask for sources and open them.
- Provide the text or data you want it to work with instead of relying on its memory.
- Be specific, because clear instructions give better predictions.
Understanding that an AI assistant is a powerful pattern predictor, not an all-knowing mind, helps you rely on it where it is strong and double-check it where it is weak.