Can AI Accurately Read a Long Book, Contract, or Database?

AI models now accept a whole book or contract, but accuracy drops well before the limit. What tests show for books, contracts and databases, and how to check.

Not reliably, on the evidence available so far. Leading AI models will now accept a whole novel, contract or data export in one go: as of November 2026, Anthropic and Google document input limits of 1 million tokens or more for many of their models, which Google likens to about eight average-length novels [1, 2]. (Tokens are the word fragments a model processes.) But taking in a document is not the same as reading it accurately.

Independent tests find that models usually do well at finding a single passage that echoes your question, and much worse when the answer is worded differently, sits deep inside the text, or depends on the work as a whole [3, 4, 5, 6]. Accuracy often falls well before the advertised limit [3, 5]. Treat any answer about a long document as a first pass that must show its evidence.

The previous guide, Why Does AI Forget, Lose Track, or Miss Details in Long Conversations?, followed the same weakness through a long chat. This one asks what happens when the long input is a document, and why a book, a contract, a database and a pile of files each fail in different ways. The BuildAIQ capability map puts it in wider context.

TL;DR

  • Capacity is not accuracy. A million-token limit says how much a model accepts, not how well it uses each part [2].
  • Vendor needle charts test the easiest case. Finding one planted sentence is not real document work [6, 1].
  • Rewording breaks retrieval. When questions and hidden facts shared no words, most models in the NoLiMa test lost over half their accuracy by 32,000 tokens [3].
  • Whole-book questions are hardest. On true-or-false claims about recent novels, the best model tested in 2024 scored 55.8%, against 97.4% for human readers [4].
  • Make the model show its work. Ask for quotes, split long jobs, and calculate with queries [7, 8].

What the Advertised Number Measures

The context window is everything a model can take into account for a single response, counted in tokens, the word fragments a model processes. That figure is a ceiling on input, not a measure of accuracy. Anthropic’s own documentation warns that a bigger window does not by itself bring better results, and that accuracy and recall degrade as the token count grows, an effect it calls “context rot” [2]. Accepting a book is a capability; using the right passage, every time, is reliability.

Finding a Passage Versus Understanding the Whole

Two different jobs hide behind the phrase “read a document”. One is finding: locating the sentence, clause or row that answers a question. The other is understanding the whole: following a plot, weighing one clause against another, or adding up thousands of rows. The evidence below shows models do far better at the first than the second [4, 7].

The four kinds of long input stress different parts of that gap:

  • Books spread meaning across hundreds of pages, so many questions have no single answering sentence [4].
  • Contracts turn a missed clause, or a wrong “not found”, into a real risk [9].
  • Databases need exact arithmetic over many rows, which a query run by software handles better than reading [7].
  • Document collections scatter the facts across files that must be combined [10].

Why Needle Tests Make the Problem Look Solved

The best-known long-context test is the needle in a haystack: hide one relevant sentence in a long stretch of unrelated text and ask the model to retrieve it [3]. In its 2024 technical report, Google said Gemini 1.5 Pro found the needle more than 99.7% of the time in inputs of up to 1 million tokens [11]. That is a developer claim, measured on the developer’s own test.

Google’s own documentation calls this the most basic setup and says the model does not perform with the same accuracy when several pieces of information must be found [1]. A study led from Princeton University covering 59 long-context models found that most achieved perfect needle scores, yet such synthetic tests did not reliably predict performance on realistic tasks [6]. The wider pattern is explained in why test scores and demos can mislead.

When the Question and the Answer Use Different Words

Real documents rarely echo your question’s wording, and NoLiMa, a benchmark from researchers at LMU Munich and Adobe Research, was built around that gap [3]. A planted sentence might say that a character lives next to the Semper Opera House, while the question asks which character has been to Dresden, so the model must link landmark to city instead of matching words [3].

In the February 2025 paper, the authors tested 13 models that claimed to handle at least 128,000 tokens [3]. All did well on short inputs, but at 32,000 tokens, 11 had fallen below half of their short-input scores [3]. GPT-4o, one of the strongest, slipped from 99.3% to 69.7% [3].

