← All Papers

ERP Line-Item Auditing with Formal Guardrails: Catching Pricing Discrepancies at Scale

Hundreds of thousands of multi-page purchase orders, cross-border tariff updates, and raw-material spec sheets were trapped in SAP and Oracle silos — and every one needed a pricing audit. LLMs alone couldn't be trusted with money. Formal verification guardrails made it work.

The Audit Bottleneck

Procurement teams reviewed each purchase order against contract terms, tariff schedules, and material specs manually. At tens of thousands of line items per month, review velocity was the constraint — and the backlog was where discrepancies hid.

The tempting shortcut was to point a frontier model at the documents and let it flag anomalies. The problem: a language model that silently accepts a mispriced line item is worse than a slow human reviewer, because it looks scalable while being wrong in the same confident voice every time.

Why Formal Guardrails

We built a two-layer pipeline. Layer one is the reasoning model: it extracts pricing fields, contract references, and tariff applicability from each line item into a rigid JSON schema. Layer two is the formal layer: a rule engine with explicit arithmetic verification — unit-price × quantity = line total, contract cap checks, tariff delta tolerance, and cross-PO price-consistency bounds.

# Guardrail contract (abridged) for line_item in parsed_batch: assert abs(line.total - line.unit_price * line.qty) < 0.01 assert line.unit_price <= contract[line.part].cap assert rate_valid(line.tariff, effective_date=line.po_date) assert line.unit_price - benchmark[line.part] < tolerance else: flag(line_item, "requires_human_review")

The model never decides compliance — it only produces structured extractions. Every flag includes the exact assertion that failed and the extracted values involved, so a human reviewer sees a complete evidence trail, not a confidence score.

Results

100K+
Line Items Audited
88%
Review Velocity Increase
$100M+
Sourcing Spend Saved
0
Missed Discrepancies

The Takeaway

In money-bearing workflows, the model's job is extraction, not judgment. Boundary-checked, formally verified extraction catches discrepancies a reviewer would need months to spot — and every flag carries proof. That separation of concerns is what made procurement leadership trust automation on day one.

Automate Your Audit Trail

We embed formal-verification guardrails over your ERP pipelines so automation stays accountable at every line item.

Work With Us →