L004 · How AI thinks · 1 min · Interactive
Tokens: how AI reads
AI does not read words; it reads tokens, small chunks of text that are often parts of words.
01 · The idea
Before a model can read your message, the text is cut into tokens. A common English word like "the" is one token. A long or rare word, like "unbelievable", may be split into two or three.
Languages are not treated equally. The same sentence in Vietnamese, Hindi or Amharic often uses more tokens than in English, because the model saw less of those languages in training.
Tokens matter for three reasons. Paid AI services charge per token. Every model has a limit on how many tokens it can handle at once. And odd token splits explain strange mistakes, like miscounting the letters in a word.
Try it below: type a sentence and watch it split into tokens. Try your own language too.
02 · Think of it like this
Think of Lego. The model does not see a finished house; it sees the bricks. Common words are one big brick, rare words are built from several small ones.
03 · Try the toy
See text the way an AI does
Type anything, or tap a sample. Each coloured chip is one token, the unit an AI reads and is billed by.
- Characters
- 86
- Tokens
- 22
- ≈ Words
- 13
That's about 1.7 tokens per word. Plain English usually lands near 1.3; accents, other alphabets, emoji and code cost more, so the same message can fill an AI's memory (and your bill) faster.
Approximate: real tokenizers differ from model to model.
04 · Do it now
05 · Quick check
Words in this lesson
See also
L006How AI thinks · 2 min
The context window: AI's short-term memory
A chatbot can only see a limited amount of text at once, and in a very long chat the oldest parts can slip away.
L032How AI thinks · 2 min
Why AI forgets in long chats
Long chats slowly get worse because the model has to juggle more and more text, and older details get crowded out.
L012Asking well · 2 min
Temperature: safe or creative
Temperature is the setting that decides whether AI picks the most likely next word or takes a risk.
L082Asking well · 2 min
Prompt in Vietnamese or English?
Write in the language you think in, and ask for the answer in the language you need.