Datasets:
Add synthetic fine-print dataset: 100 pages, clause spans and QA pairs
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +131 -0
- data/test/fp-0001.jpg +3 -0
- data/test/fp-0002.jpg +3 -0
- data/test/fp-0003.jpg +3 -0
- data/test/fp-0004.jpg +3 -0
- data/test/fp-0005.jpg +3 -0
- data/test/fp-0006.jpg +3 -0
- data/test/fp-0007.jpg +3 -0
- data/test/fp-0008.jpg +3 -0
- data/test/fp-0009.jpg +3 -0
- data/test/fp-0010.jpg +3 -0
- data/test/fp-0011.jpg +3 -0
- data/test/fp-0012.jpg +3 -0
- data/test/fp-0013.jpg +3 -0
- data/test/fp-0014.jpg +3 -0
- data/test/fp-0015.jpg +3 -0
- data/test/fp-0016.jpg +3 -0
- data/test/fp-0017.jpg +3 -0
- data/test/fp-0018.jpg +3 -0
- data/test/fp-0019.jpg +3 -0
- data/test/fp-0020.jpg +3 -0
- data/test/fp-0021.jpg +3 -0
- data/test/fp-0022.jpg +3 -0
- data/test/fp-0023.jpg +3 -0
- data/test/fp-0024.jpg +3 -0
- data/test/fp-0025.jpg +3 -0
- data/test/fp-0026.jpg +3 -0
- data/test/fp-0027.jpg +3 -0
- data/test/fp-0028.jpg +3 -0
- data/test/fp-0029.jpg +3 -0
- data/test/fp-0030.jpg +3 -0
- data/test/fp-0031.jpg +3 -0
- data/test/fp-0032.jpg +3 -0
- data/test/fp-0033.jpg +3 -0
- data/test/fp-0034.jpg +3 -0
- data/test/fp-0035.jpg +3 -0
- data/test/fp-0036.jpg +3 -0
- data/test/fp-0037.jpg +3 -0
- data/test/fp-0038.jpg +3 -0
- data/test/fp-0039.jpg +3 -0
- data/test/fp-0040.jpg +3 -0
- data/test/fp-0041.jpg +3 -0
- data/test/fp-0042.jpg +3 -0
- data/test/fp-0043.jpg +3 -0
- data/test/fp-0044.jpg +3 -0
- data/test/fp-0045.jpg +3 -0
- data/test/fp-0046.jpg +3 -0
- data/test/fp-0047.jpg +3 -0
- data/test/fp-0048.jpg +3 -0
- data/test/fp-0049.jpg +3 -0
README.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: Synthetic Fine Print
|
| 6 |
+
size_categories:
|
| 7 |
+
- n<1K
|
| 8 |
+
task_categories:
|
| 9 |
+
- image-to-text
|
| 10 |
+
- document-question-answering
|
| 11 |
+
tags:
|
| 12 |
+
- synthetic
|
| 13 |
+
- document-ai
|
| 14 |
+
- enterprise-documents
|
| 15 |
+
- hyperapi
|
| 16 |
+
- fine-print
|
| 17 |
+
- terms-and-conditions
|
| 18 |
+
- ocr
|
| 19 |
+
- accounts-payable
|
| 20 |
+
- key-information-extraction
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Synthetic Fine Print
|
| 24 |
+
|
| 25 |
+
**100 business documents with a terms-and-conditions block set in 4 to 6 point type.** The clauses hold facts that matter downstream: payment terms, late-payment interest, early-payment discounts, reminder and reconnection fees, return windows and restocking fees, warranty periods, quote validity, cancellation charges and governing law. Every clause is labelled with its character span and pixel boxes, and **392 question–answer pairs** can only be answered from the fine print.
|
| 26 |
+
|
| 27 |
+
Fine print is one of the failure patterns named in Hyperbots' SAVIOR paper ([arXiv:2611.27319](https://huggingface.co/papers/2611.27319), WACV 2026 Workshops): OCR models and vision-language models often skip it entirely or garble the numbers in it, and the numbers are exactly what an accounts-payable or contract workflow needs.
|
| 28 |
+
|
| 29 |
+
> **Benchmarking a document AI vendor?** Score [HyperAPI](https://huggingface.co/spaces/hyperbots-inc/HyperAPI) on this dataset with a [free API key](https://apis.hyperbots.com/dashboard/register?utm_source=huggingface&utm_medium=dataset_card&utm_campaign=hyperapi_hf&utm_content=synthetic-fine-print) (30 pages a month), try it with no code in the [live demo](https://huggingface.co/spaces/nchhaya/hyperapi-demo), or [request a proof of concept](https://www.hyperbots.com/request-demo?utm_source=huggingface&utm_medium=dataset_card&utm_campaign=hyperapi_hf&utm_content=synthetic-fine-print) on your own documents.
|
| 30 |
+
|
| 31 |
+
## What's on each page
|
| 32 |
+
|
| 33 |
+
Each page is a normal rendered business document (1240 × 1754 px, A4 at 150 dpi) with one fine-print block added between the body and the footer, either just under the content or pushed down to the footer.
|
| 34 |
+
|
| 35 |
+
| Size level | Pages | Font size | Approx. print size |
|
| 36 |
+
|---|---|---|---|
|
| 37 |
+
| `small` | 40 | 12–13 px | 5.8–6.2 pt |
|
| 38 |
+
| `tiny` | 30 | 10–11 px | 4.8–5.3 pt |
|
| 39 |
+
| `micro` | 30 | 8–9 px | 3.8–4.3 pt |
|
| 40 |
+
|
| 41 |
+
- 36 pages set the block in two columns; the rest use one full-width column.
|
| 42 |
+
- 56 pages print it in grey ink (#444 to #6e6e6e) rather than near-black.
|
| 43 |
+
- Typefaces include condensed (Arial Narrow) and serif faces (Times New Roman, Baskerville, Palatino) as well as the documents' own sans-serif faces.
|
| 44 |
+
- 10 document types, 10 pages each: invoice, tax invoice, statement of account, credit note, purchase order, quotation, work order, delivery note, utility bill and credit card statement. Clauses are chosen to fit the type (quote validity only on quotations, minimum payment only on card statements, and so on).
|
| 45 |
+
- Each block has 3 to 5 fact clauses and 2 to 3 boilerplate clauses (retention of title, limitation of liability, "errors and omissions excepted"), shuffled, sometimes numbered, under headings such as "Terms and Conditions" or "Important information".
|
| 46 |
+
- Where the document already prints a payment term (for example "Terms: Net 15"), the fine print states the same number of days, so the page never contradicts itself.
|
| 47 |
+
|
| 48 |
+
| Clause type | Count | Clause type | Count |
|
| 49 |
+
|---|---|---|---|
|
| 50 |
+
| `governing_law` | 76 | `early_payment_discount` | 22 |
|
| 51 |
+
| `late_interest` | 51 | `cancellation_fee` | 22 |
|
| 52 |
+
| `returns` | 40 | `quote_validity` | 10 |
|
| 53 |
+
| `warranty` | 38 | `credit_note_validity` | 10 |
|
| 54 |
+
| `reminder_fee` | 36 | `minimum_payment` | 9 |
|
| 55 |
+
| `claims_window` | 33 | `supplier_payment_terms` | 8 |
|
| 56 |
+
| `payment_terms` | 30 | `reconnection_fee` | 7 |
|
| 57 |
+
| `boilerplate` (no question) | 249 | | |
|
| 58 |
+
|
| 59 |
+
## Columns
|
| 60 |
+
|
| 61 |
+
| Column | Description |
|
| 62 |
+
|---|---|
|
| 63 |
+
| `image` | The page, JPEG |
|
| 64 |
+
| `doc_type`, `taxonomy_id`, `taxonomy_name`, `category` | Document type in the shared 31-type taxonomy |
|
| 65 |
+
| `size_level`, `font_px`, `approx_pt`, `font_family`, `color`, `columns` | How the fine print was set |
|
| 66 |
+
| `fine_print` | `{heading, text, bbox, lines}`; `lines` gives each printed line with its text, character offsets into `text` and pixel box |
|
| 67 |
+
| `clauses` | List of `{type, text, value, start, end, bboxes}`; `start`/`end` index `fine_print.text`, `bboxes` covers every line the clause touches |
|
| 68 |
+
| `qa` | List of `{question, answer, clause_type}`, one per fact clause |
|
| 69 |
+
| `fields` | Printed key fields elsewhere on the page with their boxes |
|
| 70 |
+
| `labels` | JSON string with the document's full ground-truth entities |
|
| 71 |
+
| `ocr_text` | Page text in reading order, with the fine print before the footer |
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from datasets import load_dataset
|
| 75 |
+
ds = load_dataset("hyperbots-inc/synthetic-fine-print", split="test")
|
| 76 |
+
ex = ds[0]
|
| 77 |
+
for qa in ex["qa"]:
|
| 78 |
+
print(qa["question"], "->", qa["answer"])
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## What to measure
|
| 82 |
+
|
| 83 |
+
1. **Recall of the fine print itself.** Compare your OCR output with `fine_print.text` (character error rate, or the share of clauses recovered), broken down by `size_level`. Many pipelines do well on `small` and drop most of `micro`.
|
| 84 |
+
2. **Getting the numbers right.** For each fact clause, check that `value` appears exactly in your output. A dropped "%" or a 1.5 read as 15 is a wrong answer even if the character error rate looks fine.
|
| 85 |
+
3. **Answering questions from the image.** Ask a vision-language model the `qa` questions directly and score exact or normalised match against `answer`.
|
| 86 |
+
|
| 87 |
+
## How the data was made
|
| 88 |
+
|
| 89 |
+
Every document is generated from a seeded random number generator by [`docgen.js`](https://huggingface.co/datasets/hyperbots-inc/synthetic-fine-print/blob/main/generator/docgen.js) and rendered on an HTML canvas in Chrome on macOS; [`fine_print.js`](https://huggingface.co/datasets/hyperbots-inc/synthetic-fine-print/blob/main/generator/fine_print.js) then adds the fine-print block (seeds 12,300,000 to 12,300,099). Text spans and boxes are recorded as the text is drawn, so the labels are exact. All companies, people, amounts and terms are invented.
|
| 90 |
+
|
| 91 |
+
## Limitations
|
| 92 |
+
|
| 93 |
+
- Clean renders: no blur, noise or skew. To test fine print under scan damage, combine with [synthetic-bad-scans](https://huggingface.co/datasets/hyperbots-inc/synthetic-bad-scans).
|
| 94 |
+
- English only, one fine-print block per page, always near the bottom. Real documents also print terms on the back of the page or in a separate attachment.
|
| 95 |
+
- The clause wording comes from a fixed set of templates, so a model could learn the phrasing. Use it as a test set, not training data.
|
| 96 |
+
- Not legal advice: the clauses are realistic in form but were not drafted for any jurisdiction.
|
| 97 |
+
|
| 98 |
+
## About HyperAPI
|
| 99 |
+
|
| 100 |
+
[HyperAPI](https://apis.hyperbots.com?utm_source=huggingface&utm_medium=dataset_card&utm_campaign=hyperapi_hf&utm_content=synthetic-fine-print) is Hyperbots' document intelligence API for enterprise documents. It provides **parse, extract, classify, split and redact** behind one endpoint and returns schema-validated JSON with a confidence score on every field. It has a REST API and a Python SDK, with an MCP server for agents available on request, and you can [start free](https://apis.hyperbots.com/dashboard/register?utm_source=huggingface&utm_medium=dataset_card&utm_campaign=hyperapi_hf&utm_content=synthetic-fine-print). See the [HyperAPI Space](https://huggingface.co/spaces/hyperbots-inc/HyperAPI) for a walkthrough.
|
| 101 |
+
|
| 102 |
+
## Part of the Hyperbots synthetic document suite
|
| 103 |
+
|
| 104 |
+
| Dataset | Focus |
|
| 105 |
+
|---|---|
|
| 106 |
+
| [synthetic-enterprise-doc-extraction](https://huggingface.co/datasets/hyperbots-inc/synthetic-enterprise-doc-extraction) | Field extraction across 31 enterprise document types |
|
| 107 |
+
| [synthetic-doc-parsing](https://huggingface.co/datasets/hyperbots-inc/synthetic-doc-parsing) | Layout blocks, reading order, Markdown and tables |
|
| 108 |
+
| [synthetic-pii-redaction](https://huggingface.co/datasets/hyperbots-inc/synthetic-pii-redaction) | PII spans and boxes for masking and de-identification |
|
| 109 |
+
| [synthetic-doc-classification](https://huggingface.co/datasets/hyperbots-inc/synthetic-doc-classification) | 31-class document classification |
|
| 110 |
+
| [synthetic-doc-splitting](https://huggingface.co/datasets/hyperbots-inc/synthetic-doc-splitting) | Multi-document bundles with true boundaries |
|
| 111 |
+
| [synthetic-handwritten-forms](https://huggingface.co/datasets/hyperbots-inc/synthetic-handwritten-forms) | Forms filled in handwriting-style script |
|
| 112 |
+
| [synthetic-stamped-documents](https://huggingface.co/datasets/hyperbots-inc/synthetic-stamped-documents) | Stamps and seals over printed text |
|
| 113 |
+
| [synthetic-bad-scans](https://huggingface.co/datasets/hyperbots-inc/synthetic-bad-scans) | Skew, blur, noise, shadows and compression at 3 severities |
|
| 114 |
+
| [synthetic-dense-documents](https://huggingface.co/datasets/hyperbots-inc/synthetic-dense-documents) | Small type, multi-column layouts and long tables |
|
| 115 |
+
| [synthetic-invoice-extraction](https://huggingface.co/datasets/hyperbots-inc/synthetic-invoice-extraction) | Invoice fields and line items (text + HTML) |
|
| 116 |
+
| [synthetic-rotated-text](https://huggingface.co/datasets/hyperbots-inc/synthetic-rotated-text) | Pages scanned sideways or upside down, vertical margin text, angled stamps |
|
| 117 |
+
| [synthetic-logo-vendor-names](https://huggingface.co/datasets/hyperbots-inc/synthetic-logo-vendor-names) | Vendor names that appear only inside a logo |
|
| 118 |
+
| **synthetic-fine-print** (this dataset) | Terms and conditions in 4–6 pt type, with clause spans and questions |
|
| 119 |
+
|
| 120 |
+
## License and citation
|
| 121 |
+
|
| 122 |
+
CC BY 4.0. Generator code is MIT.
|
| 123 |
+
|
| 124 |
+
```bibtex
|
| 125 |
+
@misc{hyperbots2026fineprint,
|
| 126 |
+
title = {Synthetic Fine Print},
|
| 127 |
+
author = {Hyperbots Inc.},
|
| 128 |
+
year = {2026},
|
| 129 |
+
url = {https://huggingface.co/datasets/hyperbots-inc/synthetic-fine-print}
|
| 130 |
+
}
|
| 131 |
+
```
|
data/test/fp-0001.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0002.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0003.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0004.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0005.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0006.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0007.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0008.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0009.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0010.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0011.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0012.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0013.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0014.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0015.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0016.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0017.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0018.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0019.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0020.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0021.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0022.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0023.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0024.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0025.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0026.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0027.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0028.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0029.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0030.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0031.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0032.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0033.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0034.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0035.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0036.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0037.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0038.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0039.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0040.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0041.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0042.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0043.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0044.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0045.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0046.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0047.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0048.jpg
ADDED
|
Git LFS Details
|
data/test/fp-0049.jpg
ADDED
|
Git LFS Details
|