Context Window
The context window is the maximum amount of text — measured in tokens — that a large language model can process at one time, determining how much document content, conversation history, and instructions the model can consider when generating a response.
Last reviewed: 2026/05/19
Definition
Why It Matters for Lawyers
How AI Tools Handle It
Frequently Asked Questions
- Q1: What happens when a document exceeds the context window?
- When a document exceeds the context window, the tool must either truncate the input (dropping content that exceeds the limit) or chunk the document into segments for sequential processing. Truncation risks losing important content; chunking risks missing cross-segment context. Some tools use summarization to compress prior context and extend effective capacity, but this introduces its own accuracy trade-offs.
- Q2: Does the context window fill up with the system prompt as well?
- Yes. The system prompt that configures the AI's behavior, any retrieved RAG context, the document being analyzed, the conversation history, and the user's current query all share the context window. A 128,000-token context window might have only 80,000 tokens available for document content after system overhead is accounted for.
- Q3: Are there practical document length limits I should plan around?
- As a practical guide: a 100-page contract is approximately 25,000–30,000 tokens of document text. A tool with a 128,000-token context window can handle roughly 300–400 pages of contract text with room for system overhead and conversation. For most M&A agreements and standard commercial contracts, current enterprise tools are capable of full-document analysis without chunking. --- *Last reviewed: 2026-05-19 by LawyerAI Editorial Team.*
Related Concepts
Token (LLM Context)
In the context of large language models, a token is the basic unit of text the model processes — roughly a word fragment, word, or punctuation mark — used to measure both input length and output length, with practical limits imposed by the model's context window.
Tech / ModelLLM (Large Language Model)
A large language model (LLM) is an AI system trained on large volumes of text data to predict and generate human-like text; it serves as the core engine underlying most legal AI tools for research, drafting, and document analysis.
CapabilityDocument Drafting AI
Document Drafting AI is software that uses large language models to generate, edit, or refine legal documents — including contracts, briefs, letters, and pleadings — based on lawyer-provided instructions or templates.
Related Tools
- Harvey AI
The most expensive legal AI in the market — Am Law 100 firms only.
- CoCounsel
Thomson Reuters' GPT-backed research and drafting with Westlaw integration.
- Westlaw Precision AI
AI-powered legal research with citation-validated answers from Westlaw.
- Luminance
Enterprise AI for portfolio-level contract analysis and institutional memory.
- Kira Systems
AI clause extraction and due diligence trusted by AmLaw 100 firms.
Related Reading
Last reviewed: 2026/05/19. Definitions are written by the LawyerAI Editorial team. We do not accept affiliate commissions; Featured placement is clearly labeled and does not influence editorial content.