NoLiMa also reports an effective length: the longest input at which a model keeps at least 85% of its short-input score [3]. For most models it was 2,000 tokens or fewer, only a few pages [3]. Gemini 1.5 Pro, listed at 2 million tokens, scored 92.6% on short inputs but 48.2% at 32,000 tokens [3]. A later update found that GPT-4.1, described by the authors as claiming 1 million tokens, improved clearly on earlier models but had an effective length of around 16,000 tokens and scored below 65% at 128,000 [3].

Adding an irrelevant sentence that did share words with the question cut GPT-4o’s effective length to about 1,000 tokens, because the false match misled it [3]. Step-by-step reasoning helped only partly: on the hardest questions, every model tested, including reasoning-focused ones, fell below 50% at 32,000 tokens [3].

Position and Sheer Length Both Matter

Research first released in 2023 found a U-shaped curve: models used relevant information best at the very start or end of the input and worst in the middle [12]. In one setup, GPT-3.5-Turbo did worse with the right document placed mid-input than with no documents at all [12]. The models are dated; the pattern is the lesson.

NoLiMa adds that once word-matching cues are removed, overall length matters more than position [3]. Research published in 2025 went further: even when models could recite every relevant piece of evidence perfectly, their scores on math, question-answering and coding tasks fell by between 13.9% and 85% as inputs grew, while staying within advertised limits [5]. The decline appeared even when the added material was blank space [5]. Locating the evidence does not guarantee reasoning well with it.

Books: Finding a Line Versus Following the Story

The NoCha benchmark gave models the full text of recently published novels and asked them to judge 1,001 pairs of true and false claims written by people who had read the books; a model earned credit only for getting both claims in a pair right [4]. In the 2024 results, GPT-4o did best at 55.8%, no open-weight model beat random chance, and human readers reached 97.4% [4]. Claims checkable from a sentence or two went much better than claims requiring the whole book (59.8% against 41.6%) [4].

In the FABLES study of book-length summaries generated in February 2024, between 70% and 90% of claims were judged faithful by readers, depending on the model [13]. All models frequently left out key events, details and themes, and even the strongest over-weighted the end of the book [13]. AI raters asked to flag the unfaithful claims did not reliably match the human readers [13], one reason for caution about using one AI to check another.

Contracts: Clause-Finding Is Measurable, and Still Imperfect

ContractEval, a 2025 preprint, gave 19 models complete commercial contracts from a public dataset and asked them to extract passages for 41 categories of legal risk, such as renewal terms [9]. GPT-4.1 and GPT-4.1 mini did best, with an F1 score of about 0.64 [9]. F1 folds missed clauses and wrongly flagged ones into a single number, where 1.0 is perfect. Claude Sonnet 4 scored 0.52 and a preview of Gemini 2.5 Pro 0.50 [9]. Models also sometimes answered that no relevant clause existed when one did, and open-source models did so more often [9].

A false “not found” is the riskiest answer, because nothing prompts a second look. This is a benchmark result, not legal guidance; anything that matters still needs review by a qualified person. See also what AI can and cannot do in knowledge work.

Databases: Ask for a Query, Not a Reading

Pasting a table into a chat makes the model count and average by reading. LOFT, a 2024 benchmark from Google DeepMind researchers, did exactly that with whole databases in a 128,000-token input [7]. Accuracy was 38% for Gemini 1.5 Pro, 20% for Claude 3 Opus and 13% for GPT-4o, against 65% for a conventional pipeline in which a model writes a query in SQL, the standard database language, and software runs it [7]. Averaging was the hardest operation and counting the easiest [7].

Writing queries is hard too. On Spider 2.0, a late-2024 benchmark built from real company databases that often have more than 1,000 columns, an agent based on OpenAI’s o1-preview solved 21.3% of tasks in the paper’s evaluation, against 91.2% on the older Spider 1.0 [14]. Still, a query can be read, rerun and spot-checked.

