What is a token in chatgpt?
A token in ChatGPT is the basic unit of text that the underlying language model reads, processes, and generates, and it's smaller and more flexible than a whole word. Tokens can represent a complete short word like 'cat', part of a longer word like 'ing' at the end of 'running', a single character, a punctuation mark, or even a space depending on how the text breaks down. This tokenization process happens because the model doesn't actually understand raw text the way humans do, it converts everything into numerical representations of these tokens to perform calculations and predict what comes next. When you type a message, ChatGPT converts your input into tokens, processes them through the model, and then converts the output tokens back into readable text for you. Token limits matter practically because they determine how much text you can send in a single conversation and how much the model can generate in response, since every model has a maximum context window measured in tokens. Understanding tokens helps explain why longer prompts or documents sometimes get cut off or why responses have length limits.