Introducing OCRia-1: SOTA 4B Model for Document Parsing ->

ExtractBench Pro: The Long Tail of Document Extraction

ExtractBench Pro: common patterns give way to exceptional cases in a dotted long-tail distribution.

7

Two months ago, we released ExtractBench to measure and improve schema-based document extraction. What we learned from it has accelerated our research: in the LlamaExtract v2.5 release, even our lowest-cost tier scores above 93% value F1.

But the benchmark also had blind spots. Some real customers brought complex documents and schemas that the original 370 ExtractBench documents never covered. This is the long tail of document extraction. It’s why extraction remains unsolved, even as scores on ExtractBench climb toward saturation.

Today we’re releasing ExtractBench Pro, an extension built from those real long-tail documents. It covers six new challenges, each drawn from ways that real customers broke our assumptions. In the samples below, you’ll find values that appear only in intricate charts, rules on one page that change the meaning of another, dense domain jargon, chaotic layouts, and more. Rigid pipelines struggle on ExtractBench Pro, but agentic systems with the right tools can adapt.

Synthesizing challenging documents

All of the pages you see above were generated from scratch by fully deterministic pipelines. From a single seed and configuration file, the pipelines combine synthetic contents with the formats and styles of real challenging documents sourced from across the web and from our customers. Synthesizing the data anonymizes the sources, while also ensuring high-quality ground-truth annotations that cover both value extraction and grounding.

This is similar to what we did for 45 of the 370 original ExtractBench documents. However, we have made huge leaps in the fidelity and diversity of our data transformations, in order to represent the breadth of challenges seen in long-tail data. The synthetic documents weave data dependencies across multiple pages, plot complex charts, and add perception challenges like photographs and multi-page tiling.

Config
Seed2113
ECG readout pipeline
"21:08""50 to 74""A"false120
Clean ecg readout layoutECG readout, actual dataset page 6
SchemaGround truth
{
  "doses": [
    {
      "tracing_time": string"21:08",
      "bpm_band": string"50 to 74",
      "qt_class": string"A",
      "withhold": booleanfalse,
      "permitted_mg": number120
    },
    ⋮
  ],
  ⋮
}
ECG readout, page 20ECG readout, page 19ECG readout, page 18ECG readout, page 17ECG readout, page 16ECG readout, page 15ECG readout, page 14ECG readout, page 13ECG readout, page 12ECG readout, page 11ECG readout, page 10ECG readout, page 9ECG readout, page 8ECG readout, page 7ECG readout, page 6ECG readout, page 5ECG readout, page 4ECG readout, page 3ECG readout, page 2ECG readout, page 1

Using diverse configurations, all 100 documents in ExtractBench Pro are synthesized this way. The resulting dataset is split into six main challenges, featuring difficult layouts and formats which require frontier-level intelligence, multi-step reasoning, and efficient tool use to resolve.

Interpretation rules

In this task challenge, one part of a document contains information like legends or rules that affect how the rest of the document must be interpreted. The information could clarify how symbols, units, or amendments must be handled. Or, it can introduce filtering criteria so that only certain rows of a table are correct to extract. Document length increases the difficulty of this challenge, since finding the relevant information (especially when the extractor doesn’t know if it exists at all) is a needle-in-a-haystack problem.

holdings[14].value
What is the recorded value of AVELING POWER S A, in the report’s own unit?
Page 5
holdings[14].value: What is the recorded value of AVELING POWER S A, in the report’s own unit?253032
181,170
Original filing
164,865
Amendment No. 3
164,865
Value (× $1,000)
Restatement replacesearlier tables
holdings[14].value
What is the recorded value of AVELING POWER S A, in the report’s own unit?

Custom terminology

Commercial systems are trained on enormous aggregations of public data, and (hopefully) not your organization’s internal documents. When encountering your internal jargon, it is important to seek out your specific definitions (what counts as “bulk”?) and not jump to conclusions. On ExtractBench Pro documents, understanding internal terminology can completely flip what the extractions should be.

bookings[17].category
Category of Keelson Title & Escrow’s booking.
Page 9
bookings[17].categoryBooking RB-118 uses a Gift form for 30 client rooms. Rule C.2 classifies company bookings of eleven or more client reservations as hosted regardless of booking form. The extracted category is business-bought.922
Gift
Booking form
30 clients
Company booking
11+ client reservationscount as hosted
business-bought
bookings[17].category
Category of Keelson Title & Escrow’s booking.

Conditional aggregation

Classically, extract is expected to focus on values that literally appear in the document, but customers sometimes expect us to return values derived by aggregating multiple pieces of information. Fulfilling that requires an agent to read definitions from the schema and document, and use them to compute counts and sums.

weeks[0].other_points
How many other points count in broadcast week BW16?
Page 2
weeks[0].other_points: How many other points count in broadcast week BW16?2789
192
Active house spots, after caps
62
Sub-channel points
254
Other points
Apply caps
Measured only
House + sub-channel= other points
weeks[0].other_points
How many other points count in broadcast week BW16?

Relational diagrams

Many real-world documents rely on diagrams. They can convey organizational structures, procedures, electrical circuits, and other relational data in a visual manner that works for humans. However, this makes the same documents difficult for classical LLMs specialized in OCR and text. ExtractBench Pro contains relational diagrams where all or part of an extracted value depends on a line rather than a literal value. These relations can form part of a multi-step reasoning chain — the longer the chain, the easier it is for even the smartest agents to overlook a chart.

