Articles

What a context window means for long documents

Published · Global Village Language Services

AI tools are often described by how much text they can take in at once. That capacity is called the context window, and vendors now advertise windows large enough to hold whole books. Knowing what a context window means for long documents helps writers and editors judge what a tool can reliably do with a long report, a contract, or a set of source files.

What a context window is

A language model reads text as tokens, which are pieces of words. The context window is the maximum number of tokens the model can consider at one time, including the instructions, any attached documents, and the text it produces. Anything outside the window is not available to the model when it writes. Very long documents may need to be split simply to fit.

A large window means a tool can accept a long document in one piece. It does not mean the tool gives every part of that document equal attention. That difference matters most for the kinds of long documents editors handle.

What the research shows about long inputs

A study by Nelson Liu and colleagues, published in Transactions of the Association for Computational Linguistics, tested how models use information placed at different points in a long input. They found that “performance is often highest when relevant information occurs at the beginning or end of the input context.”1 Performance “significantly degrades when models must access relevant information in the middle of long contexts.”

The authors found this pattern “even for explicitly long-context models.”1 A model that can accept a long document is not necessarily a model that uses all of it well. The study’s title gives the problem its common name: lost in the middle.

The study tested particular models and tasks, and newer models may behave differently. The finding is still a useful warning. A claim that a tool “read” a hundred-page report should not be taken to mean that every page shaped its answer equally.

What a context window means for long documents in practice

Summaries of long documents may underweight the middle. A summary that reflects the introduction and conclusion well can still miss a qualification, an exception, or a finding buried in a middle section. Uwe Peters and Benjamin Chin-Yee found that model summaries of research “were twice as likely to contain generalized conclusions compared to the original abstracts.”2 Dropped detail from the middle of a long document is one way that happens.

Consistency across a long draft is harder to maintain. NIST’s Generative AI Profile notes that confabulated output can “contradict previously generated statements in the same context.”3 A tool writing a long report may state a figure one way in an early section and another way later.

Questions about specific passages can be answered from the wrong place. A tool asked what a contract says about termination may answer from a nearby clause or from general knowledge of such contracts. A Stanford study of legal research tools that draw on real case law found that they “each hallucinate between 17% and 33% of the time.”4 Our article on grounded generation explains why even tools that work from real documents can cite the wrong passage.

Working with long documents

Break long tasks into sections. Ask the tool to summarize or check one section at a time, then combine the results. Each request then places the relevant text near the start of the input, where the research suggests models use it best.

Ask for locations. When a tool states what a document says, ask it to give the section or page and quote the passage. A reviewer can then check the claim directly. Our article on what to do when an AI summary contradicts its source describes how to handle the cases where the check fails.

Check the middle deliberately. When reviewing an AI summary of a long document, read the middle sections of the source and confirm that their key points appear. This is the part most likely to be thin or missing. Appendices, footnotes, and tables placed mid-document deserve the same check.

Our Editorial AI Assessment tests how a team’s tools handle its own long documents and where review needs to focus. Client documents go only into tools the client has approved, and decisions on content remain with the client. Long documents are where careful structure in the request pays back most.

Notes

  1. Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang, “Lost in the Middle: How Language Models Use Long Contexts,” Transactions of the Association for Computational Linguistics 12 (2024): 157–173. https://aclanthology.org/2024.tacl-1.9/
  2. Uwe Peters and Benjamin Chin-Yee, “Generalization Bias in Large Language Model Summarization of Scientific Research,” arXiv:2504.00025, March 28, 2025; penultimate draft of a paper forthcoming in Royal Society Open Science. https://arxiv.org/abs/2504.00025
  3. National Institute of Standards and Technology, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1), July 2024, section 2.2. https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.600-1.pdf
  4. Varun Magesh, Faiz Surani, Matthew Dahl, Mirac Suzgun, Christopher D. Manning, and Daniel E. Ho, “Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools,” Journal of Empirical Legal Studies 22 (2025): 216–242. https://law.stanford.edu/publications/hallucination-free-assessing-the-reliability-of-leading-ai-legal-research-tools

Tell us what your team writes

Tell us where the process becomes difficult and what you would like to improve, and we will define an engagement that fits your organization’s needs.

Request an Editorial AI Assessment

Or call: 1-800-483-4151