Tokens and the Context Window: The Root Concepts of Billing and Limits

AI Navigate Original / 4/27/2026

💬 OpinionDeveloper Stack & InfrastructureTools & Practical Usage
共有:

Key Points

  • Tokens are LLM compute and billing units, finer than words
  • Japanese uses 1.5-2x English tokens; mind cost estimation
  • Context window has Lost-in-the-Middle; put key info head/tail or RAG
  • Cut cost via short prompts, prompt caching, RAG; cumulative cost balloons

What Is a Token

An LLM processes text not in "words" but in units called "tokens." Tokens are often finer than words; frequent words are 1 token, rare words/symbols split into multiple tokens.

Example (GPT-4-line tokenizer)

  • "hello" → 1 token
  • "electricity" → 1 token
  • "prestidigitation" → 4 tokens ("pre", "stid", "ig", "itation")
  • "こんにちは" → 3-4 tokens (Japanese is close to character-unit)
  • "AI" → 1 token

Token-Count Guide

LanguagePer token
English~0.75 words, 4 chars
Japanese~0.5-1 char
Chinese~0.5-1 char
Code~3-5 chars

For text of the same meaning, Japanese consumes 1.5-2x the tokens of English. Mind this in cost estimation.

Context Window

Sign up to read the full article

Create a free account to access the full content of our original articles.