George HuRULES & BEYONDBEGINNER 09 / 2026

AI AGENT / TOKENS & CONTEXT

AI works in tokens, not word count

Limits and API prices often say 8K, 128K or 1M tokens. They are neither fixed character counts nor only your last question.

01Separate token, input and output first

A token is a segment a model converts to an ID before computation; it is neither a character nor a word. Punctuation, spaces, code, numbers and language affect splitting. Input can include system rules, history, current question, attachment text and tool results. Output is generated content, while reasoning models may also use invisible or separately charged reasoning tokens. The context window is total capacity for input plus reserved output; maximum output is a distinct limit. Use the model tokenizer or API usage field for accurate counting.

02A 128K window cannot always output 128K

If a model has 128K total context and rules, history and material already occupy 110K, it cannot then generate another full 128K output. A product can impose attachment, conversation or output limits lower than the theoretical model maximum. More context is not always better: it costs more, takes longer and can drown key facts in noise. Retrieval, summary and context compression should send only what the current step needs.

03Generation is limited in four ways

Output depends on the model’s maximum output, product plan or API parameters, remaining context capacity, and time, cost and safety policy. Web message counts differ from API token billing. For long writing, outline first then generate and verify sections; for long files retrieve relevant fragments rather than loading a whole library. Inspect API usage and official pricing, local context configuration, memory and speed. Whenever you see 1M, 256K or 128K, check maximum output and the actual product limit too.

04Tokens are capacity, cost and speed

Cloud APIs often price input, cached input and output separately; output is often more expensive and long reasoning increases wait time. Local work has no per-token bill, but longer context uses more memory and slows generation. The useful optimization is not making every sentence shortest: remove repeated history, retrieve only relevant material, fix stable rules, make output format explicit and stop the loop when work is complete.

Return to the interaction lab and connect the concepts.

Open the interaction lab

READER COMMENTS

Leave the thought this article gave you.

0 / 300

No comments yet. You can leave the first one.