Token

AI & Retrieval
Token (LLM)
Also: tokens

Language models do not read whole words or whole documents at once. They break text into tokens, each roughly a few characters or a word-piece, and process them one at a time. A short sentence is a handful of tokens; a long document is thousands.

Tokens are also the meter. Model pricing and context limits are counted in tokens, so the length of a prompt and its answer is what a request actually costs. Writing a tight prompt instead of a rambling one is the difference between a cheap call and an expensive one.

Related terms