Ask a modern chatbot who won a war, how to fix a leaking tap, or why the sky is blue, and it answers in seconds, in full sentences, in your language, at your reading level. It feels like consulting someone who knows an impossible amount. So how does it actually know the answers? The honest explanation is stranger and more interesting than the feeling: the chatbot does not look answers up, and it does not store them the way a database or an encyclopedia does. It generates them — word by word, from patterns it absorbed while reading more text than any human could read in a thousand lifetimes. Everything impressive and everything unreliable about these systems flows from that single fact, so this guide takes it apart slowly: the training, the predicting, and the reasons the answers are so often right and sometimes confidently, fluently wrong.
The one-sentence version
A chatbot is a prediction machine for language: given everything written so far in a conversation, it calculates what text most plausibly comes next — then produces it, piece by piece, recalculating after every piece. That is genuinely all it does at the moment of answering. The miracle is not in the answering step; it is in what the machine had to become, during its training, to predict text that well. To predict what a doctor would write next in a diagnosis discussion, or what a plumber would say about a leaking tap, the system has to internalize a working model of medicine, plumbing, and the world those words describe. Knowledge, in a chatbot, is a side effect of learning to predict language about the world. IBM’s explainer on how chatbots work covers the product side of this; the deeper mechanics belong to the technology underneath, the large language model.
Training: reading at a scale that has no human comparison
Before a chatbot ever meets you, it goes through training: it is shown enormous quantities of text — books, articles, websites, manuals, forums, code — and set one repetitive task: hide a word (technically, a piece of a word, called a token) and guess it from the words before it. Guess wrong, adjust. Guess right, adjust less. Trillions of times. The adjustments are stored as billions of numerical settings, called parameters or weights, inside a network of simple mathematical units. IBM’s explainer on large language models describes this architecture in accessible detail. Two things about training matter for everything that follows. First, the text is not kept as a library — the model cannot open the book it learned from; what survives is the pattern, compressed into those weights, the way your memory of a subject survives without your keeping the textbook. Second, the model learns the world as described in text: brilliantly complete on things humans write about constantly, thin on things they rarely write down, and stamped with a cutoff — training ends on a date, and events after it are simply absent unless the product bolts on a live search tool.
The second education: learning to behave like an assistant
A model fresh from that reading phase is not yet a chatbot — it is a text continuer, as likely to follow your question with three more questions (because question-and-answer forums look like that) as with an answer. Turning it into the assistant you meet takes a second phase of training. Human reviewers are shown the model’s responses and rank them: this one was helpful, this one was evasive, this one was unsafe nonsense. Those rankings train the system toward answers that are useful, honest in tone, and bounded — which is why the chatbot politely declines some requests and formats its answers with the helpful structure you recognize. It also explains some quirks: the model is performing “good assistant” as a learned style layered over the prediction engine, and under pressure — a leading question, a request to role-play, a long and winding conversation — the older continuer can show through the costume. The polish is real, and it is a polish, not a personality.
Answering: prediction, one piece at a time
When you ask a question, your words plus the conversation so far become the input, and the model predicts the next token, chooses one (with a touch of controlled randomness, so answers are not identical every time), appends it, and predicts again — hundreds of times per answer. This is why answers stream onto the screen piece by piece: you are watching the generation, not a download. It is also why asking the same question twice gives two different answers, why the model can be led astray by a misleading question (it is continuing your text as much as answering it), and why a long answer can drift — each step is locally plausible, and local plausibility is the only compass the process has. Compare that with the software you grew up with, which follows explicit instructions a programmer wrote: the distinction is exactly the subject of our companion piece on AI vs. regular computer programs and the real difference between the two.
Why the answers are so often right
If it is “just predicting,” why does it feel like expertise? Because human knowledge lives in language. Nearly everything humanity knows has been written down, and written down repeatedly, in explanations, arguments, manuals, questions and answers. A system trained to predict that ocean of text absorbs the relationships inside it: that Paris pairs with France, that a fever pairs with infection, that a tap leak pairs with a washer. It also absorbs the shapes of reasoning — how a proof proceeds, how a diagnosis is narrowed, how a good essay is built — and can run those shapes on new material. That is why it can answer questions it has never seen: it is not retrieving a stored answer but reconstructing one from patterns, the way you might answer a question about a town you have never visited using everything you know about towns. When the pattern base is deep, the reconstruction is accurate, fluent and genuinely useful. It deserves neither the mysticism (“it understands everything”) nor the dismissal (“it knows nothing”) — it is a third thing, and the next section is its price.
Why it is sometimes confidently wrong
The same mechanism explains the failures. The model’s job is to produce the most plausible continuation, and plausibility is not truth: a wrong date, an invented book title, a fictional court case can all be perfectly plausible text. There is no separate fact-checking module standing behind the generator — nothing in the process corresponds to “looking it up,” hesitating, or knowing that it doesn’t know. So it fills gaps the way it fills everything, fluently, and the fluency is exactly what makes the errors dangerous to a casual reader. The failure rate is not uniform: popular, well-documented topics are answered from deep patterns and are reliable; obscure, local, recent or very specific facts — the opening hours of a particular shop, the clause in a particular contract, the biography of a person with no public footprint — are reconstructed from thin patterns and should be verified every time. Treat the chatbot as a brilliant colleague with no conscience about guessing, and you have the calibration right.
What it cannot do at all (and what gets bolted on)
Strip a chatbot to the model alone and it cannot browse the web, remember yesterday’s separate conversation, do arithmetic reliably (it predicts digits rather than calculating them, though products increasingly hand math to a calculator tool), or know anything past its training cutoff. Modern products wrap the model in tools — live search, code execution, memory features, document access — and each addition is a separate system handing the model better material to predict from. This is also why two chatbots built on similar models can feel so different: the wrapper, the instructions it is given about its role, and the tools it may call are product choices, while the engine underneath remains what it was trained to be.
Does it understand? The honest place to land
Philosophers and engineers argue this one happily, and a practical reader can sidestep the trophy question. The model plainly does not know anything the way you know your own street — it has no experience, no senses, no stake in being right. Equally plainly, “mere prediction” undersells a system whose predictions encode enough of the world’s structure to draft a contract, debug code and explain quantum physics to a child at three reading levels. For everyday use, the working model is simpler: it knows answers the way a map knows a coastline — a compressed representation, astonishingly useful for navigation, not the territory itself, and occasionally wrong at the edges. Ask it freely. Verify what matters. And when it answers with total confidence about something small, local and checkable, remember what it is: a machine that would rather be plausible than silent — which is precisely why it so often sounds like it knows.