Today's artificial intelligence works mostly by learning patterns from a huge number of examples instead of following only hand written rules. First a model is trained on data; then that model gets something new, like a photo or a question, and answers with what it learned: a label, a number or, in a chat, text token by token.
📚Lots of text→🔍Patterns→💬New answer
Put it to the test
A question from the app. Pick an answer.
How does a generative text model produce an answer?
On its own it does not search: it generates text from what it learned. Some apps add search.
It writes the answer from patterns it learned from huge amounts of text.
It does not just pick from a list: it generates text, but may repeat phrases from its data.
Data: thousands or millions of examples, like labeled photos or texts. Training: the program adjusts internal numbers, its parameters, to make fewer and fewer mistakes on those examples; that is machine learning, and what comes out is a model, which is then tested on examples it never saw. Use, or inference: the trained model gets something new and answers. Training a large model is expensive; inference happens every time you ask something.
The best known models, like chat models or the ones that recognize images, are neural networks: layers of simple calculations with a huge number of parameters. With many layers it is called deep learning, and that math is sped up with GPUs, chips that do thousands of multiplications at once.
How it learns from examples
With supervised learning, each example comes with the right answer: this email is spam, this one is not. Without supervision, the examples come with no answers and the model looks for structure, like groups of similar cases. And with reinforcement, it tries, gets a reward or a penalty and adjusts; that is how some programs learn to play games.
Examples matter a lot. If the model memorizes the training ones and fails on new ones, that is overfitting. If the examples are skewed, the model can inherit it: that is one source of bias, along with how it is designed and used.
How an AI that chats works
ChatGPT, Claude or Gemini use an LLM. Your question is split into tokens; the model, a Transformer, looks at everything in its context window and works out probabilities for the tokens that could come next. It picks one, adds it and repeats. The temperature sets how much that choice varies, not how much the model knows.
The model does not copy the answer from a database: it generates it from what it learned and what is in its context. That is why it can write something it never read, and why it can make things up with total confidence. To use your own or current data, the app looks it up in documents, databases or the web and passes it along in the text, for example with RAG.
Three things people mix up
It does not understand like a person, and a confident answer does not guarantee a right one. In a chat like ChatGPT, talking does not change the model: what changes the answer is the context; other AI systems do update with new data while in use. And it is not one single thing: the spam filter, the map that estimates traffic and a chat share the idea, but they are different models, each for its own task.
Where to go next
If you are just starting, read what artificial intelligence is and then what an LLM and a token are. Each term comes with a question from Tokencito to practice, and in the app you learn the same by playing, five minutes a day.