1. The Architectural Rule: AI for Ingestion, Deterministic Code for Math
Large Language Models and document OCR pipelines excel at parsing unstructured PDF utility invoices to extract billing period dates, meter identifiers, and raw consumption quantities (kWh, therms, m3). However, LLMs must never be used to select emission factors or perform multiplication.
| Pipeline Stage | Unverified Prompt-Based LLM Calculation (Audit Failure) | Audit-Safe OCR Extraction + Deterministic Engine |
|---|---|---|
| PDF Document Ingestion | Passes raw PDF text to an LLM asking for total tCO2e | Extracts structured fields (meter_id, start_date, end_date, quantity, unit) with bounding-box coordinates |
| Schema & Unit Validation | Unchecked free-text response prone to therms vs. kWh or m3 confusion | Strict Zod schema validation + automated billing period gap/overlap checks |
| Human Verification Gate | None — hallucinated numbers flow directly into executive summaries | Mandatory human reviewer sign-off when OCR confidence drops below threshold or variance exceeds $\pm 15\%$ |
| GHG Math & Factor Provenance | Non-reproducible token prediction with unverified or outdated factors | Deterministic engine (v1.0.0) logging immutable input_hash and factor_snapshot |
2. Human-Gated Verification Boundaries & Reproducible Traceability
- Confidence & Schema Validation: Extracted quantities and units must be validated against strict schemas (such as Zod) and linked to the source invoice SHA-256 hash and PDF page coordinates.
- Deterministic Calculation Engine: Once verified by a human analyst, activity quantities pass to a deterministic, version-pinned calculation engine (
v1.0.0) that logs the exactinput_hashandfactor_snapshot. - Governance Across AI Workloads & Narratives: Sustainability and IT leaders deploying AI for ESG workflows should pair deterministic utility ingestion with cloud & AI compute carbon/water footprint tracking and anti-greenwashing controls for AI-assisted ESG disclosures.