File size: 17,856 Bytes
3abeb7b 051af9d 3abeb7b c0d33ba 3abeb7b fef5a26 3abeb7b 5db8e70 abec1b1 3abeb7b abec1b1 3abeb7b 72cea64 3abeb7b 72cea64 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b 051af9d 3abeb7b 051af9d 3abeb7b 72cea64 3abeb7b 72cea64 3abeb7b c0d33ba 3abeb7b abec1b1 3abeb7b 051af9d c0d33ba 051af9d abec1b1 051af9d 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b abec1b1 3abeb7b 051af9d 3abeb7b c0d33ba 051af9d 3abeb7b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | ---
pretty_name: LongListBench
language:
- en
license: mit
tags:
- document-extraction
- benchmark
- synthetic
- pdf
- ocr
- document-ai
- information-extraction
- structured-extraction
- long-list-extraction
- long-array
- long-range-evidence
- insurance
- trucking
size_categories:
- n<1K
configs:
- config_name: core_operations
data_files:
- split: test
path: data/core_operations/test-*.parquet
- config_name: claim_multihop
data_files:
- split: test
path: data/claim_multihop/test-*.parquet
- config_name: policy_packets
data_files:
- split: test
path: data/policy_packets/test-*.parquet
---
# LongListBench
[GitHub](https://github.com/kaydotai/longlistbench) | [Release v2.2.0](https://github.com/kaydotai/longlistbench/releases/tag/v2.2.0)
**Developed by [Kay.ai](https://kay.ai).**
**Authors:** [Anton Fedoruk](https://orcid.org/0009-0004-0260-1704), [Serhii Shchoholiev](https://orcid.org/0009-0007-2014-4828), and [Akhil Mehta](https://orcid.org/0009-0001-0134-2905)
Long-list extraction is not complete when most fields are right: an omitted, merged, or invented row can invalidate the document-level result. Across the 4 released agent runs, field micro-F1 ranges from 96.1% to 98.8%, but only 4-7 of 32 documents are complete.
LongListBench measures this failure mode in insurance and commercial trucking PDFs. A system receives one PDF or OCR transcript and a target contract, then returns the full target list. The release contains 32 synthetic PDFs and 29,599 target records; no real customer PII is included.
`core_operations` tests scale and output completeness. `claim_multihop` and `policy_packets` add inherited context, distant evidence, and mixed record schemas.
## Complexity Stressors
Each PDF records its extraction stressors under `stressors`:
| Tag | Meaning |
|---|---|
| `page_breaks` | Lists or supporting evidence continue across pages with repeated headers or inherited context. |
| `split_records` | One target record has fields in separate visual blocks, sections, or pages and must be assembled. |
| `multi_row` | Records include wrapped notes, descriptions, clauses, or continuation rows. |
| `duplicates` | Prior-term, archived, duplicate, or near-duplicate distractor material is present. |
| `large_doc` | The document is long enough to stress truncation and record-completeness behavior. |
| `multiple_tables` | Target rows are mixed with summaries, ledgers, schedules, support tables, or empty tables. |
| `multi_column` | Pages use two-column or form-like layouts that stress reading order. |
| `merged_cells` | Tables include section-spanning or merged-cell structures. |
| `ocr_condition` | The released text condition is OCR from rendered page images. |
| `ocr_layout_condition` | OCR preserves visual spacing and reading order instead of converting tables into clean CSV-style rows. |
| `long_range_evidence` | Fields must be joined from distant sections of one PDF. |
| `cross_section_join` | A target record must be assembled from separately labeled sections, such as return summary, distance/gallon schedules, and liability schedules. |
| `repeated_keys` | Common keys such as states or jurisdictions repeat across sections or returns, so the key alone is insufficient for matching. |
| `heterogeneous_record_list` | A target list contains several record schemas, especially in policy packets. |
These 14 tags are canonical. The release also retains finer audit tags, for 45 distinct `stressors` tokens in total. Labels are metadata, not text printed inside the PDFs.
The following families make the tags easy to inspect in the PDFs:
| Family or config | Stressors visible in the document |
|---|---|
| `ifta_mileage_by_vehicle` | Jurisdiction rows inherit unit headers while source notes interrupt page-spanning tables. |
| `ifta_multisection_return_packet` | Return headers and separate distance, fuel, and tax sections must be joined across pages; OCR preserves layout rather than clean rows. |
| `loss_run_external` | Claim rows are interleaved with descriptions, continuation notes, summaries, and empty-table distractors. |
| `claim_multihop` | Claim schedules are separated from supporting policy, driver, claimant, cause-code, and ledger sections. |
| `policy_packets` | The target mixes declarations, schedules, forms, endorsements, premiums, and clause prose. |
## Configs and Data Viewer
| Config | Description | Target field | Documents | Records/doc range | Target records | Page range |
|---|---|---|---:|---:|---:|---:|
| `core_operations` | 26 production-like commercial insurance and trucking PDFs with dense repeated operations, IFTA, and loss-run records. | `records` | 26 | 260-2,571 | 28,178 | 17-84 |
| `claim_multihop` | 3 long claim PDFs where incident records must be assembled from distant sections. | `incidents` | 3 | 12-40 | 77 | 61-148 |
| `policy_packets` | 3 long Businessowners, Workers Compensation, and Commercial General Liability policy packets where records must be assembled from distant sections. | `records` | 3 | 344-562 | 1,344 | 99-133 |
Pick one config when loading:
```python
from datasets import load_dataset
ds = load_dataset("kaydotai/LongListBench", "core_operations", split="test")
# or "claim_multihop", or "policy_packets"
print(ds) # each row is one PDF document
```
## Columns
| Column | Type | Description |
|---|---|---|
| `document_id` | string | Stable sample identifier, e.g. `ifta_mileage_by_vehicle_001` or `multihop_bop_012_001`. |
| `complexity_regime` | string | Document family, such as `ifta_mileage_by_vehicle`, `loss_run_external`, `claim_crosspage_multihop`, or `policy_multi_hop`. |
| `evaluation_role` | string | Preassigned interpretation role: `scale_control` or `structural_challenge`. |
| `num_pages` | int32 | Page count recorded by the generator. |
| `target_field` | string | Name of the top-level list to extract: `incidents` for claim multi-hop rows, `records` for operations, external loss-run, and policy rows. |
| `target_record_type` | string | Primary schema family, such as `vehicle_state_mileage_row`, `driver_record`, `loss_run_claim_row`, or `policy_packet_item`. |
| `target_count` | int32 | Number of target records in `ground_truth`. |
| `stressors` | list[string] | Stressor tags for the document, e.g. `high_density_long_list`, `production_like_layout`, or `long_range_evidence`. |
| `pdf` | Pdf | Embedded source PDF bytes. |
| `ground_truth` | string | JSON string containing the expected records under `target_field`. |
| `metadata` | string | JSON string with manifest metadata, file hashes, evidence maps, generation details, and source artifact paths. |
| `ocr_transcript` | string | OCR transcript generated from rendered PDF page images. |
`ground_truth` is the complete schema-shaped object for the extraction target. Claim multi-hop rows use `{"incidents": [...]}`; all other list families use `{"records": [...]}`.
Manifest fields not exposed as columns, such as the domain, rendered layout format, and available transcript conditions, remain available under `metadata.manifest_instance`. The `stressors` column is stored as `problems` in the manifest.
## Usage
```python
import json
from datasets import load_dataset
from datasets import Pdf
ds = load_dataset("kaydotai/LongListBench", "claim_multihop", split="test")
# The Pdf feature may decode through pdfplumber on access. Disable decoding
# when you only need bytes, transcripts, or ground truth.
ds = ds.cast_column("pdf", Pdf(decode=False))
row = ds[0]
gt = json.loads(row["ground_truth"])
records = gt[row["target_field"]]
assert len(records) == row["target_count"]
with open(f"{row['document_id']}.pdf", "wb") as f:
f.write(row["pdf"]["bytes"])
```
## Canonical Scoring
The tagged [reference evaluator](https://github.com/kaydotai/longlistbench/blob/v2.2.0/benchmarks/evaluation_metrics.py) defines official scoring. Strict normalized-record completeness is primary; field overlap is a secondary diagnostic.
### Method
1. Run the extractor on each PDF or transcript and return an object matching `ground_truth`: `{"incidents": [...]}` for claim multi-hop rows or `{"records": [...]}` for other families. The evaluator also accepts a bare list.
2. Claim incidents are keyed by normalized `incident_number`. Strings, dates, claimant lists, and non-zero financial breakdowns use documented canonical forms.
3. Other records normalize case, whitespace, dates, numeric formatting, accounting negatives, and documented label equivalents. Exact records are anchored before field-overlap matching; strict comparison still uses every public target field.
4. Exact-record recall is `exact_record_matches / ground_truth_count`. A document is complete only when the predicted and gold record multisets are identical, including duplicates and with no extra records. Record order is not scored.
5. Field recall and precision compare flattened field-value pairs; F1 is their harmonic mean. Document-macro and corpus-micro field F1 show partial correctness, not complete-list recovery.
Clone the matching release before running the example so the canonical evaluator is importable:
```bash
git clone --branch v2.2.0 --depth 1 https://github.com/kaydotai/longlistbench.git
cd longlistbench
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r benchmarks/requirements-hf.txt "pydantic>=2.5.0"
```
Run the scoring example from the repository root. The benchmark checkout is a source tree, not an installed Python package.
```python
import json
from datasets import load_dataset
from benchmarks.evaluation_metrics import (
evaluate_extraction,
evaluate_record_extraction,
normalize_record_predictions,
uses_record_evaluator,
)
config = "policy_packets"
ds = load_dataset("kaydotai/LongListBench", config, split="test")
for row in ds.remove_columns("pdf"):
gold = json.loads(row["ground_truth"])
pred = my_predictions[row["document_id"]]
gold_rows = gold[row["target_field"]]
pred_rows = normalize_record_predictions(pred)
metrics = (
evaluate_record_extraction(pred_rows, gold_rows)
if uses_record_evaluator(gold_rows)
else evaluate_extraction(pred_rows, gold_rows)
)
print(
row["document_id"],
metrics["exact_record_recall"],
metrics["complete_document"],
metrics["f1"],
)
```
## Current Baselines
The release includes 4 full-corpus OCR-conditioned agentic baselines; the models and settings are listed below. Each received the OCR transcript, public field contract, and extraction prompt in a repository-denied workspace. Ground truth and target counts were unavailable.
Strict completeness on the released OCR transcripts:
| Protocol | Documents | Target records | Errors | Exact-record recall | Complete documents | Field micro-F1 | Field macro-F1 |
|---|---:|---:|---:|---:|---:|---:|---:|
| Codex CLI `gpt-5.6-sol`, xhigh reasoning | 32 | 29,599 | 0 | 93.7% | 6/32 (18.8%) | 98.7% | 98.3% |
| Claude Code CLI `claude-fable-5`, xhigh effort | 32 | 29,599 | 0 | 90.9% | 6/32 (18.8%) | 96.1% | 92.6% |
| Codex CLI `gpt-5.5`, xhigh reasoning | 32 | 29,599 | 0 | 90.4% | 4/32 (12.5%) | 98.2% | 97.7% |
| Claude Code CLI `claude-opus-4-8`, xhigh effort | 32 | 29,599 | 0 | 93.6% | 7/32 (21.9%) | 98.8% | 98.4% |
The split between parser-friendly scale controls and structural challenges is visible below:
| Evaluation role | Documents | Target records | GPT-5.6-Sol exact records | Fable 5 exact records | GPT-5.5 exact records | Opus 4.8 exact records |
|---|---:|---:|---:|---:|---:|---:|
| Structural challenges | 19 | 8,414 | 79.0% | 69.3% | 67.6% | 79.3% |
| Scale controls | 13 | 21,185 | 99.5% | 99.5% | 99.5% | 99.3% |
Exact-record recall by extraction problem shows why aggregate scores should not be interpreted alone:
| Extraction problem | Evaluation role | Documents | Target records | GPT-5.6-Sol exact records | Fable 5 exact records | GPT-5.5 exact records | Opus 4.8 exact records |
|---|---|---:|---:|---:|---:|---:|---:|
| Sparse record enrichment (driver/MVR) | Structural challenge | 3 | 1,260 | 0.6% | 1.9% | 1.9% | 1.9% |
| Long-range claim joins | Structural challenge | 3 | 77 | 98.7% | 98.7% | 0.0% | 98.7% |
| Split return schedules | Structural challenge | 3 | 2,737 | 95.5% | 95.5% | 55.1% | 95.5% |
| Mixed row/detail loss runs | Structural challenge | 3 | 900 | 97.3% | 92.2% | 86.3% | 97.3% |
| Tax inquiry detail tables | Structural challenge | 2 | 1,300 | 99.9% | 99.8% | 100.0% | 99.9% |
| Heterogeneous policy records | Structural challenge | 3 | 1,344 | 73.3% | 14.6% | 95.5% | 73.6% |
| Cross-section return joins | Structural challenge | 2 | 796 | 99.6% | 99.6% | 99.6% | 99.6% |
| Tax-summary scale controls | Scale control | 2 | 1,520 | 99.5% | 99.5% | 99.5% | 99.5% |
| Driver-schedule scale control | Scale control | 1 | 500 | 99.8% | 99.8% | 99.8% | 99.8% |
| Mileage-by-vehicle scale controls | Scale control | 8 | 17,565 | 99.4% | 99.4% | 99.4% | 99.2% |
| Vehicle-schedule scale controls | Scale control | 2 | 1,600 | 100.0% | 100.0% | 100.0% | 100.0% |
Saved predictions and reports in [codex_gpt56_sol_full_current_ocr_v2](./evaluation/codex_gpt56_sol_full_current_ocr_v2/), [claude_fable5_full_current_ocr_v2](./evaluation/claude_fable5_full_current_ocr_v2/), [codex_full_current_ocr_v2](./evaluation/codex_full_current_ocr_v2/), [claude_opus48_full_current_ocr_v2](./evaluation/claude_opus48_full_current_ocr_v2/) reproduce these metrics without model access. Run metadata records the dataset hash, prompt, model settings, runtime, and output hash.
## Schemas
Extraction schemas are published as standalone JSON Schema files under [`schemas/`](./schemas):
- [`schemas/loss_run_incident.schema.json`](./schemas/loss_run_incident.schema.json) - `incidents[]` for claim multi-hop incident rows, including incident identifiers, policy fields, claimant/driver fields, dates, coverage fields, and nested financial breakdowns.
- [`schemas/loss_run_claim_row.schema.json`](./schemas/loss_run_claim_row.schema.json) - `records[]` for external loss-run schedule rows in the core operations config.
- [`schemas/ifta_multisection_jurisdiction_row.schema.json`](./schemas/ifta_multisection_jurisdiction_row.schema.json) - `records[]` for multisection IFTA return rows assembled from return headers, Schedule A mileage/gallon rows, and Jurisdictions tax-detail rows.
- [`schemas/policy_packet_item.schema.json`](./schemas/policy_packet_item.schema.json) - `records[]` for BOP/WC/CGL policy packet rows. Records are heterogeneous and may represent locations, coverages, forms, material clauses, endorsements, exclusions, rating rows, or premium items depending on `record_type`.
These schemas describe the strict claim, external loss-run, multisection IFTA, and policy extraction targets. Other operations rows are represented by their ground-truth field contracts and the generic record-list scorer.
## Transcript Conditions
The current release includes OCR transcripts for every PDF:
- `ocr_transcript`: OCR text generated from 200-DPI rendered PDF page images with Google Gemini 3.5 Flash vision OCR through the direct Vertex AI API.
OCR validation reports 99.9% average identifier coverage and 99.9% tracked identifier-field support, with 17 records missing at least one tracked identifier. A separate audit finds 56 genuine OCR misses among 76,968 checked numeric fields with absolute value at least 10 (0.073%). The transcript is not hand-corrected; [`metadata/ocr_numeric_fidelity_baseline.json`](./metadata/ocr_numeric_fidelity_baseline.json) records the exact audited miss set. Interpret OCR-conditioned extraction scores with this ceiling in mind.
## Provenance
The documents are synthetic. Each sample follows this generation workflow:
1. Deterministic fixtures create the schema-shaped ground truth.
2. Layout generators place those records into document-specific tables and narrative sections.
3. HTML/CSS rendering produces the source PDF.
4. OCR over rendered page images produces the released transcript for each PDF.
Policy packets follow commercial insurance structures, but all content and identifiers are synthetic.
HF rows embed the PDF, OCR transcript, ground truth, and metadata. Tagged GitHub releases also retain the rendered HTML. Private template tooling used for the current layouts is not public, so the release does not claim bit-for-bit PDF regeneration.
No customer documents or real insured, claimant, policy, or account data are included. Real documents were used only as structural references for layout and packet organization.
## Limitations
LongListBench is not a substitute for evaluation on a private production corpus. Synthetic documents can underrepresent the visual and linguistic diversity of real carrier packets.
Some structured-report families are parser-friendly by design and serve as scale/completeness controls rather than hard semantic cases. Parser-transfer baselines remain useful diagnostics, but the main task allows a system to inspect each document and choose its extraction strategy. OCR support should be interpreted per affected record: one missing section header can affect many rows even when their identifiers remain visible.
## License
[MIT](https://github.com/kaydotai/longlistbench/blob/main/LICENSE). The documents and ground truth are synthetic and released with the repository under this license.
## Citation
```bibtex
@misc{fedoruk2026longlistbench,
title = {LongListBench: A Benchmark for Long-List Entity Extraction from Complex Business PDFs},
author = {Fedoruk, Anton and Shchoholiev, Serhii and Mehta, Akhil},
publisher = {Kay.ai},
year = {2026},
version = {2.2.0},
howpublished = {Hugging Face dataset},
url = {https://huggingface.co/datasets/kaydotai/LongListBench}
}
```
|