Tokens dan Context Windows
What tokens dan context windows adalah, why LLMs memiliki them, dan why context-window limit adalah mechanical alasan AI search chunks dan retrieves Anda konten alih-alih reading whole halaman.
Bahasa
sebuah token adalah smallest unit dari text sebuah LLM processes — roughly 4 characters, atau tentang ¾ dari sebuah English kata (100 tokens ≈ 60–80 kata per Google). Tokenization splits text (dan images, audio, video) ke ini units. sebuah context window adalah maximum angka dari tokens sebuah model dapat hold di once — input plus output combined — like pendek-istilah memory; Google's Gemini dapat accept up untuk 1 million tokens. konten outside window adalah invisible, not gradually forgotten. ini penting untuk AI search because no full halaman atau situs fits di one window, so retrieval sistem select dan chunk Anda konten sebelum sebuah LLM ever sees ini — which adalah mechanical alasan chunking, passage-tingkat retrieval, dan 'pertahankan ini jelas dan self-berisi' advice exist. sebuah bigger context window tidak berarti sebuah AI reads Anda whole situs, dan Google says there's no ideal halaman length dan no requirement untuk fragment konten untuk AI.
TL;DR — sebuah token adalah little piece dari text sebuah AI reads — biasanya sebuah chunk dari sebuah kata, roughly ¾ dari sebuah English kata. sebuah context window adalah how much text sebuah AI dapat hold di -nya head di once (-nya pendek-istilah memory). Both penting untuk search because search sistem melakukan not routinely hand sebuah model setiap halaman atau sebuah entire situs web. mereka biasanya grab hanya relevant bagian sebelum mereka jawaban.
What sebuah token adalah
Language models process text sebagai tokens, which dapat menjadi whole kata atau smaller character sequences depending pada tokenizer. 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? sebuah context window adalah sebuah model-spesifik limit pada tokens available untuk sebuah permintaan dan respons, dan published limits dapat perubahan oleh model versi. 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
model bahasa besar — tech behind ChatGPT, Gemini, dan AI Overviews — don’t read text cara Anda melakukan, kata oleh kata. mereka break ini ke tokens: kecil units itu adalah sering bagian dari sebuah kata alih-alih sebuah whole one. Google’s aturan dari thumb untuk -nya Gemini models adalah itu one token adalah tentang 4 characters, dan 100 tokens adalah roughly 60–80 English kata. So sebuah token adalah sebuah bit less daripada sebuah full kata pada average.
process dari chopping text ke tokens adalah called tokenization, dan full set dari tokens sebuah model knows adalah -nya vocabulary. umum kata mungkin menjadi sebuah single token; longer atau unusual kata get split ke several. dan ini adalah not hanya text — Gemini tokenizes images, audio, dan video too.
What sebuah context window adalah
sebuah context window adalah paling tokens sebuah model dapat berfungsi dengan di one go. Think dari ini sebagai pendek-istilah memory — itu’s Google’s own analogy. Google describes itu space sebagai one shared pool covering instructions sistem gives model, back-dan-forth dari Anda conversation, apa pun documents itu got pulled di, Anda pertanyaan, dan model’s jawaban — though exact split isn’t identical everywhere; beberapa providers cap how much output Anda dapat get back separately dari overall window, so periksa specifics untuk whatever model Anda’re actually menggunakan.
penting bagian: once something falls outside usable window, ini adalah hilang — not slowly forgotten, hanya invisible, sebagai jika ini adalah tidak pernah there. model dapat’t reach back untuk ini unless sistem deliberately re-feeds ini, atau product instead rejects, truncates, atau compacts Anda permintaan sebelum model bahkan sees ini.
Why ini penting untuk search
Here’s connection people miss. bahkan when sebuah halaman dapat fit inside sebuah besar context window, handing di atas setiap halaman atau sebuah entire situs adalah expensive dan biasanya irrelevant untuk pertanyaan. So when sebuah AI search alat jawaban, ini umumnya selects dan chunks paling relevant passages pertama, lalu feeds hanya itu untuk model.
itu’s whole alasan Anda hear advice like “put your answer up front” (terjemahan) “put Anda jawaban up front” dan “keep sections self-contained.” (terjemahan) “pertahankan bagian self-berisi.” ini adalah not sebuah style preference — ini adalah because AI adalah berfungsi dengan sebuah piece dari Anda halaman, not halaman. jika sebuah bagian hanya membuat sense di context dari rest dari halaman, ini dapat lose -nya meaning moment ini adalah pulled out pada -nya own.
thing people get wrong
sebuah giant context window tidak berarti sebuah AI reads Anda whole situs. Anda’ll hear itu Gemini dapat take di sebuah million tokens, dan think “great, it’ll read everything I publish.” (terjemahan) “great, ini’ll read everything I publish.” ini won’t. di sebuah search atau AI Overview scenario, sistem masih picks dan chunks relevant passages sebelum anything reaches model — huge window perubahan what’s mungkin di principle, not what sebuah mesin pencari actually feeds itself untuk Anda kueri.
dan Anda tidak perlu untuk pre-cut Anda konten ke tiny token-sized blocks. Google says outright there’s no ideal halaman length dan no requirement untuk break konten ke tiny pieces untuk AI. Write untuk people; chunking happens pada machine’s side.
ingin nyata mechanics — how tokenization berfungsi, how big context windows memiliki gotten dan why there’s sebuah ceiling, dan what “Lost in the Middle” (terjemahan) “Lost di Middle” berarti untuk Anda konten? Switch untuk Advanced tab.
TL;DR — sebuah token adalah unit sebuah LLM processes — sebuah sub-kata fragment, ~4 characters, dengan 100 tokens ≈ 60–80 English kata (Google). Tokenization splits semua input dan output — text, images, audio, video — ke tokens; model’s known set adalah -nya vocabulary. sebuah context window adalah total token budget shared oleh input (sistem prompt + history + retrieved docs + Anda kueri) dan output ( respons) — Google’s analogy adalah pendek-istilah memory. konten outside window adalah invisible, not gradually forgotten. Windows scaled dari ~2K tokens untuk 1M+ (Gemini), dengan sebuah hardware ceiling (“thermal limit” (terjemahan) “thermal limit” dari TPUs). alasan ini penting untuk search: sistem manage cost dan relevance oleh selecting dan chunking sebelum sebuah LLM sees Anda konten — dan “Lost in the Middle” (terjemahan) “Lost di Middle” berarti bahkan what adalah di window isn’t digunakan evenly. sebuah bigger window tidak berarti AI reads Anda whole situs.
What sebuah token actually adalah
Tokenization maps text ke integer token IDs menggunakan sebuah model-compatible encoding; token boundaries adalah not yang sama sebagai kata 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 adalah product dan model metadata, not sebuah permanent property dari semua language 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 adalah blunt tentang granularity: “Gemini and other generative AI models process input and output at a granularity called a token.” (terjemahan) “Gemini dan lainnya generative AI models process input dan output di sebuah granularity called sebuah token.” sebuah token adalah not sebuah kata dan not sebuah character — ini adalah sebuah fragment. sebagai Google’s docs put ini, “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.” (terjemahan) “panjang kata adalah broken up ke several tokens. set dari semua tokens digunakan oleh model adalah called vocabulary, dan process dari splitting text ke tokens adalah called tokenization.”
citable aturan dari thumb, straight dari Google: “For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60-80 English words.” (terjemahan) “untuk Gemini models, sebuah token adalah equivalent untuk tentang 4 characters. 100 tokens adalah equal untuk tentang 60-80 English kata.” So roughly ¾ dari sebuah kata per token, pada average — tetapi average adalah doing berfungsi there. Punctuation, non-English text, code, dan unusual atau panjang kata tokenize less efficiently (more tokens per kata), which adalah exactly why counting kata adalah sebuah poor cara untuk estimate token usage.
Tokens juga aren’t hanya text. Google: “All input to and output from the Gemini API is tokenized, including text, image files, and other non-text modalities.” (terjemahan) “semua input untuk dan output dari Gemini API adalah tokenized, including text, image files, dan lainnya non-text modalities.” Images, audio, dan video frames semua become tokens too. Google DeepMind’s engineers describe context-window mengukur sebagai “how many tokens — the smallest building blocks, like part of a word, image or video — that the model can process at once.” (terjemahan) “how banyak tokens — smallest membangun blocks, like bagian dari sebuah kata, image atau video — itu model dapat process di once.”
What sebuah context window adalah
sebuah context window adalah maximum angka dari tokens sebuah model dapat hold dan alasan di atas di sebuah single interaction. Google’s framing adalah deliberately sederhana: “An analogy for the context window is short term memory.” (terjemahan) “sebuah analogy untuk context window adalah pendek istilah memory.”
key mechanical poin adalah itu ini adalah one shared budget. Everything competes untuk yang sama space:
- sistem prompt ( instructions application gives model),
- conversation history so far,
- apa pun retrieved atau injected documents ( passages sebuah search/RAG sistem pulled di),
- Anda input ( saat ini kueri), dan
- model’s own output ( jawaban ini generates).
Google’s Gemini docs describe input dan output drawing dari one shared pool. itu exact accounting isn’t universal, though: lainnya providers publish sebuah separate maximum- output figure alongside context window alih-alih treating ini sebagai one undivided budget — Anthropic’s model docs, misalnya, list sebuah “context window” (terjemahan) “context window” size dan sebuah distinct “max output” (terjemahan) “max output” cap side oleh side untuk setiap 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 periksa documentation untuk spesifik model dan product Anda’re actually menggunakan rather daripada assuming one formula applies everywhere.
Whatever exact accounting, once konten falls outside usable window, ini isn’t gradually forgotten — ini adalah simply invisible, sebagai jika ini tidak pernah existed, unless sebuah sistem explicitly summarizes ini dan re-injects sebuah shorter versi, atau product instead rejects, truncates, atau compacts permintaan sebelum model ever sees ini. itu “it’s gone, not fading” (terjemahan) “ini adalah hilang, not fading” perilaku adalah bagian itu trips people up when mereka assume sebuah AI “remembers” (terjemahan) “remembers” sebuah panjang conversation cara sebuah person akan.
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 ·
How big context windows adalah — dan how fast itu changed
scale-up here memiliki telah dramatic. Early generative models handled hanya sebuah couple thousand tokens; progression ran melalui roughly 8K, lalu 32K, lalu 128K, sebelum jump Google flags di -nya docs: “Gemini is the first model capable of accepting 1 million tokens.” (terjemahan) “Gemini adalah pertama model capable dari accepting 1 million tokens.”
There’s sebuah physical ceiling, though. Google DeepMind pushed untuk experimental 10-million- token windows, dan research scientist Nikolay Savinov — one dari research leads pada panjang-context project, who originally targeted 128 000 tokens sebelum landing pada 1 million — put limit plainly: “10 million tokens at once is already close to the thermal limit of our Tensor Processing Units.” (terjemahan) “10 million tokens di once adalah sudah close untuk thermal limit dari kami Tensor Processing Units.” Bigger context isn’t free — ini costs memory, compute, dan literally heat. (Google DeepMind’s Denis Teplyashin memiliki described yang sama cascade dari 128K untuk 512K untuk 1M untuk 10M, setiap langkah opening baru possibilities tetapi running ke harder engineering limits; research scientist Machel Reid memiliki described what teams actually melakukan dengan itu space, like feeding sebuah entire codebase atau sebuah 45-minute film ke sebuah single prompt.)
Two consequences worth internalizing:
- ** angka Anda see adalah moving targets.** “The largest context window” (terjemahan) “ largest context window” adalah sebuah figure itu mempertahankan changing; don’t hard-code strategy untuk sebuah spesifik token count.
- Bigger ≠ automatically better. More capacity adalah not more comprehension — see “Lost in the Middle” (terjemahan) “Lost di Middle” below.
What sebuah million tokens actually looks like
Abstract token counts adalah hard untuk feel, so Google offers concrete sizing untuk what 1M tokens dapat hold:
- “50,000 lines of code (with the standard 80 characters per line),” (terjemahan) “50 000 lines dari code (dengan standard 80 characters per line),”
- “All the text messages you have sent in the last 5 years,” (terjemahan) “semua text messages Anda memiliki dikirim di last 5 years,”
- “8 average length English novels,” (terjemahan) “8 average length English novels,”
- “Transcripts of over 200 average length podcast episodes.” (terjemahan) “Transcripts dari di atas 200 average length podcast episodes.”
itu’s genuinely enormous — dan ini adalah exactly why “so the AI just reads my whole site” (terjemahan) “so AI hanya reads my whole situs” assumption feels reasonable dan adalah masih wrong. Which brings us untuk search angle.
Why tokens dan context windows penting untuk AI search
ini adalah core dari ini untuk anyone doing SEO atau konten. No full halaman — dan certainly no full situs — adalah reliably handed untuk sebuah model whole di sebuah search scenario. bahkan when sebuah halaman fits technically, feeding semua dari ini dapat menjadi uneconomical atau irrelevant untuk kueri. itu adalah why retrieval sistem — AI Overviews, Copilot, RAG pipelines, chatbots dengan browsing — select, chunk, dan pass hanya beberapa dari sebuah halaman’s konten untuk model. (No search vendor publishes exactly what ini retrieves per kueri, so ini adalah inference dari how retrieval architectures berfungsi umumnya dan dari public statements like ones below — not sebuah claim itu setiap AI search product behaves identically.)
token/context-window limit adalah mechanical alasan behind sebuah whole stack dari AI- search perilaku Anda sudah know tentang pada ini situs:
- ini adalah why chunking exists — konten gets split ke retrievable passages because whole thing won’t fit, dan Microsoft’s own Azure guidance says partitioning besar documents ke smaller chunks “can help you stay under the maximum token input limits of chat completion and embedding models.” (terjemahan) “dapat help Anda stay di bawah maximum token input limits dari chat completion dan embedding models.”
- ini adalah why retrieval ( “R” (terjemahan) “R” di RAG) memiliki untuk pick sebuah handful dari passages sebelum generation — model dapat hanya menjadi handed what fits di -nya budget.
- ini adalah why embedding models memiliki mereka own token caps (banyak top out sekitar sebuah few thousand tokens per input), so panjang passages memiliki untuk menjadi split sebelum mereka’re bahkan turned ke vectors.
industry’s own framing dari masalah adalah explicit. llms.txt spec opens dengan: “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.” (terjemahan) “model bahasa besar increasingly rely pada situs web informasi, tetapi face sebuah critical limitation: context windows adalah too kecil untuk handle sebagian besar situs web di mereka entirety.” itu’s whole motivation untuk format — bahkan jika, sebagai I’ll cover di myths bagian, Google’s John Mueller memiliki called llms.txt di best sebuah token-saving “crutch” (terjemahan) “crutch” untuk coding alat, not sebuah search-visibilitas mechanism.
”Lost in the Middle” (terjemahan) “Lost di Middle” — bahkan what’s di window isn’t digunakan evenly
Here’s subtler poin. Getting Anda konten ke window isn’t finish line. Stanford “Lost in the Middle” (terjemahan) “Lost di Middle” study (Liu et al., 2023) ditemukan itu pada language models dan tasks mereka tested, models digunakan informasi di start dan end dari mereka context far better daripada informasi buried di middle. itu’s sebuah position effect diukur pada 2023-era models — not proof setiap saat ini model selalu ignores middle — tetapi ini adalah held up sebagai sebuah umum caution: stuffing more tokens di doesn’t guarantee better jawaban, dan konten itu leads dengan -nya poin survives both retrieval dan di-context attention better daripada konten itu buries ini.
economics: why AI sistem adalah selective pada purpose
There’s sebuah business-model alasan retrieval sistem chunk aggressively alih-alih feed whole halaman. Google notes itu “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” (terjemahan) “when billing adalah enabled, cost dari sebuah panggil untuk Gemini API adalah determined di bagian oleh angka dari input dan output tokens” — dan output tokens typically cost several times more daripada input tokens. Tokens adalah literally metered. itu gives AI sistem sebuah strong economic incentive untuk retrieve dan pass hanya what’s necessary, which reinforces yang sama conclusion dari sebuah berbeda direction: selective, passage-tingkat retrieval isn’t sebuah temporary limitation untuk wait out — ini adalah how ini sistem adalah designed untuk berfungsi.
umum myths, debunked
-
“A 1-million-token context window means the AI reads my whole website at once.” (terjemahan) “sebuah 1-million-token context window berarti AI reads my whole situs web di once.” No. di sebuah search atau RAG scenario, retrieval masih selects dan chunks konten sebelum ini ever reaches model’s window. sebuah huge window perubahan what’s mungkin di principle, not what sebuah mesin pencari atau AI Overview actually feeds itself per kueri. Google’s line adalah directly pada poin: “There’s no ideal page length, and in the end, make pages for your audience, not just for generative AI search.” (terjemahan) “There’s no ideal halaman length, dan di end, membuat halaman untuk Anda audience, not hanya untuk generative AI search.”
-
“I need to write in exactly 200-word, token-sized chunks.” (terjemahan) “I perlu untuk write di exactly 200-kata, token-sized chunks.” No. Google: “There’s no requirement to break your content into tiny pieces for AI to better understand it.” (terjemahan) “There’s no requirement untuk break Anda konten ke tiny pieces untuk AI untuk better memahami ini.” Chunking happens pada sistem side; Anda job adalah jelas, well- structured konten, not manual token accounting.
-
“More tokens = a smarter model / better answers.” (terjemahan) “More tokens = sebuah smarter model / better jawaban.” No. sebuah larger window increases capacity, not comprehension — dan “Lost in the Middle” (terjemahan) “Lost di Middle” menampilkan models gunakan start dan end dari mereka context better daripada middle. Bigger isn’t automatically better.
-
“Tokens = words, so I can just count words to estimate usage.” (terjemahan) “Tokens = kata, so I dapat hanya count kata untuk estimate usage.” Roughly, tetapi not reliably. 100 tokens ≈ 60–80 English kata adalah Google’s average, tetapi punctuation, code, non-English text, dan unusual kata tokenize less efficiently — which penting when Anda’re estimating cost atau budget.
-
“llms.txt solves the context-window problem for my site.” (terjemahan) “llms.txt solves context-window masalah untuk my situs.” masalah adalah nyata — ini adalah spec’s own stated motivation — tetapi Google doesn’t gunakan llms.txt untuk search, dan Mueller memiliki framed ini sebagai sebuah token-saving crutch untuk AI coding alat, not sebuah SEO fix. mitigations itu actually penting adalah yang sama fundamentals: menjadi dapat di-crawl dan terindeks, dan write jelas, retrieval-friendly konten.
What ini berarti untuk konten dan SEO
Strip jargon dan takeaways adalah concrete — dan mereka’re sama discipline itu menampilkan up di seluruh ini cluster:
- Front-muat jawaban. Both retrieval dan di-context attention favor start (dan end) dari what sebuah model sees. Lead dengan Anda poin.
- pertahankan bagian self-berisi. Because sebuah passage dapat menjadi pulled out dari Anda halaman dan handed untuk sebuah model pada -nya own, ini seharusnya stand pada -nya own. ini adalah yang sama logic behind baik H2/H3 structure dan jelas topic sentences.
- Don’t obsess di atas manual chunking. No ideal halaman length, no requirement untuk fragment. Write untuk humans; sistem chunks.
- “Bigger context window” (terjemahan) “Bigger context window” ≠ “AI reads my whole site.” (terjemahan) “AI reads my whole situs.” mengoptimalkan untuk menjadi ditemukan dan selected, not untuk menjadi ingested whole.
Tokens dan context windows adalah rendah-tingkat plumbing di bawah sebagian besar dari ini cluster: mereka’re alasan grounding dan retrieval memiliki untuk select passages, alasan chunking prepares text cara ini melakukan, constraint embeddings dan semantic dan pencarian vektor berfungsi di dalam, dan limit passage peringkat exists untuk berfungsi sekitar. dan mereka sit right next untuk model’s lainnya hard boundary — -nya knowledge cutoff — sebagai one dari core limitations dari apa pun LLM.
AI summary
sebuah condensed take pada Advanced versi:
- sebuah token = unit sebuah LLM processes — sebuah sub-kata fragment, ~4 characters, dengan 100 tokens ≈ 60–80 English kata (Google). Tokenization splits semua input dan output — text, images, audio, video — ke tokens; model’s known set adalah -nya vocabulary.
- kata counts estimate tokens poorly — punctuation, code, non-English text, dan unusual kata tokenize less efficiently (more tokens per kata).
- sebuah context window = total token budget shared oleh input (sistem prompt + history + retrieved docs + kueri) dan output. Google’s analogy: pendek-istilah memory.
- konten outside window adalah invisible, not gradually forgotten — hilang unless sebuah sistem summarizes dan re-injects ini.
- Windows scaled fast: ~2K → 8K/32K/128K → 1M+ (Gemini), dengan experimental 10M near “thermal limit” (terjemahan) “thermal limit” dari Google’s TPUs (Nikolay Savinov). angka pertahankan moving.
- Bigger ≠ better: more capacity isn’t more comprehension. “Lost in the Middle” (terjemahan) “Lost di Middle” — models gunakan start dan end dari mereka context better daripada middle.
- mengapa ini penting untuk search: no full halaman atau situs fits di one window, so retrieval sistem (AI Overviews, Copilot, RAG) select dan chunk sebelum sebuah LLM ever sees Anda konten. ini adalah mechanical alasan chunking, retrieval, dan embedding token caps exist.
- Economics reinforce ini: tokens adalah metered (output biasanya costs more daripada input), so sistem adalah designed untuk retrieve selectively, not feed whole halaman.
- Myths busted: sebuah 1M window tidak berarti AI reads Anda whole situs; no perlu untuk manual token-sized chunks (Google says no ideal length, no requirement untuk fragment); more tokens ≠ smarter; llms.txt doesn’t solve ini untuk search.
- konten upshot: front-muat jawaban, pertahankan bagian self-berisi, don’t obsess di atas manual chunking, mengoptimalkan untuk menjadi selected, not ingested whole.
Official documentation
Primary-source documentation pada tokens dan context windows.
- memahami dan count tokens (Gemini API) — what sebuah token adalah, ~4-characters / 100-tokens-≈-60-80-kata aturan dari thumb, tokenization dan vocabulary, dan multimodal tokenization.
- panjang context (Gemini API) — pendek-istilah-memory analogy, 1-million-token milestone, historical progression, dan concrete “what a million tokens looks like” (terjemahan) “what sebuah million tokens looks like” contoh.
- What adalah sebuah panjang context window? Google DeepMind engineers jelaskan (Google Blog) — DeepMind engineers pada tokens sebagai smallest membangun blocks dan hardware ceiling.
- Gemini Developer API pricing — token-based billing; input vs. output token costs.
- Optimizing Anda situs web untuk generative AI fitur (Google Search Central) — “no ideal page length” (terjemahan) “no ideal halaman length” dan “no requirement to break your content into tiny pieces.” (terjemahan) “no requirement untuk break Anda konten ke tiny pieces.”
Microsoft / Azure
- Chunk besar documents untuk pencarian vektor (Azure AI Search) — chunking untuk stay di bawah maximum token input limits dari chat-completion dan embedding models.
- What adalah AI Tokens? (Microsoft Copilot help) — Microsoft’s consumer-facing explainer dari tokens dan how token limits cap how much Anda dapat tanyakan tentang di once.
Industry masalah statement
- llms.txt spec (llmstxt.org) — frames context-window limit sebagai origin masalah: windows “too small to handle most websites in their entirety.” (terjemahan) “too kecil untuk handle sebagian besar situs web di mereka entirety.”
Quotes dari source
pada—record statements dari Google dan Microsoft, plus industry framing dari context-window masalah. setiap tautan adalah sebuah deep tautan untuk quoted passage where source halaman mendukung one.
Google — what sebuah token adalah
- “Gemini and other generative AI models process input and output at a granularity called a token.” (terjemahan) “Gemini dan lainnya generative AI models process input dan output di sebuah granularity called sebuah token.” — Google AI untuk Developers, memahami dan count tokens. Jump untuk quote
- “For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60-80 English words.” (terjemahan) “untuk Gemini models, sebuah token adalah equivalent untuk tentang 4 characters. 100 tokens adalah equal untuk tentang 60-80 English kata.” Jump untuk quote
- “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.” (terjemahan) “panjang kata adalah broken up ke several tokens. set dari semua tokens digunakan oleh model adalah called vocabulary, dan process dari splitting text ke tokens adalah called tokenization.” Jump untuk quote
Google — context window
- “An analogy for the context window is short term memory.” (terjemahan) “sebuah analogy untuk context window adalah pendek istilah memory.” — Google AI untuk Developers, panjang context. Jump untuk quote
- “Gemini is the first model capable of accepting 1 million tokens.” (terjemahan) “Gemini adalah pertama model capable dari accepting 1 million tokens.” Jump untuk quote
Google DeepMind engineers — tokens dan hardware ceiling (via Google Blog)
- “measures how many tokens — the smallest building blocks, like part of a word, image or video — that the model can process at once.” (terjemahan) “measures how banyak tokens — smallest membangun blocks, like bagian dari sebuah kata, image atau video — itu model dapat process di once.” Jump untuk quote
- “10 million tokens at once is already close to the thermal limit of our Tensor Processing Units.” (terjemahan) “10 million tokens di once adalah sudah close untuk thermal limit dari kami Tensor Processing Units.” — Nikolay Savinov, Research Scientist, Google DeepMind. Read coverage
Google — no ideal halaman length, no requirement untuk fragment
- “There’s no ideal page length, and in the end, make pages for your audience, not just for generative AI search.” (terjemahan) “There’s no ideal halaman length, dan di end, membuat halaman untuk Anda audience, not hanya untuk generative AI search.” — Google Search Central, Optimizing Anda situs web untuk generative AI fitur. Read guide
- “There’s no requirement to break your content into tiny pieces for AI to better understand it.” (terjemahan) “There’s no requirement untuk break Anda konten ke tiny pieces untuk AI untuk better memahami ini.” — Google Search Central, sama guide. Read guide
Microsoft — chunking untuk stay di bawah token limits
- “Partitioning large documents into smaller chunks can help you stay under the maximum token input limits of chat completion and embedding models.” (terjemahan) “Partitioning besar documents ke smaller chunks dapat help Anda stay di bawah maximum token input limits dari chat completion dan embedding models.” — Microsoft, Azure AI Search documentation. Read source
** industry masalah statement — llms.txt spec**
- “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.” (terjemahan) “model bahasa besar increasingly rely pada situs web informasi, tetapi face sebuah critical limitation: context windows adalah too kecil untuk handle sebagian besar situs web di mereka entirety.” — llmstxt.org spec. Jump untuk quote
Tokens dan context windows — cheat sheet
What setiap istilah adalah di one line
| istilah | One-line definition |
|---|---|
| Token | unit sebuah LLM processes — sebuah sub-kata fragment, ~4 characters |
| Tokenization | Splitting text (dan images/audio/video) ke tokens |
| Vocabulary | full set dari tokens sebuah model knows |
| Context window | Max tokens sebuah model dapat hold di once (input + output) |
Token ↔ kata aturan dari thumb (Google, Gemini)
| mengukur | Approximate nilai |
|---|---|
| 1 token | ~4 characters |
| 100 tokens | ~60–80 English kata |
| 1 English kata | ~1,3 tokens pada average (sebuah token adalah ~¾ dari sebuah kata) |
(Caveat: averages hanya — punctuation, code, dan non-English text gunakan more tokens per kata.)
How context windows grew
| Era | Approx. window |
|---|---|
| Early generative models | ~2 000 tokens |
| 2023-era models | 8K → 32K → 128K |
| Gemini (2024–26) | 1 000 000+ tokens |
| Experimental | ~10 000 000 (near TPU “thermal limit” (terjemahan) “thermal limit”) |
What 1 million tokens dapat hold (Google’s contoh)
- ~50 000 lines dari code (80 chars/line)
- 5 years dari Anda text messages
- 8 average-length English novels
- Transcripts dari 200+ podcast episodes
Fast facts
- Context window = one shared budget untuk sistem prompt + history + retrieved docs + kueri + output.
- konten outside window adalah invisible — hilang, not gradually forgotten.
- Bigger window ≠ better jawaban — “Lost in the Middle” (terjemahan) “Lost di Middle”: start/end beat middle.
- di search, retrieval chunks dan selects sebelum model sees konten — sebuah 1M window tidak berarti AI reads Anda whole situs.
- Google: no ideal halaman length, no requirement untuk fragment konten untuk AI.
- Tokens adalah metered/billed (output biasanya costs more daripada input) — economic alasan sistem retrieve selectively.
mental models
1. Token = model’s unit dari reading, not kata. LLMs read di sub-kata fragments (~4 characters, ~¾ dari sebuah kata). When Anda estimate cost atau budget, count tokens, not kata — punctuation, code, dan non-English text inflate ratio.
2. context window adalah pendek-istilah memory — sebuah shared budget. sistem prompt, history, retrieved documents, Anda kueri, dan model’s output semua draw dari one pool. Anything outside ini adalah invisible, not fading. jika sebuah model seems untuk “forget,” (terjemahan) “forget,” tanyakan what fell out dari window.
3. Bigger window ≠ more understanding. Capacity dan comprehension adalah berbeda axes. “Lost in the Middle” (terjemahan) “Lost di Middle” berarti start dan end dari context get digunakan better daripada middle — so lead dengan Anda poin, don’t hanya tambahkan more.
4. No halaman fits — so retrieval selects pertama. whole alasan AI search chunks dan retrieves adalah itu sebuah halaman (let alone sebuah situs) doesn’t fit, atau isn’t economical untuk feed, whole. model tidak pernah sees Anda halaman; ini sees passages sebuah retrieval sistem chose. mengoptimalkan untuk menjadi selected, not ingested whole.
5. decision aturan untuk konten. Don’t manually cut konten ke token-sized blocks (Google says Anda tidak perlu untuk). melakukan front-muat jawaban dan write self-berisi bagian — because both retrieval dan di-context attention reward konten itu stands pada -nya own dan leads dengan -nya poin.
Context-window mistakes
Treating kata dan tokens sebagai interchangeable
Tokenization varies oleh model, language, punctuation, dan code. gunakan tokenizer untuk actual model when sebuah hard limit penting; sebuah kata-count ratio adalah hanya planning guidance.
Filling entire advertised context window
Capacity tidak berarti setiap token menerima equal attention atau itu output space adalah free. Reserve room untuk instructions dan jawaban, hapus duplicated material, dan test full task alih-alih celebrating sebuah maximum input size.
Splitting konten di sebuah fixed character count
Blind cuts dapat separate sebuah heading, definition, table, atau qualifier dari passage ini menjelaskan. Chunk pada semantic boundaries dan pertahankan enough local context untuk setiap unit untuk stand alone.
mengukur halaman bagian sebelum chunking
Run ini di Chrome DevTools Console. ini reports characters dan whitespace-split kata untuk setiap headed bagian without pretending itu counts equal model tokens:
const headings = [...document.querySelectorAll('main h2, main h3')];
console.table(headings.map((h, i) => { let text = ''; for (let n = h.nextElementSibling; n && !/^H[23]$/.test(n.tagName); n = n.nextElementSibling) text += ` ${n.innerText || ''}`; return { heading: h.textContent.trim(), characters: text.trim().length, words: text.trim() ? text.trim().split(/\s+/).length : 0, nextHeading: headings[i + 1]?.textContent.trim() || '' }; }));gunakan output untuk temukan oversized atau empty bagian, lalu run akhir text melalui tokenizer untuk model Anda akan actually gunakan.
temukan mungkin semantic boundaries di plain text
ini regular expression matches Markdown kedua- dan ketiga-tingkat heading dan mempertahankan heading text di capture group 1:
^#{2,3}\s+(.+)$gunakan multiline mode. heading adalah candidate boundaries, not sebuah guarantee itu setiap bagian adalah complete enough untuk retrieve alone.
Resources worth Anda time
My related writing
- What kami Actually Know tentang Optimizing untuk LLM Search — my Ahrefs piece pada how AI retrieval treats konten, including Dan Petrovic’s Chrome DocumentChunker research pada how halaman adalah chunked ke ~200-kata passages sebelum mereka’re processed — token/context-window limit adalah exactly why itu chunking happens.
- Generative mesin Optimization — my broader take pada optimizing untuk sebuah retrieval-dan-generation search landscape shaped oleh ini context limits.
My speaking
- GEO? AEO? LLMO? — my AI search webinar — where retrieval, chunking, dan context limits fit ke AI search. (My standing disclaimer applies: ini adalah my understanding dari ini sistem, not going untuk menjadi 100% complete atau accurate.)
Official
- memahami dan count tokens (Gemini API) dan panjang context (Gemini API) — Google’s own definitions dan million-token contoh.
- Optimizing Anda situs web untuk generative AI fitur (Google Search Central) — “no ideal page length,” (terjemahan) “no ideal halaman length,” “no requirement to break your content into tiny pieces.” (terjemahan) “no requirement untuk break Anda konten ke tiny pieces.”
dari sekitar industry
- What adalah sebuah panjang context window? Google DeepMind engineers jelaskan — Nikolay Savinov pada TPU thermal ceiling, plus Machel Reid dan Denis Teplyashin pada what panjang context unlocks.
- Chunk besar documents untuk pencarian vektor (Microsoft Azure AI Search) — chunking untuk stay di bawah maximum token input limits.
- llms.txt spec — “context windows are too small to handle most websites in their entirety” (terjemahan) “context windows adalah too kecil untuk handle sebagian besar situs web di mereka entirety” masalah statement, dan format dibangun sekitar ini.
- SEO Chunk Optimization adalah Overrated (Despina Gavoyannis, Ahrefs) — “You can’t control how Google, ChatGPT, or Perplexity chunk your content. Their pipelines change based on cost, model, and context.” (terjemahan) “Anda dapat’t control how Google, ChatGPT, atau Perplexity chunk Anda konten. mereka pipelines perubahan berdasarkan cost, model, dan context.”
- Chunked, Retrieved, Synthesized — Not diperingkatkan (Duane Forrester) — “If traditional SEO optimized for clicks, GenAI systems optimize for chunks… Structure still wins.” (terjemahan) “jika traditional SEO dioptimalkan untuk clicks, GenAI sistem mengoptimalkan untuk chunks… Structure masih wins.”
- What adalah sebuah context window? (IBM) — sebuah neutral, thorough reference explainer.
Stats worth citing
- ~4 characters per token; 100 tokens ≈ 60–80 English kata — Google’s own aturan dari thumb untuk Gemini models, paling citable token-untuk-kata conversion. Source
- 1 000 000 tokens — Gemini adalah pertama model capable dari accepting 1 million tokens di sebuah single window, up dari ~2K di early generative models. Source
- ~10 000 000 tokens = near TPU thermal limit — Google DeepMind’s Nikolay Savinov pada saat ini physical ceiling untuk context-window size. Source
- 1 million tokens ≈ 8 novels / 200+ podcast transcripts / 50 000 lines dari code — Google’s concrete sizing untuk what sebuah million-token window dapat hold. Source
- Token-based billing (output biasanya costs more daripada input) — per Google, cost dari sebuah Gemini API panggil adalah determined di bagian oleh input dan output token counts, economic alasan AI sistem retrieve selectively alih-alih feed whole halaman. Source
Test yourself: Tokens dan Context Windows
Five quick pertanyaan pada how LLMs read text dan how much mereka dapat hold di once. Pick sebuah jawaban untuk setiap, lalu periksa.
Log perubahan
Diperbarui 19 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.