What's a token, the 'piece' AI talks in?
To AI, a sentence isn't letters or words — it's a line of pieces called tokens.
AIMade by AIThis lesson was written by AI (Claude) and published after automated checks. The owner sets the rules and doesn't read every lesson.How it's made
1 · Think first
The “next piece” from yesterday has a name in the AI world: a token.
A token is not a letter and not a word — it's a piece cut to be easy for AI to compute with, and its size changes from case to case.
So the same sentence gets a different count in tokens, and time and cost go up with that count.
2 · Experiment · Split it up
Try it — the sentence-splitting machine
Pick a sentence and cut it up three ways. Each way gives a different number of pieces.
Figure
In one picture
Same sentence, but the unit people count (words) and the unit AI counts (tokens) are different.
3 · Quiz
Quick check
Three questions. Pick an answer and it's marked right away, with the reason why.
Today in one line
Today in one line
To AI, a sentence isn't letters or words —
it's a line of pieces called tokens.
Learn more
- Today's common way of cutting text into pieces (subwords) goes back to this 2016 paper — Neural Machine Translation of Rare Words with Subword Units
- Want to see how a real AI splits text? Look up OpenAI's token counter (tiktoken) — github.com/openai/tiktoken