Technical teardown
How the Numeric Audit Gate eliminates AI math drift
DeltaMemo never asks a language model to add, divide or compare numbers. Deterministic code cleans the export and computes every figure into a locked fact packet; the model only writes prose, and every number in that prose is audited against the packet before export.
Failure modes
Four real-world traps, side by side
| Trap | Raw LLM upload | DeltaMemo |
|---|---|---|
| Power BI matrix subtotals | Sums the Total and Subtotal rows along with the detail rows, double-counting revenue. | Sum-verified subtotal stripper drops labelled and unlabelled total rows before any math runs. |
| Accounting credit parentheses (4,850.00) | Reads the value as positive, or as text it cannot add. | Deterministic parser converts it to -4850.00 and counts the fix in the hygiene report. |
| Duplicate multi-line CRM Deal_IDs | Adds every line-item copy of the deal, inflating pipeline totals. | Key-based deduplicator keeps one row per Deal_ID and reports how many it dropped. |
| Zero-denominator rows (New_Customers = 0) | Invents a 0% or an infinite CAC, or stops responding. | Explicit isolation: the figure renders as "N/A" or "New", never NaN or Infinity. |
The contract
The locked VerifiedFactPacket
{
"dataset_type": "bi_margin_ops",
"baseline_label": "Q2 FY26",
"current_label": "Q3 FY26",
"hygiene": {
"raw_rows_read": 22,
"clean_rows_analyzed": 18,
"subtotal_rows_stripped": 4,
"accounting_negatives_normalized": 3
},
"summary_kpis": [
{
"fact_id": "K01",
"label": "Total Net Revenue",
"baseline_display": "$1,410,500",
"current_display": "$1,528,900",
"delta_display": "+$118,400",
"sentiment": "favorable"
},
{
"fact_id": "K02",
"label": "Blended Gross Margin",
"baseline_display": "41.8%",
"current_display": "38.7%",
"delta_display": "-310 bps",
"sentiment": "unfavorable"
}
],
"top_negative_drivers": [
{
"fact_id": "L01",
"name": "SW Industrial Freight Out",
"baseline_value": 84700,
"current_value": 119600,
"abs_delta": 34900,
"pct_delta": 0.412,
"formatted_pct_delta": "+41.2%",
"sentiment": "unfavorable",
"is_material": true
}
],
"allowed_numeric_tokens": [
1410500,
1528900,
118400,
8.4,
41.8,
38.7,
-310,
84700,
119600,
34900,
41.2,
4,
18
]
}Post-generation verification
Every figure is checked after the model writes
- STEP 01
Extract every figure
Regex extraction pulls each currency, %, bps, day and deal count from the structured LLM output.
- STEP 02
Match against the packet
Each value must match an allowed_numeric_token within ±0.5% rounding tolerance, so $1,528,900 and $1.53M both verify.
- STEP 03
Repair once, or flag
On a mismatch, one automatic repair call cites the offending tokens. If it still fails, the figure ships with an amber audit warning, never silently.
Privacy you can verify
The free tools cannot upload your spreadsheet
All 5 /tools/* utilities run 100% in your browser, and every page ships an HTTP Content-Security-Policy with connect-src 'self', so the browser itself blocks any script from sending data to another origin. Check it in the DevTools Network tab, or load a tool, switch on Airplane Mode, and keep working.