{"version":1,"term":{"id":"context-window","term":"Context window","aliases":["Context length"],"category":"Basics","definition":"The amount of material a model can handle within a request. Its limits and accounting depend on the model and API.","example":"Instructions, conversation history and retrieved passages all compete for space.","caution":"Fitting a document does not prove the model uses every detail correctly. Test questions that depend on specific passages.","relatedTerms":["token","retrieval-augmented-generation","evaluation"],"links":[{"label":"Build a prompt brief","path":"/tools/prompt-workbench"}],"sources":[{"label":"Google: Long context","url":"https://ai.google.dev/gemini-api/docs/long-context"}],"updatedAt":"2026-10-29T03:28:25.048Z","sourceId":"context-window","tags":["must-know","builders"],"why":"It caps how much a model can see at once, which decides whether it can take in your whole document, codebase or chat history.","sourceDefinition":"The number of tokens a model can process in a given prompt. The larger the context window, the more information the model can use to provide coherent and consistent responses to the prompt.","sourceCheckedAt":"2026-11-23T18:47:16.070Z","sourceChangedAt":"2026-10-22T13:40:15.702Z"},"previous":{"id":"context-rot","term":"Context rot"},"next":{"id":"controlnet","term":"ControlNet"},"related":[{"id":"token","term":"Token","page":true},{"id":"retrieval-augmented-generation","term":"Retrieval-augmented generation","page":true},{"id":"evaluation","term":"Evaluation","page":true}],"guides":[{"id":"pick-your-ai-stack","title":"Pick your AI stack in five minutes."},{"id":"ai-terms-2027","title":"27 AI terms to know in 2027."},{"id":"context-engineering","title":"Context engineering is the real job."},{"id":"claude-code","title":"Claude Code, the operator's way."},{"id":"mcp-and-skills","title":"MCP servers and skills, explained."},{"id":"debugging-with-ai","title":"Debugging with AI without going in circles."}],"pages":["ab-testing","agent2agent","adversarial-attack","agent","agent-harness","agent-memory","agent-planning","agent-skill","agent-wallet","agentic","agentic-commerce","agents-md","agi","ai-adoption","ai-alignment","ai-copyright","ai-avatar","center-of-excellence","ai-citation","ai-crawler","ai-governance","ai-literacy","ai-overviews","ai-pilot","ai-roi","ai-safety","ai-slop","ai-strategy","ai-visibility","ai-washing","ai-watermarking","algorithmic-bias","api","artificial-intelligence","attention","augmentation","automation","autonomous-agent","background-agent","backpropagation","batch-api","benchmark","benchmaxxing","browser-agent","build-vs-buy","canonical-url","catastrophic-forgetting","centaurs-and-cyborgs","chain-of-thought","change-management","character-consistency","chatbot","chunking","clanker","coding-agent","computer-use","computer-vision","constitutional-ai","content-credentials","context-engineering","context-rot","context-window","controlnet","conversational-search","copilot","cost-per-token","data-contamination","data-labeling","data-moat","data-poisoning","decentralized-compute","deep-learning","deep-research","deepfake","delimiters","depin","diffusion-model","distillation","dpo","e-e-a-t","e-acc","embedding","emergent-abilities","entity","eu-ai-act","evaluation","explainability","factuality","few-shot-prompting","fine-tuning","foundation-model","frame-interpolation","frontier-model","generative-ai","generative-engine-optimization","golden-dataset","gpt","gpu","gpu-poor","gradient-descent","graphrag","grounding","guardrails","hallucination","handoff","held-out-test-set","human-evaluation","human-in-the-loop","hybrid-search","image-to-image","image-to-video","inference","inpainting","instruction-tuning","interpretability","jagged-frontier","jailbreak","knowledge-cutoff","knowledge-graph","kv-cache","large-language-model","latency","latent-space","leaderboard","least-privilege","lip-sync","llm-as-a-judge","llmops","llms-txt","local-llm","long-context","lora","machine-learning","max-tokens","mcp-server","meta-prompting","mixture-of-experts","moat","model","model-card","model-collapse","model-context-protocol","model-routing","motion-control","multi-agent-system","multimodal","music-generation","natural-language-processing","negative-prompt","neural-network","next-token-prediction","nist-ai-rmf","ocr","on-device-ai","one-shot-prompting","open-source-ai","open-weights","orchestrator","outpainting","overfitting","p-doom","parameters","peft","perplexity-metric","physical-ai","pii","post-training","pre-training","precision-and-recall","programmatic-seo","prompt","prompt-adherence","prompt-caching","prompt-chaining","prompt-engineering","prompt-injection","prompt-leaking","prompt-regression-testing","prompt-template","proof-of-personhood","provenance","quantization","query-fan-out","rate-limit","react-pattern","reasoning-model","red-teaming","refusal","reinforcement-learning","reranking","responsible-ai","retrieval-augmented-generation","reward-model","rlhf","robots-txt","role-prompting","sandbox","scaling-laws","seo","seed","self-consistency","self-critique","semantic-search","shadow-ai","share-of-voice","sitemap","small-language-model","speculative-decoding","speech-to-text","stochastic-parrot","stop-sequence","streaming","structured-data","structured-output","style-transfer","subagent","superintelligence","supervised-fine-tuning","sybil-attack","sycophancy","synthetic-data","system-instructions","temperature","test-time-compute","text-to-image","text-to-video","text-to-speech","bitter-lesson","time-to-first-token","token","tokenizer","tokens-per-second","tool-calling","top-p","topical-authority","total-cost-of-ownership","tpu","training","training-data","transformer","upscaling","vector-database","vector-search","vendor-lock-in","vibe-coding","vision-language-model","voice-cloning","workflow","world-model","wrapper","x402","zero-click-search","zero-shot-prompting","zkml"],"card":"/images/cards/glossary/context-window.png?v=d1960d9c2e455995"}