Models now accept hundreds of thousands of tokens. When would you put everything in the context window instead of building retrieval, and what failure modes would you watch for?
Answer
Model answer, written in a candidate's voice
In short
- Use long context for bounded, one-off analyses over a fixed, small-enough set where whole-document reasoning matters.
- It simplifies the pipeline and avoids retrieval misses, but every call pays for every token, latency rises, mid-context recall degrades, distractors hurt, and access control must be enforced before sending.
- Retrieval wins for large or changing corpora, citations, permissions, and cost control; hybrids retrieve large chunks into a long window.
- Decide by measuring on the team’s own tasks at realistic lengths, including distractors and permission cases.
In full
I would put everything in the context window when the task is bounded and one-off: a fixed set of documents, a known question, and reasoning that benefits from seeing the whole thing rather than a few retrieved passages. That removes retrieval misses and simplifies the system, but it is not free: every call pays for every token, latency goes up, prefix caching helps with repeated prefixes but does not remove cost or latency, and models can miss or mis-weight facts buried in the middle of a long context or get distracted by irrelevant material. It also does not give per-document access control by itself, so if some documents are not meant to be visible to the user, I must filter before sending. For large or frequently changing corpora, or when I need citations, permissions, or tight cost control, retrieval is usually the better default, and a hybrid is often best: retrieve the relevant large chunks, then let the model reason over them in a long window. Before committing, I would measure on our own tasks at realistic lengths, including distractors, stale documents, and permission cases, rather than trusting a demo with a clean short prompt.
What a strong answer covers
- Long context: simpler, no retrieval misses, whole-document reasoning; fits bounded, one-off analyses
- Costs: every call pays for every token (prefix caching helps), higher latency, degraded recall for mid-context facts, distractor sensitivity, no per-document access control
- Retrieval wins for large or changing corpora, citations, permissions and cost control; hybrids retrieve big chunks into a long window
- Insists on measuring with the team’s own tasks at realistic lengths
Common mistakes
- Equating advertised context length with reliable reasoning length
- ignoring per-request cost at production volume