How to Analyze Long PDFs with Gemini 3
Dropping a 300-page PDF into Gemini 3 and asking questions sounds trivial. Getting answers you can trust requires a specific prompt pattern, because models quietly lose accuracy in the middle of huge contexts.
Short answer: upload the PDF via the Files API, ask for page-referenced answers, and split anything above 400 pages into two parts. Gemini 3 handles native PDFs including scanned pages via OCR, up to roughly 1,000 pages within its 1M token window.
Why not just paste the PDF text?
Pasted text loses layout, tables, and page numbers — exactly the anchors you need to verify a claim. The Files API keeps the document structure and lets you reference pages.
Gemini 3 reads native PDFs directly, including image-only scans, at about 258 tokens per page. A 500-page report is therefore around 129,000 input tokens, well inside the 1M window.
How do you upload and query a PDF with Gemini 3?
- Upload once with the Files API, then reuse the file reference across queries so you are not re-uploading 50MB each time.
- Ask a scoped question, not “summarize this.”
- Require page citations in every answer so you can spot-check.
- Set temperature to 0.2 for extraction tasks where you want consistency.
f = client.files.upload(file="report.pdf")
resp = client.models.generate_content(
model="gemini-3-pro",
contents=[f, "List every revenue figure by region, with page numbers."]
)
How do you prompt for answers you can check?
Vague prompts produce vague answers. Ask for structure and evidence instead.
| Weak prompt | Better prompt |
|---|---|
| Summarize this | Give 5 bullet findings with page cites |
| What are the risks? | Quote the risk section verbatim, page by page |
| Find the numbers | Return a table: metric, value, page |
Always ask for a page number. When you spot-check three of them, you quickly learn whether the model is actually reading or guessing.
What breaks on very long documents?
Three things. First, the first-token latency grows to 20 to 40 seconds on a 500-page upload, so interactive chat feels sluggish. Second, recall drops for details buried past the halfway point — test with a fact you know is on page 400. Third, tables that span pages sometimes get merged incorrectly.
Mitigation: for documents over 400 pages, split into two chunks, ask the same question of each, then reconcile. It costs one extra call and catches most misses.
When is Gemini 3 the wrong tool for PDFs?
If you process thousands of invoices daily, a dedicated OCR pipeline with a small model is cheaper and more predictable. Gemini 3 shines on analysis of one or a few complex documents, not high-volume form extraction.
Its 1M context and native PDF support make it the strongest free option for legal, academic, and policy review — as long as you verify citations rather than trusting them.
Quick Summary
- Gemini 3 reads native PDFs, including scanned pages, at about 258 tokens per page.
- Use the Files API and reference the file across queries instead of re-uploading.
- Always request page citations so you can spot-check accuracy.
- Quality drops for details in the middle of very long contexts — split past 400 pages.
- For high-volume extraction, a dedicated OCR pipeline beats a frontier model on cost.
