Large Programs

Home / History of AI

History of AI

What Is a Token? How Chatbots Read Words

When you type a sentence to a chatbot, it does not see it the way you do. Before anything else happens, your words are cut into small pieces called tokens.

Pieces, not letters or words

A token can be a whole short word, part of a longer word, or even just punctuation. A common word like "cat" is usually one piece. A long or rare word may be split into several. Think of it like building words from LEGO bricks: common shapes come as one brick, unusual ones need a few.

Why not just use letters?

Letters are too small. The model would need many steps to read one sentence. Whole words are too many, since there are endless names, new words and spelling mistakes. Tokens are a middle size that works well for both.

Numbers, not text

Each token has a number. The model works with those numbers, not with letters. When it replies, it picks one token at a time and the pieces are joined back into words for you.

Why this matters to you

Try it

Write "unbelievable" and decide how you would cut it into two or three pieces. There is more than one good answer. Different chatbots cut words differently, and that is perfectly normal.