Course/How the Machines Think

9 min · +80 XP

Tokens, Context & Why It Forgets

The two mechanics that explain 90% of AI's behavior.

By the end of this lesson

You'll predict why the AI does weird things — and how to prevent them.

Two ideas — tokens and context — explain almost everything an AI does that confuses people. Learn these and you stop being surprised.

Tokens: the AI reads in puzzle pieces

The model doesn't see letters or even whole words. It sees 'tokens' — chunks of text, roughly ¾ of a word each. That's why it sometimes miscounts letters: it never saw the letters.

Context: the AI's working desk

Everything in the current conversation sits on a desk called the context window. It can only reason about what's on the desk right now. Start a brand-new chat and the desk is wiped. (“But ChatGPT remembers me!” — its Memory feature is a small notepad of saved facts it re-pastes onto the desk each time. The desk itself is still wiped. In Claude Code, your project folder and its files ARE the notepad — and a far bigger one.)

The lever almost nobody uses

Bigger desk = better work. When you give a capable model lots of relevant context at once — the whole file, the full goal, the examples — its output quality jumps. If you've been asking chat AIs one-line questions, you've been starving the desk your whole AI life. Most people do — and blame the AI.

Quick check

Why does an AI 'forget' what you told it in a different chat?

EAEvgeny Arsentyev

Author

Evgeny Arsentyev

PhD · Chief Product Officer at a healthtech company