Lesson 8 · Intermediate · 15 min
Analyze a PDF document with Gemini: extraction and synthesis
Upload large PDF reports to Gemini. Ask targeted queries, mandate page citations, and eliminate ungrounded statements from your documents.
- Goal
- You will query complex PDF reports in Gemini to extract dependable insights with explicit page citation anchors.
- Skills
- Frame

Gemini natively digests multi-hundred-page PDF files without preliminary chunking. To secure dependable analysis, upload your file into a protected Google Workspace session and impose strict grounding constraints: require exact page citations and instruct the model to report missing information rather than guessing.
1Direct document ingestion: moving past naive chunking
Direct document ingestion allows teams to move past naive chunking limitations. Gemini processes complete multi-page dossiers within its unified context window without losing track of overarching business logic.
Traditional retrieval-augmented generation fragments large files into small text chunks, breaking logical relationships between distant chapters. Gemini ingests up to one million tokens, analyzing body text, tabular appendices, and technical clauses in a single pass. To ensure strict analytical fidelity, prompts must require verbatim quotations tied to verified page numbers.
Ingestion approach Technical mechanism Failure mode Recommended workplace application Traditional RAG chunking Splits files into 500-word fragments Disconnects related clauses across sections Short, isolated semantic queries Direct Gemini ingestion Full document in unified native context Slower inference if improperly scoped Master agreements, audits, annual reports Grounded extraction Strict negative fallback with page citations Model abstains if source is incomplete Regulatory compliance and contract audits 

Diagram 'Working with an attached file'Diagram generated by AI and reviewed 2Locating audit liability terms within a 40-page master agreement
Locating audit liability terms within a 40-page master agreement demonstrates how full document ingestion eliminates the risk of missing critical indemnification clauses hidden deep inside appendices.
A corporate legal counsel needs to verify facility inspection obligations across an extensive third-party vendor agreement.
Weak prompt.
What are the audit clauses in the attached PDF contract?Gemini summarizes standard inspection terms in Article 12 but overlooks specific security restrictions located in Appendix D on page 38.
Strong prompt.
Based strictly on the attached contract PDF, compile an exhaustive inventory of audit compliance terms. For each provision, cite the article heading, the exact page number, and a 20-word verbatim quotation. Note explicitly if an appendix overrides the main agreement.The difference. Enforcing page citations and appendix verification keeps the model anchored across the entire document, preventing superficial skimming.
3Extract a comparative brief from an official regulatory PDF
Extract a comparative brief from an official regulatory report to practice utilizing Gemini's large context window to cross-reference distant sections without factual omissions.
To practise without handling internal corporate files, here is an excerpt from an annual ESG filing (fictional company NovaTech Ltd), ready to copy or save as
novatech_esg_report.txt:[NovaTech Ltd - 2025 Annual Sustainability and ESG Filing (Exercise Excerpt)] Section 2 - Environmental Commitments (page 14): - Scope 1 & 2 Emissions: target reduction of 25% by year-end 2026 compared to 2023 baseline. - Commercial Transport Fleet: progressive transition of 40% of vehicles to bio-CNG by 2027. - Packaging Waste Recycling Rate: minimum target set at 85% across all regional hubs. Appendix C - Audited Performance Metrics (page 52): - Scope 1 & 2 Emissions: measured decrease of 18% as of 31 December 2025 (pilot hub electrification acceleration). - Commercial Transport Fleet: 12% converted to bio-CNG as of 31 December 2025 (OEM manufacturing delivery delays). - Packaging Waste Recycling Rate: 88% annual average achieved across all operational depots.The composer's "Load exercise" button prepopulates the objective with the weak starting prompt:
"Extract ESG commitments and compare them to actual results with source page numbers."
From this starting point, complete the prompt using the composer: specify the source document, require a structured comparison table with columns "Metric", "Target (Section 2, p. 14)", "Actual (Appendix C, p. 52)", and "Variance". Enable exact citation verification (FActScore, arXiv:2305.14251) to prohibit any numerical hallucination on non-documented metrics.
Self-evaluation rubric: (a) every row cites pages 14 and 52; (b) zero figures are fabricated beyond the excerpt; (c) the fleet delivery delay is accurately captured.
4Assuming Gemini perfectly reads low-resolution rasterized scans
Assuming Gemini perfectly reads low-resolution rasterized scans creates severe risks because image compression distorts fine numerical figures and chart callout labels.
When documents originate from legacy physical scanners, narrative text remains readable while numerical digits in graphs blur. Gemini may fabricate plausible figures based on surrounding context rather than reporting unreadable text.
Fix: manually transcribe ambiguous chart figures into your prompt or command the model to state when numbers cannot be resolved.
Rule to remember: high-resolution digital text supports direct ingestion, but degraded raster scans require human verification.
5Quiz
Three questions, instant feedback. Each option comes with an explanation.
6Proof of mastery
Upload a workplace PDF document and provide a 3-point briefing where every takeaway includes a verbatim quote and its verified page number.
This lesson counts towards the Intermediate badgeSee the four badges
Criteria
Going further
Examine glossary entries for context window, grounding, and RAG. The next lesson, Multimodality: reading and analyzing images, explores visual interpretation. For massive archives, explore Long context: one million tokens.
Frequently asked questions
How large a PDF can you upload into Gemini?
Gemini accommodates PDF files of hundreds of pages thanks to its million-token context window, subject to tenant file-size megabyte limits.
Can Gemini read scanned PDFs without an embedded text layer?
Yes, through native multimodal capabilities, Gemini parses scanned raster pages via integrated optical recognition within its visual encoder.
How do you enforce exact page citations?
Include this directive: 'For every factual claim or metric extracted, cite the exact source PDF page number in parentheses'.