Long-Context Modeling
Synonyms: long context window, large context window, million-token context, extended context
Definition
Use cases
- The buried clause: A legal team uploads a 400-page contract. The summary skips an indemnity clause on page 210. Models recall the start and end of long inputs better than the middle.
- Silent forgetting: 3 hours into a chat, the assistant breaks a rule set in message 1. Early messages got summarized without telling the user.
- The 1M-token promise: Marketing says "upload your whole codebase." Answers get worse as the upload grows.
How it's used in practice
- Show what the model sees: List attached files and a usage meter, in pages or messages.
- Warn before the limit: "Older messages will be summarized. Pinned rules stay."
- Let users pin instructions: Key rules ride along in every turn.
- Cite page numbers: Answers quote the passage and its location so users can check.
- Offer a fresh start: A new chat, seeded with a handoff summary.
Challenges & limitations
- Cost and speed: Every page rides along in each request, so long threads get slower and pricier.
- Tokens mean nothing to users: Translate them into pages or messages.
Free resources
- Chroma: Context Rot — tests on 18 models showing reliability drops unevenly as inputs get longer.
- GitHub: chroma-core/context-rot — code to reproduce Chroma's long-input experiments.
- Anthropic: Prompting Claude's long context window — quote extraction before answering cut long-document errors by 36% for Claude 2.
