Introducing Extract v2.5: Next-Gen Document Extraction Agents ->

ExtractBench Pro: The Long Tail of Document Extraction

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

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
Seed 2113
ECG readout pipeline
"21:08" "50 to 74" "A" false 120
Clean ecg readout layout ECG readout, actual dataset page 6
Schema Ground 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.

Document conventions

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.

What is the recorded value of AVELING POWER S A, in the report’s own unit?
What is the recorded value of AVELING POWER S A, in the report’s own unit?The original filing lists 181,170. Amendment No. 3 is marked as a restatement and lists 164,865. Note 2 says a restatement replaces the earlier information table, so the holding of record is 164,865 in the report’s unit. Page 5 Page 32 Page 30 Page 2
181,170
Original filing
164,865
Amendment No. 3
Restatement replacesearlier tables
164,865
Value (× $1,000)

House vocabulary

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.

How should Keelson Title & Escrow’s booking be classified?
How should Keelson Title & Escrow’s booking be classified? Booking 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. Page 9 Page 22
Gift
30 clients
Booking form Company booking
11+ client reservationscount as hosted
business-bought

House counting rules

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.

How many weeks fall short of the points required for the full rate?
How many weeks fall short of the points required for the full rate?The traffic desk excludes spots at least 61 minutes late, and all late sponsored spots. After applying all counting rules, the six weekly totals are 1,828, 1,860, 1,901, 2,115, 1,986 and 1,997. Only the first two are below the printed 1,880-point weekly guarantee. Page 14 Page 16 Page 11
Exclude 61+ minutes;no late sponsored spots
Computed totals after all counting rules BW16
1,828
BW17
1,860
BW18
1,901
BW19
2,115
BW20
1,986
BW21
1,997
Count weeks below 1,880
2
weeks

Drawn relations

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.

How many billing accounts does DMA-383 serve during the audit?
How many billing accounts does DMA-383 serve during the audit? The operations record opens BV-5646 and closes BV-8138. Z229 therefore joins DMA-383. Its 51 accounts add to the 628 accounts in the other connected zones, giving 679. Page 14 Network schematic: billing zone Z229 at the bottom left has two lines. One rises through valve BV-8138, drawn hollow (open), to the DMA-300 Stonebridge main; the other through valve BV-5646, drawn solid and marked N.C., to the DMA-383 Westcroft main. The lines hop over dozens of crossings. Page 10 Valve operations record: this record and the schematic are read together, and valve positions are as left at the end of each job. JOB-6685 on 24 Feb 2026 opened BV-5646 and closed BV-8138. Page 3 Billing summary table with neighboring rows: Z229 has 51 accounts.
Use operated valves
Z229 → DMA-383
51
Z229 accounts +
628
Other connected zones
679
DMA-383 accounts

Charts inside documents

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.

How many feet did BHA 1 drill above its lateral shock limit?
How many feet did BHA 1 drill above its lateral shock limit? BHA 1 is class A and runs from 3,100 to 3,730 ft. Its lateral shock limit is 15 g. The two log sheets contain 19 and 16 ten-foot cells above that limit: 350 ft in total. Page 7 BHA 1: depth in 3,100 ft, depth out 3,730 ft, tool class A. Page 16 Tool limits: class A lateral shock limit is 15 g. Page 16 Exposure is footage drilled while lateral shock is above the tool limit. Each 10 ft cell above it counts in full. Page 8 Lateral shock sheet 1: 19 ten-foot cells above 15 g. Page 9 Lateral shock sheet 2, restricted to the rest of BHA 1: 16 ten-foot cells above 15 g.
Class A
15 g
3,100 to 3,730 ft
Count 10 ft cellsabove the class A limit
15 g 15 g
19 cells
16 cells
(19 + 16) × 10 ft
350 ft

Long chart sheets

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.

What is the gamma-ray reading at 11,262 ft?
What is the gamma-ray reading at 11,262 ft? The solid gamma-ray curve has wrapped past 150 API and resumed from the left of the track. At 11,262 ft it is between 60 and 75 on the printed grid. Using the backup scale adds 150 API, giving 210 to 225 API. Page 1 Remarks: when gamma ray exceeds 150 API, the trace leaves the right edge and continues from the left using the backup scale, 150 to 300 API. Track 1 headings: gamma ray 0 to 150 API and backup 150 to 300 API. The solid gamma-ray trace wraps from the right edge to the left before 11,262 ft. At the requested depth it lies between 60 and 75 on the printed grid. 11,262 ft 6075
60 to 75
Position on the 0–150 grid
Use the backup scale
+ 150 API
210 to 225 API

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.

0 20 40 60 80 100 0.2¢ 0.5¢ 1¢ 2¢ 5¢ 10¢ 20¢ 50¢ 100¢ Cost per page (USD) Agentic Plus Agentic Cost Effective Codex Astra Claude Code Opus Claude Code Sonnet Codex Sol Codex Luna Extend Pulse Reducto Datalab
0 20 40 60 80 100 0.2¢ 1¢ 5¢ 20¢ 100¢ Cost per page (USD) Agentic Plus Agentic Cost Effective Astra Opus Sonnet Sol Luna Extend Pulse Reducto Datalab
  • 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 drawn relations and long chart sheets.
  • 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!

Put extraction to the test

Try Extract on your documents

Use ExtractBench Pro to compare systems, then evaluate Extract on the documents and schemas your workflow depends on. Start with a sample invoice using the Python example below, with citations and confidence scores enabled.

Try Extract (opens in a new tab)

Python SDK

python -m pip install -U llama-cloud

Run the example and enter your API key when prompted. It downloads the sample PDF for you.

try_extract.py

from getpass import getpass
import httpx
from llama_cloud import LlamaCloud
from pydantic import BaseModel

class Invoice(BaseModel):
    total_amount: float

client = LlamaCloud(api_key=getpass("LlamaCloud API key: "))
sample_url = (
    "https://huggingface.co/datasets/llamaindex/ExtractBench/"
    "resolve/f6180e917a050a84582e6366cff85b7dc1e84e58/"
    "docs/short/aclu_cdwg_invoice.pdf"
)
pdf = httpx.get(sample_url, follow_redirects=True, timeout=60)
pdf.raise_for_status()
file = client.files.create(
    file=("invoice.pdf", pdf.content, "application/pdf"),
    purpose="extract",
)
job = client.extract.run(
    file_input=file.id,
    configuration={
        "tier": "agentic",
        "version": "2.5",
        "extraction_target": "per_doc",
        "data_schema": Invoice.model_json_schema(),
        "confidence_scores": True,
        "cite_sources": True,
    },
)
result = client.extract.get(job.id, expand=["extract_metadata"])
print(result.extract_result)
print(result.extract_metadata.field_metadata.document_metadata)

Related articles

Keep Reading

Start building your first document agent today

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