Longread Hacks
Claude and Gemini are large language models used for document tasks such as summarizing, extracting key points, drafting structured notes, and answering questions grounded in a provided text. Long documents stress the same failure modes across models: context windows run out, formatting changes during copy/paste, and the model starts answering from patterns rather than the specific text you gave it.
For practical examples, consider a 40-page clinical guideline PDF you want summarized into a one-page brief, or a multi-section intake document you want converted into a structured problem list. In both cases, the workflow matters more than the brand name: you need a plan for chunking, a way to keep track of where each claim came from, and a verification step that checks whether the output matches the source.
One small detail that often affects results: if you paste text from a PDF, line breaks and headers can shift. I’ve seen the same document produce different extraction quality depending on whether the text came from a “copy text” action versus an OCR export (for example, a tool version like Adobe Acrobat Reader 24.003). That difference can change how headings and tables are represented to the model.
Main Problems And Pain Points
People often assume a model “reads the whole document” when they upload or paste large text. Many systems still rely on a context window, so the model may only see the most recent portion or a truncated representation, even if the UI suggests full coverage. When truncation happens, the summary can sound coherent while silently omitting sections.
Another common issue is citation drift. Even when a model is asked to quote or reference sections, it can paraphrase incorrectly, mix similar passages, or attach a recommendation to the wrong guideline subsection. This is more likely when the document contains repeated phrasing, long lists, or tables where the model’s text extraction loses row/column boundaries.
Supporting technologies also matter. Many long-document workflows depend on retrieval-augmented generation (RAG), where the system indexes document chunks and retrieves relevant segments for each question. If retrieval returns the wrong chunk, the model will answer confidently from irrelevant text. Retrieval quality depends on chunk size, overlap, embedding model behavior, and how the system handles headings.
Finally, formatting loss creates subtle errors. Bullet lists can become paragraphs, abbreviations can expand inconsistently, and dates can shift when the source uses multiple formats (for example, “01/02/2025” versus “2 Jan 2025”). Those errors rarely look dramatic, which makes them harder to catch without a check.
Solutions And Advice
Use Chunking With Anchors
Break the document into sections that match its structure: headings, numbered clauses, or page ranges. Then add anchors so each chunk keeps its identity, such as “Section 3.2, page 14” or “Appendix B, table of contraindications.” A practical target is 800–1,500 words per chunk for many chat-based workflows, then adjust based on how much the model can ingest without truncation.
When you ask for extraction, include an instruction that forces traceability: “For every extracted item, include the anchor label and the exact sentence fragment that supports it.” This reduces paraphrase drift. If the model refuses to quote, that refusal is itself a signal that you should switch to smaller chunks or a retrieval workflow.
Tooling note: if you use a local text splitter, check whether it preserves headings. A simple test is to take one chunk, run the model extraction, and then verify that the chunk’s first heading appears in the model’s output. If it doesn’t, the chunk boundaries likely need adjustment.
Ask For Structured Outputs
Long-document tasks benefit from strict output schemas. Instead of “Summarize,” use prompts like “Return a table with columns: Topic, Recommendation, Evidence/Source Quote, Exceptions, and Date.” For medical or policy documents, this structure helps you spot missing categories and reduces the chance that the model merges two sections.
Set a length budget per section. For example, “No more than 120 words per section summary” prevents the model from spending all its attention on the first chunk. If the model ignores the limit, you can reduce the chunk size or increase the number of passes, each pass covering a smaller slice.
One mild frustration: models sometimes produce “almost structured” output that looks right but breaks your parsing. If you plan to copy results into a spreadsheet, ask for a CSV-like format or a fixed bullet template, then validate with a quick manual scan.
Verify With Cross-Checks
Verification should be a separate step, not mixed into the first generation. After you get an extracted list, run a second prompt that only checks for consistency: “For each item, confirm whether the supporting quote exists verbatim in the provided chunk. If not, mark it as ‘Not Found.’” This catches hallucinated details.
Use at least two independent checks when stakes are higher. One check can be “quote presence,” another can be “logical consistency,” such as whether contraindications contradict inclusion criteria. For example, if a guideline says a medication is contraindicated in pregnancy, the extracted output should not list pregnancy as a “safe use” exception.
Keep a small audit log. Save the chunk anchors you used and the prompts you ran. If you later compare Claude and Gemini outputs, you can attribute differences to chunking and retrieval rather than to random prompt wording.
Test Retrieval And Limits
If you use a system that supports retrieval, test it with a “needle” question. Pick a specific sentence from the document, then ask the model a question that can only be answered from that sentence. If the answer misses the needle, retrieval is failing for your chunking or indexing settings.
Also test truncation behavior. Ask a question that depends on an early section and then a question that depends on a late section. If the late question works but the early one fails, you likely hit a context limit or the system prioritized recent text.
As an incidental detail, I’ve seen different results when the same document is uploaded as “text” versus “file” in a web UI, because the backend may extract text differently. If you’re comparing models, keep the input method consistent across both systems.
Case Examples
Example 1: Guideline Summary With Traceable Claims. A reader has a 35-page clinical guideline and wants a one-page brief. They split the document by major headings into 12 chunks, each labeled with a heading and page range. They request a structured table per chunk with “Recommendation” and “Supporting quote fragment.” After compiling the tables, they run a verification pass that marks any item whose quote fragment does not appear in the chunk. The final brief includes only items that pass quote presence checks, and the reader flags ambiguous items for manual review.
Example 2: Intake Form Extraction Into a Problem List. A care coordinator has a long intake document with repeated symptoms and dates. They extract only from the “Symptoms” and “History” sections first, using anchors for each subsection. The model output is requested as a list of problems with “Onset date,” “Supporting sentences,” and “Uncertainty notes.” When the model produces an onset date without a supporting sentence, the verification step marks it “Not Found,” and the coordinator revises the chunk boundaries to include the relevant paragraph that contained the date. The result is a problem list that reflects the source text rather than inferred timelines.
Comparison Table Or Checklist
| Decision Factor | Claude-Oriented Workflow | Gemini-Oriented Workflow | What To Test First |
|---|---|---|---|
| Long Input Handling | Often used with chunking and careful prompts; behavior depends on how the interface feeds text into the model. | Often used with document upload and retrieval features; behavior depends on indexing and extraction. | Run two questions: one from the first page and one from the last page; compare whether both answers cite the correct anchors. |
| Formatting Sensitivity | Can preserve structure when text extraction keeps headings and lists intact. | Can handle structured prompts well, but table extraction quality varies with PDF-to-text conversion. | Test one chunk containing a table; verify row/column meaning in the extracted output. |
| Traceability | Works best when you force quote fragments and anchor labels per item. | Works best when you request strict schemas and then verify quote presence in a second pass. | Use a “Not Found” verification prompt; count how many items fail quote presence. |
| Iteration Cost | May require more chunk passes for full-document coverage if context is tight. | May reduce manual chunking if retrieval is reliable, but retrieval can miss needles. | Pick 3 needle sentences and test retrieval accuracy; record misses and time spent fixing them. |
Step-by-step checklist for long documents:
- Choose a document sectioning method that matches headings or numbered clauses.
- Label each chunk with an anchor (section name + page range).
- Generate structured outputs with quote fragments and an explicit “Not Found” policy.
- Run a verification pass that checks quote presence for every extracted item.
- Compare models using the same chunk set, the same prompts, and the same input method (paste vs upload).
- Spot-check 5 items per section for paraphrase drift and date/number errors.
Common Mistakes
One frequent mistake is asking for a single “full document summary” without constraints. The model may compress heavily, omit exceptions, or merge similar recommendations. A better approach is to request section-level outputs with a fixed word budget and then merge them yourself.
Another mistake is trusting extracted numbers without checking units and date formats. If a document uses “mg/dL” and the model outputs “mg/L,” the error can be subtle. Verification should include unit checks and a quick scan for date normalization mistakes.
People also overestimate how well models follow “use only the provided text” instructions. If you do not run a second-pass verification, you may not notice that the model filled gaps with general knowledge. The “Not Found” verification prompt is a practical guardrail.
Finally, comparisons between Claude and Gemini often fail because the inputs differ. If one model receives text pasted from a PDF and the other receives an uploaded file, the text extraction pipeline changes. Keep the input method consistent, and record the chunking settings you used.
FAQ
How do I prevent truncation on long docs?
Split the document into anchored chunks and ask for section-level outputs. Then verify coverage by running one question tied to an early anchor and one tied to a late anchor.
What chunk size works for long-document summaries?
Many chat workflows handle roughly 800–1,500 words per chunk, but the best size depends on your document’s tables and formatting. Test with one chunk that includes a table and check whether row meaning survives.
How can I make extracted recommendations traceable?
Require a schema that includes an anchor label and a quote fragment for each extracted item. Follow with a second prompt that marks items as “Not Found” when the quote fragment does not appear in the chunk.
Why do models sometimes mix up similar sections?
Repeated phrasing, near-duplicate headings, and table extraction issues can cause paraphrase drift. Smaller chunks and quote-fragment requirements reduce mixing, and verification catches mismatches.
Do retrieval features remove the need for chunking?
Retrieval can reduce manual chunking, but it still depends on indexing quality. Use needle-sentence tests to confirm retrieval returns the correct chunk before trusting extracted outputs.
Author's Insight
Long-document performance depends less on brand names and more on how text enters the model: truncation behavior, PDF-to-text extraction, and whether retrieval returns the right passages. A careful workflow treats the model as a draft generator, then uses a separate verification pass to check quote presence and unit/date consistency. When comparing Claude and Gemini, keep chunking, prompts, and input method identical so differences reflect model behavior rather than preprocessing. If you need audit-ready outputs, require structured schemas and store the chunk anchors used for each claim.
Key Takeaways
- Use anchored chunking and structured outputs to reduce omissions and paraphrase drift.
- Run a second-pass verification that checks quote presence and basic unit/date correctness.
- Test retrieval with needle sentences if you rely on document indexing features.
- Compare models using identical input methods and chunk sets to avoid misleading differences.