Explainer · AI Models · 5 min read
How does an AI chatbot actually work?
What happens between typing a question and getting an answer, in plain words.

The short version
When you type a question, the chatbot breaks your words into small pieces called tokens (often a word or part of a word). A large language model then predicts a likely next token, adds it, and repeats, very quickly, until the answer is finished. That simple loop, done at enormous scale, is what produces paragraphs that read as if a person wrote them.
How does it learn?
First the model is trained on a huge collection of text, such as books, websites and code. During training it plays a guessing game billions of times: hide the next word, guess it, and adjust its internal settings a tiny bit whenever it is wrong. Over time those settings capture grammar, facts, writing styles and some reasoning patterns.
Then companies fine-tune it to be a helpful assistant. People write and rate example answers, and the model is adjusted to prefer the helpful, honest and safe ones. That's why a chatbot answers in a friendly back-and-forth style instead of just continuing your text.
Does it 'know' things?
Sort of. The model doesn't look facts up in a database by default. It produces what is likely based on patterns it learned. That's why it can explain a topic well, and also why it sometimes makes things up with total confidence. People call these mistakes hallucinations.
Many chatbots can now also search the web, read files you upload, or run small pieces of code. When they do, they can quote sources, which makes their answers easier to check.
Why do different chatbots feel different?
Companies train their models on different data, size them differently and tune them toward different strengths, such as coding, writing, long documents or speed and low cost. That is why our AI Playbook matches each job to a model instead of naming one winner.
How to use one well
Be specific about what you want and who it is for. Give it the material to work from, like the document or the numbers. Ask it to show its sources or its steps. And for anything that matters, like health, money or legal questions, treat its answer as a first draft to verify, not the final word.
New words? See the robot + AI glossary.



