Tokens と Context Windows

暫定日本語訳:何 tokens と context windows are, なぜ LLMs have them, と なぜ context-window limit is mechanical 理由 AI 検索 chunks と retrieves あなた コンテンツ instead of reading whole ページ.

初回公開:2026年7月3日 · 最終更新:2026年8月4日 · Advanced
言語

暫定日本語訳:token is smallest unit of text LLM processes — roughly 4 characters, または について ¾ of English word (100 tokens ≈ 60–80 words per Google). Tokenization splits text (と 画像, audio, video) へ これらの units. context window is maximum number of tokens model できる hold at once — input plus output combined — like short-term memory; Google's Gemini できる accept up へ 1 million tokens. コンテンツ outside window is invisible, ない gradually forgotten. この matters 向けに AI 検索 because no full ページ または サイト fits in one window, so retrieval systems select と chunk あなた コンテンツ 前に LLM ever sees it — which is mechanical 理由 chunking, passage-level retrieval, と '保つ it clear と self-contained' advice exist. bigger context window does ない mean AI reads あなた whole サイト, と Google says there's no ideal ページ length と no requirement へ fragment コンテンツ 向けに AI.

暫定日本語案: TL;DR — token is unit LLM processes — sub-word fragment, ~4 暫定日本語案: characters, とともに 100 tokens ≈ 60–80 English words (Google). Tokenization splits 暫定日本語案: all input と output — text, 画像, audio, video — へ tokens; model’s known 暫定日本語案: 設定 is its vocabulary. context window is total token budget shared by input 暫定日本語案: (system prompt + history + retrieved docs + あなた クエリ) と output ( レスポンス) — 暫定日本語案: Google’s analogy is short-term memory. コンテンツ outside window is invisible, ない 暫定日本語案: gradually forgotten. Windows scaled から ~2K tokens へ 1M+ (Gemini), とともに 暫定日本語案: hardware ceiling (“thermal limit” of TPUs). 理由 この matters 向けに 検索: 暫定日本語案: systems manage cost と relevance by selecting と chunking 前に LLM sees あなた 暫定日本語案: コンテンツ — と “Lost in the Middle” means even 何 is in 暫定日本語案: window isn’t 使用 evenly. bigger window does ない mean AI reads あなた whole サイト.

何 token actually is

暫定日本語案: Tokenization maps text へ integer token IDs using model-compatible encoding; token boundaries are ない 同じ as word boundaries. Evidence for this claim OpenAI models process text as tokens, and token boundaries may be whole words or parts of words. Scope: OpenAI tokenization; token counts depend on the model-compatible encoding. Confidence: high · Verified: OpenAI: What are tokens? Context-window sizes are 商品 と model metadata, ない permanent プロパティ of all 言語 models. Evidence for this claim Context-window limits are documented per model and can differ across model versions. Scope: OpenAI model metadata; published limits are product-specific and can change. Confidence: high · Verified: OpenAI: Models

暫定日本語案: Google is blunt について granularity: “Gemini and other generative AI models process input and output at a granularity called a token.” token is ない word と 暫定日本語案: ない character — it’s fragment. As Google’s docs put it, “Long words are broken up into several tokens. The set of all tokens used by the model is called the vocabulary, and the process of splitting text into tokens is called tokenization.”

暫定日本語案: citable rule of thumb, straight から Google: “For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60-80 English words.” 暫定日本語案: So roughly ¾ of word per token, on average — ただし average is doing 機能 there. 暫定日本語案: Punctuation, non-English text, code, と unusual または long words tokenize less 暫定日本語案: efficiently (more tokens per word), which is exactly なぜ counting words is poor way 暫定日本語案: へ estimate token usage.

暫定日本語案: Tokens また aren’t just text. Google: “All input to and output from the Gemini API is tokenized, including text, image files, and other non-text modalities.” 画像, 暫定日本語案: audio, と video frames all become tokens too. Google DeepMind’s engineers describe 暫定日本語案: context-window 測定 as “how many tokens — the smallest building blocks, like part of a word, image or video — that the model can process at once.”

