Building carbon compliance around a numerical source of truth
How deterministic calculation, constrained language generation and visible provenance combine in a more dependable carbon-compliance product.
The challenge
Carbon reporting brings together factors, activity data, units, reporting boundaries and narrative explanation. The arithmetic must remain stable and inspectable even when the supporting experience uses generative AI.
That creates a clear product constraint: generated language can help people understand a result, but it cannot be allowed to become the source of that result.
A deliberate separation of responsibilities
Carbon Sorted treats deterministic emissions calculations as the numerical source of truth. Inputs are validated, calculation logic is explicit, and computed values are stored with the context needed to trace them later.
Language models operate beside that core. They can help produce constrained narrative, but unsupported figures are rejected. Provider routing and token and cost tracking make the AI layer observable as an operating component rather than a black box.
- Keep numerical calculation outside the language model.
- Carry provenance alongside every reportable result.
- Validate generated claims against known system values.
- Track model usage and cost as first-class product data.
What made the work difficult
The hard part was not a single model or interface. It was preserving trust across the joins: from data entry to calculation, from calculation to narrative, and from narrative to a report another person can review.
Automated tests focus on those boundaries. The aim is not simply to show a plausible answer, but to make the path to that answer inspectable and repeatable.
The result
The result is a live full-stack product in which calculation and communication support one another without being confused for the same capability. The architecture gives future features a stable base: narrative can evolve without changing the arithmetic, and providers can change without erasing provenance.