Thursday, December 3, 2026 | London 11°C · Drizzle
DailyGlimpse

AI

AI Basics: What Are Tokens? A 60-Second Explanation

CodeCraft Academy 1 min read

In artificial intelligence, tokens are the fundamental units that AI models process. Think of them as pieces of text – words, subwords, or characters – that the model breaks down input into. For example, the sentence "AI is cool" might be tokenized as ["AI", " is", " cool"] or even smaller parts like ["A", "I", " ", "i", "s", " ", "c", "o", "o", "l"].

Tokens help AI understand and generate language efficiently. Every model has a token limit (e.g., 4,096 tokens for GPT-3), which sets the maximum length of text it can handle at once. When you ask a question or write a prompt, the AI counts tokens to ensure it stays within its context window.

Understanding tokens is key to optimizing prompts and avoiding errors. For instance, longer responses use more tokens, and exceeding the limit may cause the AI to ignore parts of your input.

In short: Tokens are the Lego blocks of AI language models – small pieces that build up to form coherent conversation.

React