What is an LLM's context window?
- Exam domain
- Generative AI and large language models
- Difficulty
- Hard
- In this mock
- 5 questions on this domainPractise this domain
Why D is the answer
The most tokens the model can handle in one request
The context window is the maximum number of tokens the model can work with in one request, usually counting both the input and the generated output.
Remember: Context window: tokens per request.
In detail
- Prompt, history and retrieved text all count.
- Over the limit, you must trim, summarise or retrieve less.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. The number of models that can run on one GPU at onceWrong
How many models share a GPU is a hosting question.
B. The time the model keeps a conversation in memory between daysWrong
Models keep no memory between requests; the application resends history.
C. The size of the data set the model was trained onWrong
Training data size is a different number entirely.
D. The most tokens the model can handle in one requestRight
Context window: tokens per request.
Use case
An illustrative scenario, not a real incident.
Illustrative: a chat app summarises older turns so long conversations stay inside the model's limit.
See it in different ways
mindmap
root(("Context window"))
n1["Input"]
n2["System prompt"]
n3["Chat history"]
n4["Retrieved text"]
n5["Output"]
n6["Generated tokens"]How to read this chart
- The centre is "Context window".
- "Input" covers "System prompt", "Chat history", "Retrieved text".
- "Output" covers "Generated tokens".
flowchart TD
Q{"Is the prompt over the limit?"}
Q -->|"Yes"| A0["Trim, summarise or retrieve less"]
Q -->|"No"| A1["Send as is"]How to read this chart
- At "Is the prompt over the limit?": if "Yes", go to "Trim, summarise or retrieve less"; if "No", go to "Send as is".