--- license: mit task_categories: - tabular-classification - text-classification language: - ar - en tags: - synthetic-data - gcc - invoices - ecommerce - erp - fintech - testing - data-quality - arabic - benchmark pretty_name: GCC-InvoiceMath-Verified size_categories: - n<1K --- # GCC-InvoiceMath-Verified A deterministic synthetic benchmark for testing invoice arithmetic, numeric parsing, rounding, and claimed-total validation across six GCC currencies. ## Overview GCC-InvoiceMath-Verified contains **600 records / 300 causal pairs**. Each pair contains: - one mathematically correct invoice - one counterfactual invoice where exactly one claimed total differs by one minor currency unit The dataset is intended for: - ERP QA - e-invoicing integration testing - financial software regression testing - structured-output validation - numerical reasoning evaluation - synthetic data benchmarking This benchmark is **not a tax-law compliance benchmark**. It does not certify compliance with ZATCA, UAE e-invoicing rules, PINT, UBL, or any national tax regulation. ## Countries and currencies | Country | Currency | Records | |---|---|---:| | Saudi Arabia | SAR | 100 | | United Arab Emirates | AED | 100 | | Qatar | QAR | 100 | | Kuwait | KWD | 100 | | Bahrain | BHD | 100 | | Oman | OMR | 100 | SAR, AED and QAR use two benchmark fractional digits. KWD, BHD and OMR use three benchmark fractional digits. ## Scenario families The benchmark contains 10 deterministic scenario families: 1. `half_up_tie` 2. `line_vs_document_rounding` 3. `line_allowance` 4. `line_charge` 5. `prepayment` 6. `credit_note` 7. `large_amount_stress` 8. `zero_rate` 9. `mixed_rates` 10. `zero_due` Each family contains **60 records**. ## Numeric rendering Four rendering styles are equally represented: - ASCII - grouped ASCII - Arabic-Indic digits - grouped Arabic-Indic digits Each style contains **150 records**. This makes it possible to test parsers handling both Western and Arabic-Indic numeric representations. ## Dataset structure Important fields include: ```json { "id": "...", "pair_id": "...", "split": "train", "country": "SA", "family": "half_up_tie", "contract_id": "gcc-invoice-math-1.0", "invoice": { "currency": "SAR", "document_type": "invoice", "numeric_style": "arabic_indic", "lines": [], "prepaid": "...", "claimed_totals": {} }, "expected": { "valid": true, "totals": {}, "error_fields": [] }, "mutation": null, "fingerprint_sha256": "..." } Ground truth Ground truth is generated procedurally using Python Decimal arithmetic with explicit ROUND_HALF_UP behavior. Validation is performed independently using fractions.Fraction. The validator does not import generator code. This provides two different arithmetic implementations: - generator oracle: Decimal - validation oracle: rational arithmetic Validation results - Records generated: 600 - Records validated: 600 - Pass rate: 100% - Valid examples: 300 - Invalid examples: 300 - Unique causal pairs: 300 The release also checks: - JSON Schema compliance - unique IDs - unique semantic source invoices - fingerprints - country/currency consistency - pair integrity - train/validation/test pair isolation - exactly one causal mutation per invalid record - exactly one minor-unit difference - generator/validator oracle agreement Splits - train: 360 - validation: 120 - test: 120 Positive and negative members of a causal pair are always kept in the same split. Synthetic provenance All records are procedurally generated. - no real invoices - no PII - no copied commercial records - no real tax identifiers - no customer transaction data External sources were used only for background research and currency-precision verification. Important limitations This dataset does not cover: - XML / UBL validation - digital signatures - QR codes - live tax submission - regulatory certification - real tax IDs - OCR images - exchange rates - payment reconciliation - jurisdiction-specific VAT interpretation Tax rates used in the benchmark are synthetic testing parameters. Intended use Recommended uses: - unit tests - regression tests - ERP adapter QA - invoice parser evaluation - financial-agent evaluation - data-quality pipelines - numeric-reasoning benchmarks Commercial customization Need a private benchmark matching your ERP, invoice schema, accounting rules, API, or failure modes? Custom synthetic datasets can be generated with: - client-specific field mappings - custom currencies - custom rounding behavior - additional failure modes - private held-out regression suites - custom JSON / CSV / Parquet / SQL formats - validation scripts - QA reports The commercial value is in adapting the benchmark to a real system, not simply generating more generic rows. Reproducibility The generator is deterministic and seed-based. Default seed: 20260930 See generator.py and validator.py. License MIT License for the original benchmark code and synthetic fixtures. See LICENSE. --- ## RegalFire — Custom / Private Dataset Work RegalFire builds custom AI datasets, evaluation sets and data pipelines for: - AI agents - computer-use systems - multimodal models - world models - RAG systems - code agents - enterprise AI Available services include: - synthetic data generation - private evaluation datasets - agent trajectories - failure / recovery datasets - multimodal RGB / segmentation / state-action data - web data acquisition - cleaning and deduplication - structured dataset packaging - continuous dataset production For custom or private work: **Email: ootiris@gmail.com** Hugging Face: **RegalFire**