Ask a modern AI assistant a question and it replies in fluent, confident paragraphs. It feels like talking to something that knows. Under the surface, the core mechanism is almost embarrassingly simple, and understanding it explains both why these tools are so useful and why they sometimes make things up.
One job: predict what comes next
A language model is trained on an enormous amount of text to do one thing: given the words so far, estimate how likely each possible next piece of text is. Take the start of a sentence, "The cat sat on the". A trained model gives a high probability to "mat", a lower one to "floor" or "sofa", and a tiny one to "moon".
The pieces it works with are called tokens. A token is often a whole common word, but rarer words are split into chunks, so a long word may be several tokens. The model does not read letters the way you do. It reads tokens, and it outputs a probability for each token in its vocabulary.
A sentence is built one token at a time
To write a sentence, the system picks a token from that probability list, adds it to the text, and then asks the same question again with the longer text. It repeats that loop until the answer is complete. A setting often called temperature controls how adventurous the pick is. Low temperature nearly always chooses the most likely token, which gives steady, predictable text. Higher temperature allows less likely choices, which gives more variety and more risk.
That is why you can ask the same question twice and get two different answers. Nothing is being looked up. The text is being sampled.
Where the intelligence comes from
If the job is only "predict the next token", why can the results write code or explain a physics problem? Because to predict text well across billions of examples, a model has to absorb a great deal about grammar, facts, reasoning patterns and how arguments are structured. The key technical step was an architecture called the transformer, introduced in 2017, which lets the model weigh every earlier token when deciding what comes next.1 Scaling that approach up produced systems that could pick up new tasks from just a few examples in the prompt.2
Today's assistants add further training on top. People rate answers, and the model is tuned to follow instructions and to be helpful and safe. Many can also call outside tools, such as a search or a calculator. But the engine underneath is still next-token prediction.
Why they make things up
This explains the best-known weakness. The model produces text that is plausible, which is not always the same as text that is true. If it has seen few examples of the topic, it may still continue with something that sounds right: a plausible citation, a believable statistic, a confident date. Researchers call these errors hallucinations, and they are an active problem.3 The model has no built-in alarm that rings when it is guessing.
What this means for how you use it
- Give it context. A vague prompt leaves a wide spread of likely continuations. A precise one narrows it.
- Verify anything that matters. Names, numbers, dates, quotations and references need checking against a real source.
- Ask for reasoning in steps on problems with several parts, and check the steps.
- Treat it as a fast, well-read collaborator, not as an authority. It is excellent at drafting, summarizing, explaining and brainstorming, and weaker where exact facts matter.
- Protect private information. Do not paste in anything you would not want stored or seen by others.
In the course. These ideas, how to ask well, how to check the answers and how to use AI honestly, are the first part of the Neurovia One AI Course. See the course.
References
- Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need. Advances in Neural Information Processing Systems 30 (NeurIPS 2017). Find it ↗
- Brown TB, Mann B, Ryder N, et al. Language models are few-shot learners. Advances in Neural Information Processing Systems 33 (NeurIPS 2020). Find it ↗
- Ji Z, Lee N, Frieske R, et al. Survey of hallucination in natural language generation. ACM Comput Surv. 2023;55(12):1–38. Find it ↗
