Skip to main content
Automation9 min read

Extract Data From PDFs With AI: What Works

September 7, 2026By Ajan Kanagalingam

Pulling numbers off invoices, statements and forms is one of the few AI use cases where the business case writes itself. It is also one where the demo and the deployment diverge sharply, and a benchmark called ExtractBench shows exactly where. Testing six frontier models on real business documents, the best result was 85.4 percent on one document type and zero on another. Same models, same day.

What the benchmark found

The ExtractBench paper evaluated six frontier models, Gemini 3 Pro and Flash, GPT-5 and GPT-5.2, and Claude Opus 4.5 and Sonnet 4.5, on 35 real business documents spanning credit agreements, research papers, resumes, sports records and SEC filings. Each document was sent through the model's native multimodal API with a zero-shot extraction prompt, and every field in the result was scored individually across 18,516 field evaluations.

Only 51 percent of the 210 extraction attempts produced valid JSON at all. The aggregate field-level pass rate was 4.6 percent, and the best model, Gemini 3 Flash, reached 6.9 percent overall. Those headline numbers are dominated by one domain, so they need unpacking before anyone quotes them.

Document typeFields requestedBest model pass rate
Credit agreements1385.4%
Research papers1647.9%
Resumes3120.7%
Sports records1218.3%
SEC 10-K / 10-Q3690%

The SEC filings account for 84 percent of all field evaluations in the study, which is why the aggregate looks catastrophic. Strip that domain out and the pass rate across everything else is 28 percent. Still not good enough to run unattended, and a very different picture from 4.6.

Breadth is the biggest factor, and not the only one

The authors name schema breadth as the dominant predictor of failure, and the 369-field collapse is the clearest evidence: no model produced valid output for any of the seven filings. Long field lists give the model more chances to break the output format, and one malformed field can invalidate an entire response.

The table above also shows breadth is not the whole story. Credit agreements at 13 fields scored 85.4 percent while sports records at 12 fields scored 18.3 percent. Similar breadth, very different results, which points at the documents themselves: layout, table structure, and how directly a value is stated all matter. Test on your documents, because a benchmark score on somebody else's tells you the shape of the problem rather than your number.

Structured output mode made it worse

This is the finding most likely to change what somebody does on Monday. Forcing the model into structured output mode, where the API constrains the response to match a schema, reduced both validity and accuracy compared with plain prompt-based extraction. Valid output fell from 51 percent to 37 percent. The best model's pass rate fell from 6.9 percent to 5.5. GPT-5 on credit agreements dropped from 86.9 percent to 70.0.

The authors suggest that holding a valid grammar state across thousands of tokens competes with the model's capacity to attend to the document content. Whatever the mechanism, the guaranteed-format setting cost real accuracy in their tests. If your pipeline turns it on by default because it feels safer, run both modes over fifty of your own documents and compare before deciding.

How to set the job up

1. Split wide schemas into passes. Ten to twenty fields per request, several requests over the same document, results merged afterwards. It costs more tokens and it is the single change most likely to move your accuracy.

2. Group fields that live together. Header details in one pass, line items in another, totals in a third. Fields that appear in the same region of a document are easier to get right together than a list assembled from across twelve pages.

3. Measure per field, not per document. A document that is 95 percent right is 100 percent wrong if the missing 5 percent is the invoice total. Score each field separately and know which ones fail.

4. Test on your awkward examples. The handwritten note in the margin, the scan someone photographed at an angle, the supplier whose format changed last year. Clean examples tell you nothing you did not already assume.

5. Keep a person on the numbers that matter. Extraction plus review still removes most of the typing, and it keeps someone accountable for figures that end up in your books. That design has held up well in the finance teams we work with, as covered in AI data entry for finance teams.

What this means for the business case

A vendor demonstrating extraction on a clean two-page invoice is showing you the credit agreement row of that table. Your business case should be built on the row your documents actually sit in, and you find that out by running fifty real ones through before signing anything.

The saving is still real. Reading and confirming a figure takes a fraction of the time that finding and typing it does, so even a pipeline that needs every field checked removes most of the work. Price the review step into the business case rather than assuming it away, and the numbers usually still hold up. Our ROI calculator handles that arithmetic, and data quality as the AI bottleneck covers what happens downstream when extracted values go into a system nobody checks.

ExtractBench itself is open, with the dataset, harness and methodology public, and LlamaIndex has since expanded it to 370 documents across 8 business domains and 67 document types with 14 systems evaluated. If document extraction is central to what you are building, it is worth running your own document types through the same harness rather than trusting a leaderboard. The invoice-specific case is covered in GST and HST invoice automation.

Frequently Asked Questions

How accurate is AI at extracting data from PDFs?

It varies enormously with the request. In the ExtractBench study, the best model scored 85.4 percent on a 13-field credit agreement schema and 0 percent on a 369-field financial reporting schema, with an aggregate field-level pass rate of 4.6 percent across all six models tested. The aggregate is dragged down by that one very wide schema, which accounted for 84 percent of the field evaluations. Read accuracy as a property of the specific document type and the specific request, not of the model.

Why does asking for more fields make extraction worse?

The ExtractBench authors identify schema breadth as the dominant predictor of failure, and on the widest schema tested, 369 fields, no model produced valid output for any document. Practically, a long field list gives the model more chances to break the output format, and a single malformed field can invalidate the whole response. Splitting a wide extraction into several narrower passes over the same document avoids most of that.

Does turning on structured output mode improve accuracy?

Not reliably. In the same study, forcing structured output reduced both validity and accuracy compared with prompt-based extraction: overall valid output fell from 51 percent to 37 percent, and the best model’s pass rate fell from 6.9 to 5.5 percent. GPT-5’s pass rate on credit agreements dropped from 86.9 to 70.0 percent. The authors suggest that maintaining a valid output grammar across thousands of tokens competes with the model’s capacity to attend to the document. Test both modes on your own documents rather than assuming the constrained one is safer.

Is AI extraction good enough to replace manual data entry?

For narrow, repetitive, well-structured documents it removes most of the typing while keeping a person on verification. For dense financial documents with hundreds of fields, current evidence says no. The practical design is extraction plus a review step, where the person checks rather than types. That still removes most of the time, and it keeps someone accountable for numbers that end up in your books.

What document types are hardest for AI to extract?

Tables that continue across pages, very large tables, tables nested inside cells, scanned documents and handwriting, and values that appear in one place and have to be reconciled against another. ExtractBench scores these separately so a low result can be traced to its cause. If your documents have those characteristics, budget more verification time and test on your genuinely awkward examples rather than clean ones.

Measure it on your documents, not a demo

We build and test document extraction pipelines for Canadian businesses, and report per-field accuracy on your own awkward examples before you commit to a vendor.

Related Articles

Automation

AI Inventory Management for Small Business: What Works

August 21, 2026Read more →
Automation

Only 2.6% of AI Agent Tools Finish a Whole Task

September 5, 2026Read more →
Automation

A Benchmark Asked AI Agents to Run a Shop

September 3, 2026Read more →
AK
Ajan Kanagalingam
Founder & ChatGPT Consultant, ChatGPT.ca

Ajan leads the ChatGPT.ca team: 200+ custom GPT builds and automation projects for 50+ businesses across 20+ industries. Based in Markham, Ontario. PIPEDA-compliant solutions.

Stay ahead of AI in Canada

Weekly case studies, new tools, and ROI playbooks for Canadian SMEs. One email, zero spam.