Long-Context Engineering
Large context windows increase capacity, not guaranteed attention quality. Long contexts increase prefill work, cost, memory and opportunities for conflicting or malicious instructions.
function placeCriticalEvidence<T>(critical: T[], supporting: T[]) {
return [...critical, ...supporting];
}
Real ordering should be eval-driven. Some tasks exhibit position sensitivity or “lost in the middle” behavior.
RAG vs long context
Long context can reduce retrieval complexity for bounded datasets, but RAG remains useful for freshness, ACL filtering, citations, cost control and very large corpora.
Practice
- Why does a larger context window not eliminate RAG?
- What is position sensitivity?
- Which metrics change as input context grows?
- Design a long-context eval with evidence placed at different positions.