What happens to your message
Context, tokens, numbers with meaning, and attention.
You type a question and press Enter. Less than a second later, the first words of an answer appear. In between, your message goes through four steps. You do not need to remember the technical names, but knowing the steps explains a lot of everyday AI behaviour.
Step 1: everything is packed together
The model receives much more than your last message. The app adds its own instructions, your project instructions, memory notes, earlier messages in the chat, attached files and results from tools such as web search. All of this together is the context.
Step 2: text becomes tokens
Models do not read letters or whole words. They read tokens: small pieces of text from a fixed vocabulary. A short common word is often one token, a long or rare word is split into several pieces, and spaces and punctuation count too. In English, 100 tokens are roughly 75 words. Many other languages, including German and Portuguese, need more tokens for the same meaning.
Token counter
Type or paste any text. Each coloured piece is one token; a dot stands for a space. Simplified: real tokenizers use a learned vocabulary, so the exact split differs.
94 characters · 11 words · about 23 tokens
Step 3: tokens become numbers with meaning
Each token is turned into a long list of numbers, called an . You can picture it as a position on a giant map of meaning. Words with related meanings end up close together: “dog” near “cat”, “Lisbon” near “Porto”. During training the model learned where everything belongs on this map.
Step 4: attention connects the pieces
Now the model looks at all tokens at once and works out which ones matter for each other. This is called attention. In the sentence below, the word “it” only makes sense if the model links it to the right noun. Click the buttons and watch the focus move.
This happens again and again in many stacked layers, and each layer refines the picture: early layers handle grammar and word meaning, later ones handle ideas, tone and what the question is really asking. This design is called a Transformer. It was introduced in 2017 and is the “T” in ChatGPT.
What about pictures and files?
Images are cut into small patches, and each patch is turned into numbers, just like text tokens. A PDF is turned into text, and often also into images of its pages, so tables and charts can be read. After that, everything travels the same route through the model.
Check yourself
Tip: use ← and → to move between lessons.