Question presented to candidate: "Models now advertise context windows from 128k up to a million tokens. If you can fit a whole contract or a whole codebase in one prompt, why would you still build retrieval? How do you actually use a very large context window well?"
What a strong answer should cover:
- Advertised window is not effective window: recall is weaker in the middle of long inputs (lost in the middle), benchmarks such as RULER found many models fall short of their claimed length on harder tasks than single-needle lookup, and quality degrades with distractors
- Cost and latency scale with input: every token is paid on every call and must be processed before the first output token; some providers bill long requests at a higher rate above a threshold, and caching changes the arithmetic for a reused document
- When long context wins: one large, bounded input asked many questions (a contract, a codebase snapshot), cross-document reasoning, cached prefixes; when retrieval wins: corpora larger than any window, high query volume, frequently changing data, a need for citations
- Placement: long documents first, instructions and question last, each document tagged with its source, most relevant material at the edges, ask for supporting quotes before the answer
- Measure it on your own data: multi-needle and distractor tests at several depths and lengths, not one single-needle demo
Clarifying questions expected:
- How large is the corpus, how often does it change, and how many queries per day hit it?
- Are we asking many questions about one document, or searching across many?
Code / implementation expected: Optional β the cost arithmetic of stuffing versus retrieving, a reordering of chunks for the edges, or a needle-at-depth test harness.