There are three common kinds of AI system: recognition, prediction and generation. A large language model is one example of generation: a model that, given some text, produces the text that comes next. Once trained, the model writes an answer one word at a time. To be exact, the model works with small pieces of text, and a piece is not always a word.
Any text given to the model is first cut into small pieces. Each piece is called a token. For example, for OpenAI's GPT-3, "I drink coffee from a cup" is cut into tokens, one for each word. Common words often stay whole. A long or less common word is often cut into several tokens. For example, in a sentence, GPT-3 cuts the word "photosynthesis" into two tokens: "photos" and "ynthesis". Cutting text into tokens is called tokenisation. The software that does it is called a tokeniser. It cuts the text before the model gets it.
The tokeniser keeps a list of all the tokens a model uses. That list is called the vocabulary. For example, OpenAI's GPT-3 has a vocabulary of more than fifty thousand tokens. Every token in the vocabulary has its own number. So the sentence "I drink coffee from a cup" becomes a row of six numbers, and the numbers are what the model is given.
For example, you type a question into ChatGPT. The tokeniser cuts the question into tokens, and turns each token into its number. The model writes its answer one token at a time, as numbers. The tokeniser turns each number back into its piece of text, and that is what you read.
For example, you read "strawberry" as a row of ten letters. In a sentence, GPT-3 keeps "strawberry" as one token, so it reaches the model as one number for the whole word. The letters inside each token are not given to the model one by one. In December 2024, researchers wrote that many large language models struggled to count how often a letter appears in a word. Their example was the letter "r" in "strawberry". In January 2026, other researchers wrote that this problem comes from the way text is cut into pieces. In August 2025, a different study found only a weak link between how a word is cut and whether the count is right.
For language models, the length of a text is often measured in tokens. So is the limit on how much text a model takes in. For example, OpenAI gives a rough guide: a hundred tokens are about seventy-five words.
The tokeniser cuts the text into small pieces called tokens, and that cutting is called tokenisation. The list of all the tokens a model uses is the vocabulary, and every token in it has its own number. When you type a question, it goes in as numbers, and the answer comes out one token at a time. The letters inside a token are not given to the model one by one. For language models, the length of a text is often measured in tokens. When a text is too long, ask how many tokens fit.