File size: 5,863 Bytes
1c31d52
 
 
 
739361b
 
 
 
1c31d52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739361b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---

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**