Token

The basic unit of text a language model processes — often a word piece or subword.

A token is the smallest chunk of text a language model reads and generates — a subword unit, not a full word, so “unbelievable” may split into three tokens while “cat” is one. Inference is billed in tokens, so Amazon Bedrock pricing is quoted per thousand input and output tokens and context windows are sized in tokens, not words. The key exam distinction is input tokens (the whole prompt, including instructions and history) versus output tokens (the response), often priced differently. As a rough rule, one token is about four characters, roughly three-quarters of a word.

PlayPrepHQ study notes are written and reviewed against primary exam sources. How we create & review content →

Related terms

Back to Fundamentals of Generative AI