何 context window is

暫定日本語案: context window is maximum number of tokens model できる hold と 理由 超えて 暫定日本語案: in single interaction. Google’s framing is deliberately simple: “An analogy for the context window is short term memory.”

暫定日本語案: key mechanical point is その it’s one shared budget. Everything competes 向けに 暫定日本語案: 同じ space:

  • 暫定日本語案: system prompt ( instructions application gives model),
  • 暫定日本語案: conversation history so far,
  • 暫定日本語案: any retrieved または injected documents ( passages 検索/RAG system pulled in),
  • 暫定日本語案: あなた input ( 現在の クエリ), と
  • 暫定日本語案: model’s own output ( answer it generates).

暫定日本語案: Google’s Gemini docs describe input と output drawing から one shared pool. その 暫定日本語案: exact accounting isn’t universal, though: other providers publish separate maximum- 暫定日本語案: output figure alongside context window rather than treating it as one undivided 暫定日本語案: budget — Anthropic’s model docs, 向けに instance, list “context window” size と 暫定日本語案: distinct “max output” cap side by side 向けに 各 Claude model. Evidence for this claim Context-window limits are documented per model and can differ across model versions. Scope: OpenAI model metadata; published limits are product-specific and can change. Confidence: high · Verified: OpenAI: Models 暫定日本語案: 確認 ドキュメント 向けに specific model と 商品 あなた’re actually using rather 暫定日本語案: than assuming one formula applies everywhere.

暫定日本語案: Whatever exact accounting, once コンテンツ falls outside usable window, it isn’t 暫定日本語案: gradually forgotten — it’s simply invisible, as if it 決して existed, unless system 暫定日本語案: explicitly summarizes it と re-injects shorter version, または 商品 instead 暫定日本語案: rejects, truncates, または compacts リクエスト 前に model ever sees it. その “it’s gone, not fading” behavior is part その trips 人々 up いつ それら assume AI 暫定日本語案: “remembers” long conversation way person する.

The context window is a shared request budget. Retrieval decides which source passages are worth spending part of it on. 出典: Google AI for Developers

A page or corpus contains many possible passages. Retrieval selects the passages most relevant to the current question. Those passages then share a model-specific context budget with system instructions, conversation history, the current query, and an output allowance. A larger window increases capacity, but it does not mean a search system routinely sends a whole page or site to the model.

© Patrick Stox LLC · CC BY 4.0 ·

どのように big context windows are — と どのように fast その changed

暫定日本語案: scale-up here has been dramatic. Early generative models handled だけ couple 暫定日本語案: thousand tokens; progression ran 通じて roughly 8K, then 32K, then 128K, 前に 暫定日本語案: jump Google flags in its docs: “Gemini is the first model capable of accepting 1 million tokens.”

暫定日本語案: There’s physical ceiling, though. Google DeepMind pushed へ experimental 10-million- 暫定日本語案: token windows, と research scientist Nikolay Savinov — one of research leads 暫定日本語案: on long-context project, who originally targeted 128 000 tokens 前に landing on 暫定日本語案: 1 million — put limit plainly: “10 million tokens at once is already close to the thermal limit of our Tensor Processing Units.” Bigger context isn’t 無料 — it costs 暫定日本語案: memory, compute, と literally heat. (Google DeepMind’s Denis Teplyashin has described 暫定日本語案: 同じ cascade から 128K へ 512K へ 1M へ 10M, 各 手順 opening 新しい possibilities ただし 暫定日本語案: running へ harder engineering limits; research scientist Machel Reid has described 暫定日本語案: 何 teams actually do とともに その space, like feeding entire codebase または 45-minute 暫定日本語案: film へ single prompt.)

暫定日本語案: Two consequences worth internalizing:

  1. 暫定日本語案: ** numbers あなた see are moving targets.** “The largest context window” is 暫定日本語案: figure その 保持 changing; don’t hard-code strategy へ specific token count.
  2. 暫定日本語案: Bigger ≠ 自動 better. More capacity is ない more comprehension — see 暫定日本語案: “Lost in the Middle” below.