dmas[10].customers
How many billing accounts does DMA-383 serve during the audit?
Page 14
dmas[10].customers: How many billing accounts does DMA-383 serve during the audit?31014
BV-5646 opened
BV-8138 closed
Z229 → DMA-383
56
Z147
51
Z229
152
Z237
208
Z529
212
Z746
679
DMA-383 accounts
Use operated valves
++++=
dmas[10].customers
How many billing accounts does DMA-383 serve during the audit?

Charts and maps

Similar to relational charts, graphs can visually convey a dense time series in a human-friendly way. Not only is this harder for LLMs to read, but these documents also rely on precise vision to resolve fine lines and intersection points. To make this work in ExtractBench’s data format, our schema breaks up continuous scales into a set of ranges, aligned with the axis tick marks, and asks the extractor to predict which range the value lies in at a given point. Some extractors get confused by their bias towards written text placed elsewhere.

assemblies.bha_1.vibration_feet
How many feet did BHA 1 drill above its lateral shock limit?
Page 7
assemblies.bha_1.vibration_feet: How many feet did BHA 1 drill above its lateral shock limit?78916
Class A
15 g
19 cells
Page 8
16 cells
Page 9
350 ft
(19 + 16) × 10 ft
Count 10 ft cellsabove the class A limit
assemblies.bha_1.vibration_feet
How many feet did BHA 1 drill above its lateral shock limit?

Long single pages

Vision models depend on their inputs to be within a certain range of acceptable aspect ratios. Vertical data series like well logs and time-location charts can break that expectation by cramming all of that data into a single extremely long and narrow page. Our schemas for these documents can ask for values at hundreds of points, requiring an extractor to strategically locate and extract each value as efficiently as possible.

gr.at_11262_ft
What is the gamma-ray reading at 11,262 ft?
Page 1
gr.at_11262_ft: What is the gamma-ray reading at 11,262 ft?1
60 to 75
at 11,262 ft
210 to 225 API
Use the backup scale+ 150 API
gr.at_11262_ft
What is the gamma-ray reading at 11,262 ft?

Results

We tested twelve systems on ExtractBench Pro: four extraction APIs, five coding agents, and the latest releases of our three tiers of LlamaExtract (Cost-Effective, Agentic, and Agentic Plus). Consistent with the original ExtractBench, there is a 30-minute time limit per document. A document that fails or exceeds that limit gets Value and Grounded F1 scores of 0.

During our analysis, we find that many documents experience a bimodal distribution of Value F1. One cluster of extractors is near 100%, while another cluster of extractors has much lower scores on the same document. This gives an important hint about how researchers should think about hill-climbing on ExtractBench Pro: a document is hard until it isn’t. How much lower the failed extractors score, depends on the proportion of fields in the document which relate to the challenge that failed. Therefore, to fairly measure the proportion of challenges passed, we add a new metric to ExtractBench: the proportion of documents with perfect (100%) Value F1.

0204060801000.2¢0.5¢1¢2¢5¢10¢20¢50¢100¢Cost per page (USD)Agentic PlusAgenticCost EffectiveCodex AstraClaude Code OpusClaude Code SonnetCodex SolCodex LunaExtendPulseReductoDatalab
0204060801000.2¢1¢5¢20¢100¢Cost per page (USD)Agentic PlusAgenticCost EffectiveAstraOpusSonnetSolLunaExtendPulseReductoDatalab
  • LlamaExtract
  • Coding agents
  • Extraction APIs
  • 30-minute limit
  • Without the limit

Here’s what the results tell us:

  • The long tail is really hard. Compared to ExtractBench, LlamaExtract extractors drop by 18.5 to 47.0 percentage points of Value F1, and 22.9 to 30.4 percentage points of Grounded F1. Some extractors get zero documents perfect on ExtractBench Pro.
  • LlamaExtract is the frontier at low costs. Below 25 cents per page, our tiers form the overall cost-performance frontier for perfect documents, Value F1, and Grounded F1. Only at much higher costs are we overtaken by the most expensive coding agents. Nevertheless, we have huge room to improve on relational diagrams and long single pages.
  • Coding agents are strong but expensive. They achieve the highest Value F1 and Grounded F1 on ExtractBench Pro, and our frontier plot shows why — coding agents burn tokens at per-page rates (Opus at 41 cents, Astra at 95 cents) that would break the budgets of most real document extraction customers, and Claude specifically often takes longer than the 30-minute time limit to do so.
  • Being good at value extraction doesn’t make you automatically good at grounding. LlamaExtract is generally good at both. Meanwhile, some coding agents and extraction APIs drop off dramatically when comparing their Value F1 to the stricter Grounded F1 metric, which requires them to correctly cite where in the document they got their extraction.

But most of all, we see the big picture: the more resources, versatile tools, and general intelligence you give a system, the better it adapts to the long tail of document extraction. We look forward to adopting that lesson, to make our next generation of LlamaExtract even better.

Get ExtractBench Pro

ExtractBench Pro is released today on the same channels as ExtractBench: the dataset, code and paper. Run your extractor on it and tell us about your progress on long-tail document extraction!

Download ExtractBench Pro

Get all 100 documents, extraction schemas, and ground truth.

Terminal

git clone https://github.com/run-llama/ExtractBench
cd ExtractBench
uv sync
uv run extract-bench download --dataset pro
uv run extract-bench status --dataset pro

Related articles

Keep Reading

Start building your first document agent today

LlamaIndex gets you from raw data to real automation — fast.