ExtractBench Grades the Extraction Nobody Checks

LlamaIndex's schema-guided benchmark scores completeness, traceability, and cost across 370 enterprise documents. Its real subject is how easily a leaderboard can lie.

9 min read • View on GitHub • More from Nikit117

A wide editorial illustration of a vast archive hall with shelves receding into crosshatched darkness, stacked with invoices, schedules, and forms. A single line item on a floating invoice is pulled taut by one straight thread that runs back through the stacks to a circled page on a specific shelf, illustrating completeness and source traceability.
Completeness is the line item that came back. Traceability is the thread that ties it to a page. ExtractBench scores both, which is why it looks more like an audit than a quiz.
Key Takeaways

A Wrong Payment Is an Extraction Bug

Enterprises write a new JSON Schema for nearly every workflow. There is no fixed template to tune against, because the template is invented per job. An invoice, an RFQ, a schedule, a compliance form: each one asks a different set of questions, and the answers land in a downstream system that acts on them.

That is the stakes. Agents act on extracted values before a human reviews them. A truncated list of line items, or a single invented value for a field that was actually blank, becomes a wrong payment, a wrong bid, a wrong filing. The failure is not that the model misread a digit. The failure is that it returned a confident subset and nobody noticed the missing rows.

The ExtractBench README states the problem in one line, and it is worth quoting exactly:

So the benchmark does not ask whether a model got the easy fields right. It asks whether every repeated record came back, whether missing fields were marked null instead of guessed, and whether each value can be traced to a source.

The Adapter Bug That Moved a Vendor 30 Points

Here is the fact that reframes the whole project. Datalab, a document-extraction company, published an account of its own ExtractBench result. Its adapter failed to strip the _meta confidence and citation fields from its output before scoring. The scorer read those sidecars as incorrect extra values and penalized them.

Correcting the adapter changed Datalab's reported result from 64.5% to approximately 94%. A 30-point swing, caused entirely by how a normalization step handled metadata. The model did not change. The prompt did not change. The scoring surface did.

The benchmark shipped with major scoring bugs.

Datalab, Document-extraction company commenting on its ExtractBench score · Datalab on the ExtractBench scoring bug

Treat this as one vendor's account, not an adjudicated finding. Datalab's own post cautions that extraction varies between runs. But the shape of the claim is the point, and it generalizes past Datalab: in extraction, the evaluator is as fragile as the system under evaluation. A leaderboard row is a claim about a pipeline, and the normalization stage is part of that pipeline.

This is why the rest of the article is about design decisions rather than model names. ExtractBench is unusual because it appears to have anticipated this fragility and built it into its assumptions.

Four Things ExtractBench Actually Scores

Strip away the marketing and the scoring obligations reduce to four. They are the differentiator, and none of them is plain accuracy.

The instinct is to read "extraction benchmark" as a field-accuracy test. It is closer to an audit. Accuracy is assumed; the scoring lives in whether the system returned the whole record set, resisted filling gaps, and kept a thread back to the page.

ExtractBench is an open benchmark: the dataset, eval harness, and methodology are all public and reproducible.

LlamaIndex, Publisher of ExtractBench · LlamaIndex on ExtractBench

Per the README, the dataset covers 370 documents, 4,869 pages, 8 business domains, and 67 document types, each with its own schema. Each document is tagged on five independent axes (task challenge, perception challenge, table structure, length, and business domain) so that a low score can be traced to a cause instead of just recorded.

How a Provider Earns a Score

Every system that wants a score implements the same two-method contract. It is the central architectural split in the codebase.

class Provider(ABC):
    @abstractmethod
    def run_inference(self, pipeline, request) -> RawInferenceResult: ...

    @abstractmethod
    def normalize(self, raw_result) -> InferenceResult: ...

run_inference only fetches. It calls the vendor's API and returns a RawInferenceResult, unnormalized and provider-specific. That raw result can carry sidecars, confidence scores, and citation objects that the vendor needs but the scorer does not.

normalize converts that raw output into a canonical ExtractOutput. This is the step Datalab's bug lived in. And because the harness persists both forms, a corrected normalize can re-score the same run without calling any API again. Scoring logic can change for free.

Run end to end, the pipeline is inference, then evaluation, then report, then an HTML dashboard in a browser. The runner handles concurrency (default 20 parallel jobs), a 30-minute per-file timeout for the long agentic extractions, and exponential backoff (2s, 4s, 8s, 16s, 32s) on rate limits. Its error taxonomy separates the cases that matter: ProviderRateLimitError, ProviderTransientError, ProviderPermanentError, and ProviderTerminalCheckpointError. The last one exists so a downstream harness can tell the difference between "retry this job" and "this remote job is dead."

