LLMscore
Context windows
The maximum tokens a model can attend to in one call — input and output together.
What it is and why it exists
The context window is the model’s working memory for a single request: system prompt, tools, history, retrieved documents and the answer all share it. A large advertised window is not the same as a window the model uses well: recall of facts buried in the middle of long inputs degrades (“lost in the middle”).
Quick prototype
Paste everything in and see if it fits.
In production, at scale
Reserve output tokens first, give every section a budget, put the most important material at the start and end, and prefer retrieving the right 5k tokens over sending 200k. Long context costs linearly more per call and adds prefill latency.
Vendors and tools
| OpenAI, Anthropic, Google | Windows from ~128k to ~1M+ tokens depending on model; check the model card |
|---|---|
| Needle-in-a-haystack / RULER | Benchmarks for how well a model actually uses long context |
On AWS: Bedrock model cards list each model’s maximum context; the limit is enforced per InvokeModel / Converse call.
How it fails
- Forgetting the output reserve: the model stops mid-answer when input fills the window
- Assuming a 1M window means 1M tokens of reliable recall
- Cost and latency creep as conversation history grows unbounded
What the interviewer asks next
If the window is 1M tokens, why use RAG at all?
Cost and latency scale with input size on every call, recall degrades in long inputs, and RAG lets you enforce permissions and cite sources. Long context is great for one-off whole-document tasks.
What is “lost in the middle”?
Models recall information near the beginning and end of a long input better than in the middle, so placement matters as much as inclusion.