antonkayai commited on
Commit
abec1b1
·
verified ·
1 Parent(s): 64df9e5

Fix reproduction instructions and polish dataset card

Browse files
Files changed (1) hide show
  1. README.md +32 -30
README.md CHANGED
@@ -14,7 +14,6 @@ tags:
14
  - structured-extraction
15
  - long-list-extraction
16
  - long-array
17
- - large-array
18
  - long-range-evidence
19
  - insurance
20
  - trucking
@@ -43,13 +42,15 @@ configs:
43
 
44
  **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)
45
 
46
- LongListBench measures **long-list structured extraction** from insurance and commercial trucking PDFs: return every target record without omissions, merged rows, invented extras, or lost fields under complex layout, OCR, and long-range evidence. It contains 32 synthetic PDFs and 29,599 target records, with no real customer PII.
47
 
48
- The task is per-document extraction: give a system one PDF or OCR transcript plus the target contract, then score the complete list. `core_operations` emphasizes scale and output completeness; `claim_multihop` and `policy_packets` require inherited context, heterogeneous schemas, distant supporting sections, and distractors.
 
 
49
 
50
  ## Complexity Stressors
51
 
52
- Unlike array-only extraction datasets, LongListBench records the stressors present in each PDF under `problems`:
53
 
54
  | Tag | Meaning |
55
  |---|---|
@@ -70,15 +71,15 @@ Unlike array-only extraction datasets, LongListBench records the stressors prese
70
 
71
  These 14 tags are canonical. The manifest also retains finer audit tags, for 45 distinct `problems` tokens in total. Labels are metadata, not text printed inside the PDFs.
72
 
73
- The mapping is intended to be visually auditable:
74
 
75
  | Family or config | Stressors visible in the document |
76
  |---|---|
77
- | `ifta_mileage_by_vehicle` | Page-spanning unit sections, inherited unit headers, and source notes inside jurisdiction rows. |
78
- | `ifta_multisection_return_packet` | Return-level context, Schedule A distance/gallon rows, and dense Jurisdictions tax-detail rows must be joined across pages; OCR keeps the visual layout rather than a clean row table. |
79
- | `loss_run_external` | Target rows mixed with description rows, continuation notes, summary cards, no-claims tables, and merged policy-period rows. |
80
- | `claim_multihop` | Claim schedules separated from policy registers, driver rosters, claimant indexes, cause-code appendices, and ledgers by many pages. |
81
- | `policy_packets` | Heterogeneous records across declarations, locations or classifications, forms, endorsements, rating or premium pages, and clause prose. |
82
 
83
  ## Configs and Data Viewer
84
 