The raw/normalized split is why ExtractBench is a working tool and not a one-shot leaderboard. Raw provider output is persisted, so a corrected normalize step re-scores the same run without paying for the API twice.

Failure Cannot Hide

The cleverest engineering in the repository is not in the scoring. It is in making failure visible.

Consider how a naive leaderboard discovers which categories to report. It reads the result files. That means a category where every single document errored writes no result file at all. It never becomes a group. It drops off the board as "no data" instead of showing up as a zero.

ExtractBench treats the dataset directory as the authority on which groups should exist. If a whole category fails, it still appears, scored at zero. The code comment names the perverse incentive this removes: results-only discovery "rewards failing a whole category over failing most of one." A system that returns nothing for a category is not silently excused.

A close-up black ink illustration of two hands holding the same invoice twice. The left copy has a printed header reading acme_invoice_2024.pdf; the right copy is identical except the header reads document_a3f9c1e07b42d8. A single scanning lens between them looks at both, showing that identical content arrives under a meaningless name.
Identical content, meaningless name. Randomizing the external filename stops a hosted service from keying its behavior on documents it has seen before, and stops an agent from reading the answer off the header.

The second anti-contamination measure is filename randomization. A file named acme_invoice_2024.pdf tells the model what the document is, and a hosted service could learn to recognize names it has seen in a published benchmark. So most providers receive the same bytes under a random basename: a 16-character hexadecimal token plus a stem drawn from a fixed list (document, file, input, pages, record, report, scan, upload), in one of four patterns. The helper uses Python's secrets module rather than random, a deliberate choice even though the purpose is not cryptographic.

There is an asymmetry worth flagging. Providers whose names begin with llamaparse, llamaextract, or llamasplit are exempt and receive the original filename. First-party providers keep the real names. The benchmark documents this rather than hiding it, but a reader should know it exists.

Who Referees the Referee

Now the uncomfortable part. ExtractBench is published by LlamaIndex, and LlamaExtract variants hold the top slots on its own Overall leaderboard. Per the README, that is the ranking. The publisher is also the top-ranked vendor.

This is not a disqualifier, but it is a caveat that any honest reading has to carry. The mitigating factors are real: the dataset, harness, and methodology are public, runs are reproducible, and the per-axis breakdowns let a reader check whether a high overall score comes from the completeness axis or from an easy document mix. The format is a leaderboard, and leaderboards published by participants have a long history. The defense is transparency, not neutrality.

The practical advice follows from that. Read the per-axis results, not the headline rank. If you are choosing a vendor, run the harness yourself on your own documents with your own schemas. The raw/normalized split means a full re-score is cheap once the inference is paid for.

Where ExtractBench Sits

ExtractBench is not the first extraction benchmark. It is the first to make the schema itself a variable. Prior benchmarks fixed the target fields in advance, which let systems tune to a known template. That is the axis that separates them.

BenchmarkTask shapeScoring focusNotes
ExtractBenchUser-defined JSON Schema per document, 370 documents, 4,869 pages, 67 typesSchema validity, completeness on repeated records, null discipline, source evidence, costPublished by LlamaIndex; LlamaExtract tops the board
ExtractBench ProSame task, 100 documents, 2,622 pages, 86 typesAdds chart and drawing interpretation, counting under house rules, specialized vocabularyHarder companion set, synthetic long-tail documents
SROIEReceipt key-information extractionFixed target fieldsNarrower, receipt-specific
DocILEBusiness document localization and extractionTask-specific, line-item orientedNot schema-at-inference-time
RealKIEReal-world key-information extractionFixed extraction targetsNamed as a precursor by ExtractBench's authors

The difference is not "more documents." It is that the schema is chosen at inference time by the user, not baked into the benchmark. A system cannot memorize the answer key because there is no fixed answer key, only a schema handed in with each document.

The Pro edition pushes further into the long tail: charts, drawings, counting rules, and specialized vocabulary, all things a fixed-field benchmark never had to confront. The same pipeline serves both datasets, which is why the harness has a dataset switch rather than two separate code paths.

One more note on reading the board. Systems on it are configurations, not raw models. A harness that parses a document once and gives the model tools to read it selectively can outscore the model it is built on. That is a statement about orchestration and normalization as much as about the model, which is exactly the lesson the Datalab bug taught from the other direction.