# Context window

> Context window: The maximum number of tokens a model can process at once: prompt and output together.

Canonical: https://llmdojo.dev/glossary/context-window

Also called context windows.

The maximum number of tokens a model can process at once: prompt and output together.

Learn it in the lesson: [The context window](https://llmdojo.dev/learn/model-foundations/context/the-context-window) (Model Foundations · Context Windows, Prefill and the KV Cache).

## Interview questions about Context window

- [What is a context window, and why can't GPT-2 small take a 1,025th token even with plenty of memory?](https://llmdojo.dev/interview/q/what-is-a-context-window-and-why-can-t-gpt-2-small)
- [A long support conversation no longer fits the context window. Compare the ways to shrink it, and how each one fails.](https://llmdojo.dev/interview/q/a-long-support-conversation-no-longer-fits-the-context-window-compare-the)
- [Rapid fire: how do RAG and fine-tuning relate, what do you do when content exceeds the context window, how do you keep conversation state, and how do you manage prompts?](https://llmdojo.dev/interview/q/rapid-fire-how-do-rag-and-fine-tuning-relate-what-do-you)
- [What is in-context learning, and what does each example in the prompt cost you?](https://llmdojo.dev/interview/q/what-is-in-context-learning-and-what-does-each-example-in-the)
- [Design LLM search or RAG for very long documents and very long user queries.](https://llmdojo.dev/interview/q/design-llm-search-or-rag-for-very-long-documents-and-very-long)
- [What are the components of an LLM agent's memory, what does each one store, and how is information written to and read from it?](https://llmdojo.dev/interview/q/what-are-the-components-of-an-llm-agent-s-memory-what-does)

## Related
- [Position embedding](https://llmdojo.dev/glossary/position-embedding)
- [Prefill](https://llmdojo.dev/glossary/prefill)
- [Decode](https://llmdojo.dev/glossary/decode)
- [KV cache](https://llmdojo.dev/glossary/kv-cache)
- [Glossary of every term](https://llmdojo.dev/glossary)
