System architecture teardown
Zero-Hallucination Deterministic AI Pipeline
How Benchrock Systems—and our live flagship product DeltaMemo—isolate deterministic computation from language synthesis so finance, BI, and operations leaders receive executive briefs that reconcile to the source ledger.
01 · The enterprise AI math problem
Four real-world export traps that break raw chatbots
Pasting Power BI, NetSuite, or HubSpot exports straight into a language model introduces silent numeric errors. Our preprocessing layer catches and neutralizes each failure mode deterministically.
| Failure Mode | Raw LLM / Ad-Hoc Chatbot | Benchrock Deterministic Engine |
|---|---|---|
| TRAP_01Power BI Matrix Subtotal Double-Counting | Sums leaf rows plus embedded Total / Subtotal rows, silently inflating revenue or freight totals by 2x. | Deterministic ingestion detects and strips summary/subtotal rows prior to aggregation and logs dropped row counts in hygiene metadata. |
| TRAP_02Accounting Parentheses (4,850.00) Sign Errors | Strips parentheses or misparses negative variances as positive inflows, inverting margin bridge direction. | Parser normalizes accounting parentheses, currency prefixes, and trailing percent signs into signed Decimal values before calculation. |
| TRAP_03Duplicate Multi-Line CRM Deal_ID Inflation | Aggregates line-item rows from HubSpot/Salesforce exports directly, double- or triple-counting ARR on multi-SKU opportunities. | Schema contract deduplicates opportunity headers by Deal_ID before summing pipeline value and slipped-deal variance. |
| TRAP_04Zero-Denominator CAC / Margin NaN Crashes | Emits fabricated percentages, Infinity, or silent omissions when a channel has $0 spend or 0 closed deals in a period. | Python computation layer handles zero denominators deterministically, flags undefined ratios explicitly, and prevents hallucinated rates. |
02 · Verified fact packet
Locked JSON contract before the LLM is ever called
Python and SQL compute every KPI, variance, and basis-point shift into a strict VerifiedFactPacket. Each fact carries a unique fact_id, explicit hygiene trap counts, and an enumerated whitelist of allowed_numeric_tokens.
The language model never sees raw unnormalized spreadsheet rows and is never asked to sum, divide, or derive secondary ratios.
{
"schema_version": "1.2",
"packet_id": "vfp_2026_q3_ops_margin",
"period": "2026-Q3 vs 2026-Q2",
"hygiene": {
"subtotals_stripped": 3,
"accounting_negatives_normalized": 14,
"duplicate_deal_ids_resolved": 2,
"zero_denominator_guards_triggered": 1
},
"facts": [
{
"fact_id": "K01",
"metric": "gross_revenue_usd",
"current": 4284500.00,
"prior": 4012900.00,
"delta": 271600.00,
"delta_pct": 6.77
},
{
"fact_id": "K02",
"metric": "gross_margin_bps",
"current_pct": 34.82,
"prior_pct": 36.27,
"delta_bps": -145
},
{
"fact_id": "L01",
"metric": "west_freight_variance_usd",
"delta": -84200.00,
"delta_pct": -11.40
}
],
"allowed_numeric_tokens": [
"$4,284,500", "$4.28M", "$271,600", "+6.8%",
"34.82%", "36.27%", "-145 bps", "-$84,200", "-11.4%"
],
"audit_tolerance_pct": 0.5
}03 · Post-generation numeric audit gate
Every generated figure is verified before export
Numeric Token Extraction
A deterministic regex/AST parser extracts every currency amount, percentage, ratio, and basis-point delta written in the LLM narrative draft.
±0.5% Rounding Tolerance Verification
Each extracted figure is matched against the locked VerifiedFactPacket's allowed_numeric_tokens and exact Python values within a strict ±0.5% rounding band.
Automated 1-Shot Repair Loop
If any number drifts outside tolerance or lacks a [fact_id] anchor, the pipeline automatically sends the exact mismatch diff back for a bounded single-pass repair.
Amber Warning Fallback & Tie-Out Receipt
If a discrepancy persists after repair, the brief is flagged with an explicit amber verification banner rather than silently shipping unverified math. Clean runs receive a verified Tie-Out Receipt.
SECTION 04 · PRIVACY & DEPLOYMENT MODELS
Zero-retention cloud or private VPC Connected Stack
DeltaMemo SaaS & 24-Hour Lifecycle Auto-Delete
Zero OAuth integrations required. Sensitive identifiers can be masked locally in the browser before upload, model endpoints run with zero training retention, and uploaded files expire automatically on a 24-hour storage lifecycle policy.
Private Connected Stack Deployment
For mid-market teams with strict governance requirements, we deploy the full deterministic calculation engine and audit gate inside your Azure, AWS, or GCP boundary—wired directly into Power BI, Microsoft Fabric, NetSuite, HubSpot, or Snowflake.