Agentic Research

Token

Also: 詞元 · tokens

The smallest unit of text a model handles. Not a character, and not a word.

When you will meet it

Both the context limit and the bill are counted in tokens. Estimating by words undercounts, and for Chinese it undercounts badly.

An analogy

Like LEGO bricks: the model does not handle the whole house, it handles bricks. The same house needs fewer large bricks than small ones.

Minimal example

"AI agents read files"
  → ["AI", " agents", " read", " files"]     4 個 token

"人工智能代理讀取檔案"
  → 通常 8~12 個 token(依 tokenizer 而異)

Note the leading space inside " agents" is part of the token. The same meaning usually costs more tokens in Chinese than in English.

What people get wrong

  • Assuming a token is a word. In English 1 token is roughly 0.75 words; a single Chinese character often costs one token or more.
  • Assuming only input is billed. Output usually costs more per token, and agents produce a lot of output.

Related terms

Next