Match usage to ExtractBench
Browse files101 unmodified lines102103104105105106107108109110111112113114115116117118119108109120121122123112124125126127128129130131132119133134135136101 unmodified lines
## Usage
Download the dataset and run a system with the [ExtractBench evaluation framework](https://github.com/run-llama/ExtractBench#extractbench-pro):Load a split with `datasets`:
```pythonfrom datasets import load_datasetimport json
ds = load_dataset("llamaindex/ExtractBenchPro", split="charts_inside_documents")case = ds[0]schema = json.loads(case["data_schema"])expected = json.loads(case["expected_output"])```
To run an extraction system, download the files in the layout expected by the [evaluation framework](https://github.com/run-llama/ExtractBench), then run a pipeline:
```bashuv run extract-bench download --dataset prouv run extract-bench run llamaextract_agentic --dataset prouv run extract-bench download --dataset pro # data-pro/<split>/<doc>.pdf + <doc>.test.jsonuv run extract-bench run llamaextract_agentic --dataset pro # inference -> evaluation -> reports```
Scoring follows ExtractBench and is fully deterministic:ExtractBench Pro is scored the same way as ExtractBench. Value accuracy asks whether a system returned the right values, and is scored with unified value F1 on every document. Grounding asks whether the system can show where each value came from, and is scored only on the 81 documents with box ground truth.
- **Unified value F1:** whether the extracted values match the expected output, under one definition for scalar fields and arrays of records.- **Perfect documents:** the share of documents with a unified value F1 of 100%.- **Word-level grounding F1:** a field counts as grounded only when its value is correct and its predicted box overlaps an accepted box for that field at IoU 0.5.- **Page-level grounding F1:** requires the correct source page rather than a box.
Scoring is fully deterministic: the same predictions and ground truth always produce the same score, with no model in the loop. The [code repository](https://github.com/run-llama/ExtractBench) contains the full metric definitions.
The evaluation dataset files are:The evaluation dataset files include:
- [document_conventions.jsonl](document_conventions.jsonl): 22 test cases across 875 pages- [house_vocabulary.jsonl](house_vocabulary.jsonl): 14 test cases across 606 pagesREADME.md+19-5