How a chatbot actually works

Computer Science · Key Stage 3 · The School

Predicting the next word

A large language model is trained on huge amounts of text. It learns which word is likely to come next, given the words before it. When you ask it a question, it builds an answer one word at a time, each one chosen as a likely continuation of the words so far. It is playing an extremely well-informed guessing game, not looking anything up.

Why it can sound so confident

The model has learned the PATTERN of confident, well-written answers, because that pattern is common in its training text. So a wrong answer often reads exactly as smoothly and confidently as a correct one. There is no built-in warning label for "I am not sure" unless the model has specifically been trained to add one.

What a hallucination is

When a model states something false with total confidence, that is called a HALLUCINATION. It might invent a book that does not exist, a date that is wrong, or a quote nobody said. This is not the model "lying" on purpose. It is the natural result of predicting likely-sounding text rather than checking real facts.

Read two sentences from a chatbot. One states a real historical date correctly. The other invents a plausible-sounding but false one. Both are written in exactly the same confident, fluent style, because both were generated the same way: predicting likely next words. There is no difference in HOW they were produced, only in whether they happen to be true. That single fact is the reason a fluent, well-written AI answer must still be checked against a real source before it is trusted — style tells you nothing about accuracy. One sensible check: pick out the specific claim — a date, a name, a number — and look it up in an independent, reliable source, such as a textbook, a trusted website or by asking a teacher, rather than accepting the chatbot's own confident tone as proof.

The School — all subjects · Knowledge map