何 million tokens actually looks like

暫定日本語案: Abstract token counts are hard へ feel, so Google オファー concrete sizing 向けに 何 1M 暫定日本語案: tokens できる hold:

  • 暫定日本語案: “50\u00a0000 lines of code (with the standard 80 characters per line),”
  • 暫定日本語案: “All the text messages you have sent in the last 5 years,”
  • 暫定日本語案: “8 average length English novels,”
  • 暫定日本語案: “Transcripts of over 200 average length podcast episodes.”

暫定日本語案: その’s genuinely enormous — と it’s exactly なぜ “so the AI just reads my whole site” assumption feels reasonable と is still 誤った. Which brings us へ 検索 暫定日本語案: angle.

なぜ tokens と context windows matter 向けに AI 検索

暫定日本語案: この is core of it 向けに anyone doing SEO または コンテンツ. No full ページ — と certainly 暫定日本語案: no full サイト — is reliably handed へ model whole in 検索 scenario. Even いつ 暫定日本語案: ページ fits technically, feeding all of it 可能性がある be uneconomical または irrelevant へ 暫定日本語案: クエリ. その is なぜ retrieval systems — AI Overviews, Copilot, RAG 暫定日本語案: pipelines, chatbots とともに browsing — select, chunk, と pass だけ some of 暫定日本語案: ページ’s コンテンツ へ model. (No 検索 vendor publishes exactly 何 it retrieves 暫定日本語案: per クエリ, so この is inference から どのように retrieval architectures 機能 generally と 暫定日本語案: から public statements like ones below — ない claim その すべての AI 検索 商品 暫定日本語案: behaves identically.)

暫定日本語案: token/context-window limit is mechanical 理由 behind whole stack of AI- 暫定日本語案: 検索 behavior あなた already know について on この サイト:

  • 暫定日本語案: It’s なぜ chunking exists — コンテンツ gets split へ retrievable passages because 暫定日本語案: whole thing won’t fit, と Microsoft’s own Azure guidance says partitioning large 暫定日本語案: documents へ smaller chunks “can help you stay under the maximum token input limits of chat completion and embedding models.”
  • 暫定日本語案: It’s なぜ retrieval ( “R” in RAG) has へ pick handful of passages 前に 暫定日本語案: generation — model できる だけ be handed 何 fits in its budget.
  • 暫定日本語案: It’s なぜ embedding models have their own token caps (many top out around few 暫定日本語案: thousand tokens per input), so long passages have へ be split 前に それら’re even 暫定日本語案: turned へ vectors.

暫定日本語案: industry’s own framing of 問題 is explicit. llms.txt spec opens とともに: 暫定日本語案: “Large language models increasingly rely on website information, but face a critical limitation: context windows are too small to handle most websites in their entirety.” 暫定日本語案: その’s whole motivation 向けに format — even if, as I’ll cover in myths 暫定日本語案: section, Google’s John Mueller has called llms.txt at best token-saving “crutch” 向けに 暫定日本語案: coding ツール, ない 検索-visibility mechanism.

”Lost in the Middle” — even 何’s in window isn’t 使用 evenly

暫定日本語案: Here’s subtler point. Getting あなた コンテンツ window isn’t finish line. 暫定日本語案: Stanford “Lost in the Middle” study (Liu et al., 2023) found その on 言語 暫定日本語案: models と tasks それら テスト, models 使用 information at start と end of their 暫定日本語案: context far better than information buried in middle. その’s position effect 暫定日本語案: 測定 on 2023-era models — ない proof すべての 現在の model 常に ignores middle — 暫定日本語案: ただし it’s held up as general caution: stuffing more tokens in doesn’t guarantee better 暫定日本語案: answers, と コンテンツ その leads とともに its point survives both retrieval in-context 暫定日本語案: attention better than コンテンツ その buries it.

economics: なぜ AI systems are selective on purpose

