Context Window
AI Fundamentals
A context window is the maximum amount of content, measured in tokens, that an AI model can consider at once, including its own response.
Tokens are the small chunks of text that a language model reads and writes: whole words, parts of words, or punctuation marks. Before a model processes your prompt, a tokenizer splits the text into tokens and turns each one into a number. Tokens are the unit used to measure input and output, so they set how much text fits in a request, how long a response can be, and, for most pay-as-you-go language model services, what usage costs.
Also called token, AI tokens, LLM tokens
A localization agency is quoting a job to translate a 40,000-word English software manual into Japanese and Spanish. It plans to use an AI model through an API (a direct software connection to the model) for first drafts, with human linguists editing every page.
Rather than pricing from word count alone, the project manager drafts a sample chapter in each language and checks it with the provider’s token-counting tool. The counts differ noticeably between Japanese and Spanish, so she estimates each language separately. She also counts the style guide and terminology list sent with every request, since those input tokens are billed each time. She splits the manual into sections small enough that each translated section stays within the model’s output limit. Her quote lists estimated tokens per language and prices human review separately.
Before a language model can read your prompt, a component called a tokenizer breaks the text into tokens drawn from a fixed vocabulary. Common words are often a single token. Longer or rarer words get split into pieces, so a word like “tokenization” might become “token” and “ization.” Punctuation marks, digits, and spaces count too, either as their own tokens or as part of one.
From then on, the model works with numeric token IDs rather than the letters you typed. Most language models generate their response one token at a time, predicting each next token from everything that came before it.
A widely published rule of thumb for English is that one token is about four characters, or roughly three-quarters of a word, so 100 tokens is around 75 words. Treat that as an estimate only. Different models use different tokenizers, so the same text can produce different counts depending on the model.
Tokens are the unit behind three practical things you will run into when you use AI at work: capacity, cost, and response length.
Even on flat-rate chat subscriptions, tokens sit underneath. Long conversations and large files use more of a model’s capacity and can run into usage limits sooner.
Token counts often surprise people because they don’t track neatly with word counts. Common reasons they go up:
Tokens and embeddings are related but not the same thing. A token is a unit of input, such as a piece of text, and its ID is simply a position in the model’s vocabulary with no meaning of its own. Inside the model, each token ID is converted into a list of numbers learned during training, sometimes called a token embedding. The embeddings used for search and retrieval are related but usually represent a whole sentence, passage, or document rather than a single token.
The word “token” also shows up elsewhere in tech with unrelated meanings. An API token or access token is a credential that lets software sign in to a service, and crypto tokens are digital assets. When people talk about tokens in the context of AI models, they mean the units a model reads and writes, as described on this page.
Go beyond the terminology. Explore practical AI training, workflows, and tools from SN3 Group.
Fill this out and we’ll reply with times within one business day.
Prefer the full page? Open the contact page