Combining Many Documents

LongBench v2 posed 503 hard multiple-choice questions over material of 8,000 to 2 million words [10]. Human experts allowed 15 minutes per question scored 53.7%, the best model answering directly 50.1%, and OpenAI’s o1-preview, which spends longer reasoning, 57.7% [10]. The models date from late 2024 and the human baseline was timed, so this shows difficulty, not a ceiling [10].

Search-based retrieval, which feeds the model a few relevant excerpts, is the usual alternative, with mixed evidence. LOFT found long-context models rivaled a leading dedicated retrieval system on simple lookups at 128,000 tokens [7]. In NoCha, though, giving GPT-4o search-ranked excerpts worked for sentence-level claims but struggled on whole-book reasoning, because the pieces arrived out of order [4]. A long chat history is a separate problem, covered in the previous guide.

How to Check an AI’s Work on a Long Document

  • Put the material first and the question last. Anthropic and Google both advise this, and Anthropic reports gains of up to 30% in its own tests [1, 8].
  • Ask for quotes before conclusions. Anthropic recommends having the model quote relevant passages first [8]. In one study, asking GPT-4o to recite its evidence before answering brought a modest gain of up to 4% [5].
  • Ask where, not just what. Request section or page references and check the important ones.
  • Split big jobs. One question per chapter or section beats one question over everything, since accuracy drops as inputs lengthen [3, 5].
  • Treat “not found” as a claim. Search the document yourself for the key terms and likely synonyms.
  • Calculate with code. For totals, averages and counts, ask for a query or formula you can run [7].

For deciding how much checking an answer deserves, see when to trust an AI answer.

Practical Takeaways

  • Read a context-window figure as an upload limit, not a promise of accuracy.
  • Expect the weakest results on questions worded unlike the document, details buried deep in the text, and conclusions that depend on the whole thing.
  • Most independent evidence here covers models released in 2024 and 2025, so look for fresh independent tests rather than vendor charts [3, 4, 7].
  • Vendor figures, including capacity limits and Anthropic’s reported 30% gain from question placement, are company-reported and dated; check them against independent results [2, 8].

Reading a long document is often one step in a longer job: summarize, then extract, then calculate, then decide. The next guide, Why Do Small AI Errors Become Bigger During Long Tasks?, explains how one missed detail early in that chain can grow into a larger failure. For how context windows and search-based retrieval work under the hood, see the How AI Works chapter.

Sources

  1. Long context (Gemini API documentation). Google AI for Developers, accessed 2026-11-09.
  2. Context windows (Claude API documentation). Anthropic, accessed 2026-11-09.
  3. NoLiMa: Long-Context Evaluation Beyond Literal Matching. arXiv, 2025-02, accessed 2026-11-09.
  4. One Thousand and One Pairs: A "novel" challenge for long-context language models. arXiv, 2024-06, accessed 2026-11-09.
  5. Context Length Alone Hurts LLM Performance Despite Perfect Retrieval. arXiv, 2025-10-06, accessed 2026-11-09.
  6. HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughly. arXiv, 2024-10, accessed 2026-11-09.
  7. Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?. arXiv, 2024-06-19, accessed 2026-11-09.
  8. Prompting best practices (Claude API documentation). Anthropic, accessed 2026-11-09.
  9. ContractEval: Benchmarking LLMs for Clause-Level Legal Risk Identification in Commercial Contracts. arXiv, 2025-08-05, accessed 2026-11-09.
  10. LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitasks. arXiv, 2024-12, accessed 2026-11-09.
  11. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv (Google Gemini Team), 2024-03, accessed 2026-11-09.
  12. Lost in the Middle: How Language Models Use Long Contexts. arXiv, 2023-07, accessed 2026-11-09.
  13. FABLES: Evaluating faithfulness and content selection in book-length summarization. arXiv, 2024-04, accessed 2026-11-09.
  14. Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows. arXiv, 2024-11, accessed 2026-11-09.