DevLCodes's picture
Add Dataset Card, train/test JSONL splits, and ground-truth manifests
c97a3a8 verified
|
Raw History Blame Contribute Delete
7.58 kB
---
license: mit
task_categories:
- document-question-answering
- image-to-text
- text-classification
- table-question-answering
language:
- en
tags:
- three-way-matching
- accounts-payable
- procurement
- invoice-processing
- purchase-order
- goods-receipt-note
- ocr
- multimodal
- document-ai
- agent-benchmark
- synthetic
pretty_name: Three-Way Matching Multimodal Agent Benchmark (2,500 Cases / 7,500 Documents)
size_categories:
- 1K<n<10K
configs:
- config_name: cases
default: true
data_files:
- split: train
path: data/cases_train.jsonl
- split: test
path: data/cases_test.jsonl
- config_name: documents
data_files:
- split: train
path: data/documents_train.jsonl
- split: test
path: data/documents_test.jsonl
---
# Three-Way Matching Multimodal Agent Benchmark (2,500 Cases / 7,500 Documents)
A multimodal Accounts Payable (AP) & Procurement **Three-Way Matching** benchmark dataset designed for evaluating LLM/VLM agents, OCR pipelines, and document-understanding workflows across **Purchase Orders (PO)**, **Warehouse Receipts / Goods Receipt Notes (GRN)**, and **Vendor Invoices**.
## Dataset Highlights
- **2,500 Complete Procurement Cases** (`train`: 2,000 cases, `test`: 500 cases — stratified across all 13 matching & exception scenarios)
- **7,500 Multimodal Documents** (`train`: 6,000 docs, `test`: 1,500 docs — `1,230.7 MB` total)
- **Mixed Formats Inside Every Triplet**: Every standard 3-document packet combines **Word (`.docx`)**, **PDF (`.pdf`)**, and **Scanned Image (`.jpg` / `.png`)**, rotating which document role receives which format across cases.
- **Both Vector & Scanned PDFs**: Includes selectable digital ERP PDFs (`vector_text_pdf`) as well as rasterized scanned PDFs (`scanned_image_pdf`).
- **Realistic Visual & Dock Artifacts**: Image and scanned-PDF documents feature page skew (`±0.5°` to `±2.1°`), scanner drop shadows, rubber ink stamps (`RECEIVED & VERIFIED`, `SHORT SHIPMENT NOTED`, `DAMAGED GOODS REJECTED`, `AP RECEIVED`), vector barcodes, paper speckles/creases, and ballpoint handwritten dock clerk notes + cursive signatures.
- **Dual Ground-Truth Verdicts**: Each case provides both `strict_verdict` (zero-variance matching) and `tolerance_verdict` (standard AP tolerance policy: `≤ $15.00` or `≤ 1%` Prepaid & Add freight, valid partial-delivery billing allowed, missing receipts held, duplicate invoices blocked).
---
## Quickstart with Hugging Face `datasets`
```python
import json
from datasets import load_dataset
from huggingface_hub import snapshot_download
# 1. Load structured case-level benchmark splits (default config: 'cases')
cases = load_dataset("DevLCodes/three-way-matching-dataset", "cases")
print(cases)
sample = cases["test"][0]
print(sample["case_id"], sample["scenario"], "->", sample["tolerance_verdict"])
print("Files:", sample["file_paths"])
print("Discrepancies:", json.loads(sample["discrepancies_json"]))
# 2. Load document-level index ('documents' config — all 7,500 files)
docs = load_dataset("DevLCodes/three-way-matching-dataset", "documents")
# 3. Download raw DOCX, PDF, PNG, and JPG files locally for your agent
repo_dir = snapshot_download("DevLCodes/three-way-matching-dataset", repo_type="dataset")
```
---
## Scenario Taxonomy (2,500 Cases)
| Scenario | Cases | Share |
| :--- | ---: | ---: |
| `damaged_rejected_goods` | 150 | 6.0% |
| `duplicate_invoice` | 125 | 5.0% |
| `exact_match` | 550 | 22.0% |
| `invoice_math_or_tax_error` | 150 | 6.0% |
| `missing_warehouse_receipt` | 125 | 5.0% |
| `over_shipment_billed` | 150 | 6.0% |
| `short_shipment_overbilled` | 250 | 10.0% |
| `short_shipment_properly_billed` | 150 | 6.0% |
| `unapproved_freight_or_surcharge` | 175 | 7.0% |
| `unit_price_hike` | 250 | 10.0% |
| `unordered_line_item` | 125 | 5.0% |
| `within_tolerance_match` | 200 | 8.0% |
| `wrong_po_or_vendor_mismatch` | 100 | 4.0% |
### Scenario Descriptions
1. **`exact_match`**: PO, Warehouse Receipt, and Vendor Invoice align 100% on SKUs, quantities, unit prices, tax, and totals (includes realistic vendor description phrasing & date-format variations).
2. **`within_tolerance_match`**: Small `FOB Origin, Prepaid & Add` shipping charge (`≤ $12.00`) within the `$15.00 / 1%` AP tolerance threshold (`strict_verdict = HOLD_VARIANCE`, `tolerance_verdict = APPROVED_WITHIN_TOLERANCE`).
3. **`short_shipment_overbilled`**: Warehouse received fewer units than ordered (with dock clerk note), yet Vendor Invoice billed the full PO quantity.
4. **`short_shipment_properly_billed`**: Partial shipment received at dock and Vendor Invoice accurately bills *only* the delivered quantity (`APPROVED_PARTIAL_DELIVERY`).
5. **`over_shipment_billed`**: Vendor shipped and billed >15–35% extra units beyond PO authorization without a PO amendment.
6. **`damaged_rejected_goods`**: Full quantity arrived at dock, but damaged units were rejected during inspection (`qty_accepted < qty_received`) while Invoice bills full quantity.
7. **`unit_price_hike`**: Invoice unit price exceeds contracted PO unit price by +8% to +22%.
8. **`unapproved_freight_or_surcharge`**: PO terms specify `FOB Destination (Freight Included)`, but Invoice adds unauthorized freight/surcharge (`$185–$550`).
9. **`invoice_math_or_tax_error`**: Explicit line-extension (`qty * unit_price != line_total`) or header summation arithmetic error on the Invoice.
10. **`unordered_line_item`**: Invoice bills an extra SKU/line item never ordered on the PO or logged on the Warehouse Receipt.
11. **`missing_warehouse_receipt`**: Only PO and Invoice are present (2 files); goods receipt is missing/unconfirmed (`HOLD_MISSING_RECEIPT`).
12. **`wrong_po_or_vendor_mismatch`**: Invoice references a non-matching PO number or is issued by a different legal vendor entity / Tax ID than the PO.
13. **`duplicate_invoice`**: Packet contains **4 files** — PO, Warehouse Receipt, primary Invoice, and a second duplicate/re-billed Invoice against the same shipment (`REJECT_DUPLICATE_INVOICE`).
---
## File Format & Render Mode Distribution (7,500 Documents)
| Format | Count | Share |
| :--- | ---: | ---: |
| `DOCX` | 2,451 | 32.7% |
| `JPG` | 1,346 | 17.9% |
| `PDF` | 2,453 | 32.7% |
| `PNG` | 1,250 | 16.7% |
| Render Mode | Count | Share |
| :--- | ---: | ---: |
| `openxml_docx` | 2,451 | 32.7% |
| `scanned_image_pdf` | 558 | 7.4% |
| `scanned_jpg` | 1,346 | 17.9% |
| `scanned_png` | 1,250 | 16.7% |
| `vector_text_pdf` | 1,895 | 25.3% |
---
## Repository Structure
```text
.
├── README.md # Hugging Face Dataset Card & metadata
├── .gitattributes # Git LFS configuration for binary docs/images
├── ground_truth.json # Complete nested dataset & AP tolerance policy JSON
├── manifest.csv # Case-level summary spreadsheet (2,500 rows)
├── documents_index.csv # Document-level index (7,500 rows + SHA-256)
├── data/
│ ├── cases_train.jsonl # 2,000 training cases
│ ├── cases_test.jsonl # 500 evaluation cases
│ ├── documents_train.jsonl # 6,000 training document records
│ └── documents_test.jsonl # 1,500 evaluation document records
└── documents/
├── CASE_0001/ # Mixed DOCX + PDF + PNG/JPG packet per case
...
└── CASE_2500/
```
## License
Released under the **MIT License**. All companies, addresses, tax IDs, SKUs, and transactions are 100% synthetic.