Case study01 / 06

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.

Case record

The same seven questions, every time.

Context
UK carbon-compliance reporting brings together emission factors, activity data, units, reporting boundaries and narrative explanation in one product.
My role
Independent product builder — full-stack design and delivery.
Constraint
Generated language can help someone understand a result, but it cannot be allowed to become the source of that result.
Decision
Treat deterministic emissions calculation as the numerical source of truth and run language models beside it, rejecting any figure the evidence package does not support.
Artefact
A live full-stack product with validated inputs, explicit calculation logic, stored provenance, provider routing, and token and cost tracking.
Result
Calculation and communication support one another without being confused for the same capability: narrative can evolve without changing the arithmetic, and providers can change without erasing provenance.
Boundary
The live product and this case study demonstrate the delivery state. The architecture notes describe the controls without claiming audited compliance outcomes.

Evidence ledger

What the work can show.

Authority
Deterministic calculationReportable values come from controlled calculation logic, not generated prose.
Guardrail
Unsupported figures rejectedGenerated narrative is checked against the evidence package before use.
Observability
Provider, token and cost trackingThe language-model layer remains visible as an operating component.

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.

Delivering a controlled system

ACTIVITY42.6kWh · sourceCALCULATION9.87kg CO₂eNARRATIVECHECKEDLIVESOURCE STOREDFIGURES VALIDATEDDETERMINISTIC FIGURESLIVE PRODUCT

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.

Connected evidence

Where this sits in the rest of the work.