@@ -149,19 +150,24 @@ The tagged [reference evaluator](https://github.com/kaydotai/longlistbench/blob/
149
 
150
  ### Method
151
 
152
- 1. **Shape.** Run your extractor on each PDF or transcript and return an object matching `ground_truth`: `{"incidents": [...]}` for claim multi-hop rows or `{"records": [...]}` for all other list families. A bare list is also accepted by the repository evaluator.
153
- 2. **Claims matching.** Claim incidents are keyed by normalized `incident_number`; strings, dates, claimant lists, and non-zero financial breakdowns use the documented canonical forms.
154
- 3. **Generic record matching.** Operations, loss-run, and policy values normalize case, whitespace, dates, decimals, currency, accounting negatives, and documented label equivalents. Exact records are anchored before deterministic field-overlap matching for partial-credit diagnostics. Strict comparison still uses every public target field.
155
- 4. **Strict completeness.** An exact record must match every normalized target field. Exact-record recall is `exact_record_matches / ground_truth_count`. A document is complete only when the normalized predicted and ground-truth record multisets are identical, including duplicate multiplicity and with no extra records. Record order is not scored in this release.
156
- 5. **Field diagnostics.** Field recall is `found_gold_field_pairs / total_gold_field_pairs`; precision is `found_field_pairs / total_pred_field_pairs`; F1 is their harmonic mean. Reports retain document-macro and corpus-micro field F1 to show partial correctness, but these are not substitutes for complete-list recovery.
157
 
158
  Clone the matching release before running the example so the canonical evaluator is importable:
159
 
160
  ```bash
161
  git clone --branch v2.1.0 --depth 1 https://github.com/kaydotai/longlistbench.git
162
  cd longlistbench
 
 
 
163
  ```
164
 
 
 
165
  ```python
166
  import json
167
  from datasets import load_dataset
@@ -195,7 +201,7 @@ for row in ds.remove_columns("pdf"):
195
 
196
  ## Current Baselines
197
 
198
- The release includes 4 full-corpus OCR-conditioned agentic baselines: Codex CLI invoked `gpt-5.6-sol` with xhigh reasoning; Claude Code CLI invoked `claude-fable-5` with xhigh effort; Codex CLI invoked `gpt-5.5` with xhigh reasoning; Claude Code CLI invoked `claude-opus-4-8` with xhigh effort. Each model received only the OCR transcript, public field contract, prompt, and output directory in a repository-denied workspace. Target values, counts, ground truth, and generator code were unavailable.
199
 
200
  Strict completeness on the released OCR transcripts:
201
 
@@ -206,9 +212,7 @@ Strict completeness on the released OCR transcripts:
206
  | Codex CLI `gpt-5.5`, xhigh reasoning | 32 | 29,599 | 0 | 90.4% | 4/32 (12.5%) | 98.2% | 97.7% |
207
  | Claude Code CLI `claude-opus-4-8`, xhigh effort | 32 | 29,599 | 0 | 93.6% | 7/32 (21.9%) | 98.8% | 98.4% |
208
 
209
- An exact record must match every normalized target field. A complete document must contain exactly the gold record multiset, with no missing or extra records. Record order is not scored. Field micro-F1 is retained as a secondary partial-credit diagnostic.
210
-
211
- The release distinguishes parser-friendly scale controls from structural challenges:
212
 
213
  | 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 |
214
  |---|---:|---:|---:|---:|---:|---:|
@@ -231,9 +235,7 @@ Exact-record recall by extraction problem shows why aggregate scores should not
231
  | Mileage-by-vehicle scale controls | Scale control | 8 | 17,565 | 99.4% | 99.4% | 99.4% | 99.2% |
232
  | Vehicle-schedule scale controls | Scale control | 2 | 1,600 | 100.0% | 100.0% | 100.0% | 100.0% |
233
 
234
- The 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/) recompute these metrics without model access. Run metadata binds each prediction to the manifest, transcript, field contract, prompt, runner, model, effort, runtime, and output hash.
235
-
236
-
237
 
238
  ## Schemas
239
 
@@ -254,26 +256,26 @@ The current release includes OCR transcripts for every PDF:
254
 
255
  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.
256
 
257
- If future releases add clean structural transcripts, they should be reported as a separate transcript condition rather than mixed with OCR-condition results.
258
-
259
  ## Provenance
260
 
261
- The documents are synthetic. Each sample was produced by a deterministic generation workflow:
262
 
263
  1. Deterministic fixtures create the schema-shaped ground truth.
264
- 2. Layout generators project the records into claim schedules, tables, rosters, ledgers, declarations, forms, endorsements, rating schedules, and policy conditions.
265
  3. HTML/CSS rendering produces the source PDF.
266
  4. OCR over rendered page images produces the released transcript for each PDF.
267
 
268
- Policy packets are structurally inspired by commercial insurance policy workflows, but names, values, prose, and identifiers are generated fixtures.
269
 
270
- The HF rows embed PDF, OCR, ground truth, and metadata; tagged GitHub releases also retain the rendered HTML. Private template tooling used to create the current layouts is not public, so the release does not claim bit-for-bit regeneration of every PDF from generator source.
271
 
272
- No real insureds, claimants, policies, financial accounts, or customer documents are represented. Real documents were used only as structural references for layout and packet organization.
273
 
274
  ## Limitations
275
 
276
- LongListBench is intended for measuring long-list, layout, OCR-conditioned, and long-range-evidence extraction behavior. It 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 should be interpreted as scale/completeness controls rather than as hard semantic extraction cases. Parser-transfer baselines can be useful diagnostics, but the main benchmark task is per-document extraction where the system may inspect the current document and choose its own extraction strategy. OCR transcripts have been run and reviewed, but OCR support should be interpreted at the affected-record level: a missing section header can affect many rows even when unique row identifiers are present.
 
 
277
 
278
  ## License
279
 
 
14
  - structured-extraction
15
  - long-list-extraction
16
  - long-array
 
17
  - long-range-evidence
18
  - insurance
19
  - trucking
 
42
 
43
  **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)
44
 
45
+ 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.
46
 
47
+ 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.
48
+
49
+ `core_operations` tests scale and output completeness. `claim_multihop` and `policy_packets` add inherited context, distant evidence, and mixed record schemas.
50
 
51
  ## Complexity Stressors
52
 
53
+ Each PDF records its extraction stressors under `problems`:
54
 
55
  | Tag | Meaning |
56
  |---|---|
 
71
 
72
  These 14 tags are canonical. The manifest also retains finer audit tags, for 45 distinct `problems` tokens in total. Labels are metadata, not text printed inside the PDFs.
73
 
74
+ The following families make the tags easy to inspect in the PDFs:
75
 
76
  | Family or config | Stressors visible in the document |
77
  |---|---|
78
+ | `ifta_mileage_by_vehicle` | Jurisdiction rows inherit unit headers while source notes interrupt page-spanning tables. |
79
+ | `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. |
80
+ | `loss_run_external` | Claim rows are interleaved with descriptions, continuation notes, summaries, and empty-table distractors. |
81
+ | `claim_multihop` | Claim schedules are separated from supporting policy, driver, claimant, cause-code, and ledger sections. |
82
+ | `policy_packets` | The target mixes declarations, schedules, forms, endorsements, premiums, and clause prose. |
83
 
84
  ## Configs and Data Viewer
85
 
 
150
 
151
  ### Method
152
 
153
+ 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.
154
+ 2. Claim incidents are keyed by normalized `incident_number`. Strings, dates, claimant lists, and non-zero financial breakdowns use documented canonical forms.
155
+ 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.
156
+ 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.
157
+ 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.
158
 
159
  Clone the matching release before running the example so the canonical evaluator is importable:
160
 
161
  ```bash
162
  git clone --branch v2.1.0 --depth 1 https://github.com/kaydotai/longlistbench.git
163
  cd longlistbench
164
+ python3 -m venv .venv
165
+ source .venv/bin/activate
166
+ python -m pip install -r benchmarks/requirements-hf.txt "pydantic>=2.5.0"
167
  ```
168
 
169
+ Run the scoring example from the repository root. The benchmark checkout is a source tree, not an installed Python package.
170
+
171
  ```python
172
  import json
173
  from datasets import load_dataset
 
201
 
202
  ## Current Baselines
203
 
204
+ 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.
205
 
206
  Strict completeness on the released OCR transcripts:
207
 
 
212
  | Codex CLI `gpt-5.5`, xhigh reasoning | 32 | 29,599 | 0 | 90.4% | 4/32 (12.5%) | 98.2% | 97.7% |
213
  | Claude Code CLI `claude-opus-4-8`, xhigh effort | 32 | 29,599 | 0 | 93.6% | 7/32 (21.9%) | 98.8% | 98.4% |
214
 
215
+ The split between parser-friendly scale controls and structural challenges is visible below:
 
 
216
 
217
  | 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 |
218
  |---|---:|---:|---:|---:|---:|---:|
 
235
  | Mileage-by-vehicle scale controls | Scale control | 8 | 17,565 | 99.4% | 99.4% | 99.4% | 99.2% |
236
  | Vehicle-schedule scale controls | Scale control | 2 | 1,600 | 100.0% | 100.0% | 100.0% | 100.0% |
237
 
238
+ 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.
 
 
239
 
240
  ## Schemas
241
 
 
256
 
257
  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.
258
 
 
 
259
  ## Provenance
260
 
261
+ The documents are synthetic. Each sample follows this generation workflow:
262
 
263
  1. Deterministic fixtures create the schema-shaped ground truth.
264
+ 2. Layout generators place those records into document-specific tables and narrative sections.
265
  3. HTML/CSS rendering produces the source PDF.
266
  4. OCR over rendered page images produces the released transcript for each PDF.
267
 
268
+ Policy packets follow commercial insurance structures, but all content and identifiers are synthetic.
269
 
270
+ 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.
271
 
272
+ 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.
273
 
274
  ## Limitations
275
 
276
+ 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.
277
+
278
+ 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.
279
 
280
  ## License
281