暫定日本語案: There’s business-model 理由 retrieval systems chunk aggressively rather than フィード 暫定日本語案: whole ページ. Google notes その “when billing is enabled, the cost of a call to the Gemini API is determined in part by the number of input and output tokens” — と 暫定日本語案: output tokens typically cost several times more than input tokens. Tokens are literally 暫定日本語案: metered. その gives AI systems strong economic incentive へ retrieve と pass だけ 暫定日本語案: 何’s necessary, which reinforces 同じ conclusion から 異なる direction: 暫定日本語案: selective, passage-level retrieval isn’t temporary limitation へ wait out — it’s どのように 暫定日本語案: これらの systems are designed へ 機能.

一般的な myths, debunked

  • 暫定日本語案: “A 1-million-token context window means the AI reads my whole website at once.” 暫定日本語案: No. In 検索 または RAG scenario, retrieval still selects と chunks コンテンツ 前に it 暫定日本語案: ever reaches model’s window. huge window changes 何’s possible in principle, 暫定日本語案: ない 何 検索エンジン または AI Overview actually フィード itself per クエリ. Google’s line 暫定日本語案: is directly on point: “There’s no ideal page length, and in the end, make pages for your audience, not just for generative AI search.”

  • 暫定日本語案: “I need to write in exactly 200-word, token-sized chunks.” No. Google: 暫定日本語案: “There’s no requirement to break your content into tiny pieces for AI to better understand it.” Chunking happens on system side; あなた job is clear, well- 暫定日本語案: structured コンテンツ, ない 手動 token accounting.

  • 暫定日本語案: “More tokens = a smarter model / better answers.” No. larger window increases 暫定日本語案: capacity, ない comprehension — と “Lost in the Middle” 表示 models 使用 start 暫定日本語案: と end of their context better than middle. Bigger isn’t 自動 better.

  • 暫定日本語案: “Tokens = words, so I can just count words to estimate usage.” Roughly, ただし ない 暫定日本語案: reliably. 100 tokens ≈ 60–80 English words is Google’s average, ただし punctuation, code, 暫定日本語案: non-English text, と unusual words tokenize less efficiently — which matters いつ 暫定日本語案: あなた’re estimating cost または budget.

  • 暫定日本語案: “llms.txt solves the context-window problem for my site.” 問題 is real — 暫定日本語案: it’s spec’s own stated motivation — ただし Google doesn’t 使用 llms.txt 向けに 検索, 暫定日本語案: と Mueller has framed it as token-saving crutch 向けに AI coding ツール, ない SEO 暫定日本語案: fix. mitigations その actually matter are 同じ fundamentals: be crawlable と 暫定日本語案: インデックス登録, と write clear, retrieval-friendly コンテンツ.

何 この means 向けに コンテンツ と SEO

暫定日本語案: Strip jargon と takeaways are concrete — と それら’re 同じ discipline 暫定日本語案: その 表示 up 全体で この cluster:

  • 暫定日本語案: Front-load answer. Both retrieval in-context attention favor start 暫定日本語案: (と end) of 何 model sees. Lead とともに あなた point.
  • 暫定日本語案: 保つ sections self-contained. Because passage 可能性がある be pulled out of あなた ページ と 暫定日本語案: handed へ model on its own, it すべき stand on its own. この is 同じ logic 暫定日本語案: behind good H2/H3 structure と clear topic sentences.
  • 暫定日本語案: Don’t obsess 超えて 手動 chunking. No ideal ページ length, no requirement へ 暫定日本語案: fragment. Write 向けに humans; system chunks.
  • 暫定日本語案: “Bigger context window” ≠ “AI reads my whole site.” Optimize 向けに being found と 暫定日本語案: selected, ない 向けに being ingested whole.

暫定日本語案: Tokens と context windows are low-level plumbing 下で 大半の of この cluster: 暫定日本語案: それら’re 理由 grounding と retrieval have へ select passages, 理由 chunking 暫定日本語案: prepares text way it does, constraint embeddings と semantic と vector 検索 暫定日本語案: 機能 以内に, と limit passage ランキング exists へ 機能 around. と それら sit right 暫定日本語案: next へ model’s other hard boundary — its knowledge cutoff — as one of core 暫定日本語案: limitations of any LLM.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.