---
title: "Context window"
type: "glossary-term"
category: "AI & LLMs"
canonical_url: "https://www.graphcanon.com/glossary/ai-and-llms/context-window"
updated: "2026-07-09"
---

# Context window

**The context window is the maximum amount of text (measured in tokens) a language model can consider at once, including your prompt and its own reply.**

The **context window** is the model's working memory for a single request, measured in tokens. Everything the model reads and writes in that turn - system instructions, your prompt, retrieved documents, and the generated answer - must fit inside it.

A bigger window lets you pass more context (longer documents, more retrieved passages) but usually costs more and can dilute the model's focus. RAG exists partly to fit only the most relevant content into a limited window.

## Related terms

- [Token](/glossary/ai-and-llms/token.md)
- [Retrieval-augmented generation (RAG)](/glossary/ai-and-llms/retrieval-augmented-generation.md)

[AI & LLMs](/glossary/ai-and-llms.md) · [All glossary terms](/glossary.md)

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon`](/api/graphcanon)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
