Skip to main content
Jira progress: loading…

pef-me

Style Examples Used in the Docs

Advanced Topic – IPCC GLOSSARY (PDF)

TODOs

See Data & Compliance Models - 1. Global Disclosure Ontology (GDO).

Engine Metadata

No registry entry found for pef-me yet.

Input Table Structure

Source file: countries.xlsx
SignalTypeExampleDescription
iso_cc_idstringiso-028Internal surrogate key for ISO country record
iso_cd_idstringiso-028Internal surrogate key for ISO country record
Family
id
Used by engines
zhifpef-me
Used by modules
sem

For the exact PEF-ME request format, see .

The Monte Carlo configuration is illustrated in .

Inline badge:

iso_cc_id Experimental

Table Relationships (PEF-ME Neighborhood)

Table Graph Explorer

Loading table relationship graph…

E-C-O Numbers

E-C-O Number Types

ECO-196-123-456-789

Output Table Structure

Source file: countries.xlsx
SignalTypeExampleDescription
iso_cc_idstringiso-028Internal surrogate key for ISO country record
iso_cd_idstringiso-028Internal surrogate key for ISO country record
Family
id
Used by engines
zhifpef-me
Used by modules
sem

1. Overview

Purpose. Compute product-level PEF metrics with uncertainty bounds and traceable EF references.
Scope. SKU/BOM-level; supports BOM interpolation via BIME; outputs are consumable by EPDEX.

We route hazard intelligence through ZHIF, while product footprints are calculated via PEF-ME.

iso_cc_id Stable

!
Draft registry

This signal family is still evolving; avoid production dependencies.

Graph lineage generated

Table dependencies are compiled and in sync with graph_lineage.json.

ℹ️
Good to know

This engine is safe to use with the default profile in SEM.

.zyz-callout--chat

Promt...

How can I reduce GHG by 20% by 2030?

note

Some content with Markdown syntax. Check this api.

tip

Some content with Markdown syntax. Check this api.

info

Some content with Markdown syntax. Check this api.

warning

Some content with Markdown syntax. Check this api.

danger

Some content with Markdown syntax. Check this api.

2. Inputs

  • nace_code (string) — activity classifier; source: nace table
  • bom_lines[] (array<object>) — material composition & masses; source: BIME
  • energy_mix (object) — grid mix or supplier energy; source: countries/energy or ESU feed
  • geography (string) — ISO3; source: countries
  • ef_refs[] (array<string>, optional) — override EF IDs; source: efdb

JSON Schema contract: /schemas/mice_io.schema.json

3. Outputs

  • pef_score (number, unit: 'mPt') + uncertainty (p05/p50/p95)
  • hotspots[] (array<object>) — ranked contributors
  • provenance_ref (string) — hash to EF references bundle
  • quality_score (0–1)

4. Algorithms

  • Material mapping: BOM → EFDB category
  • Energy adjustment: country/plant energy mix application
  • Uncertainty: Monte Carlo over EF distributions; Bayesian update if verifier priors exist
from zayaz.engines.pef_me import compute_pef
result = compute_pef(bom_lines, nace_code="C.25.11", geography="NOR")
print(result["pef_score"], result["uncertainty"]["p95"])

5. Data Dependencies

6. Telemetry

Emitted events:

  • engine.invoked, engine.ok, engine.validation_failed, engine.timeout Key metrics:
  • latency_ms, records, p95_uncertainty, quality_score_mean

7. API

POST /api/v1/engines/pef-me:run
Request/response conform to /schemas/mice_io.schema.json.

8. Validation & Tests

  • Deterministic fixtures: /tests/fixtures/pef-me/
  • Stochastic CI: 1,000-run MC sanity; assert p50 within tolerance window

9. RBAC & Security

  • invoke_roles: admin, client.pro, verifier
  • view_roles: admin, verifier

10. Error Model & Fallbacks

  • If EF missing → fallback to parent EF category with penalty factor
  • If energy mix unknown → default to country baseline + warning

11. Versioning

  • Spec v0.2; API v1
  • Breaking changes recorded in CHANGELOG.md

12. Open Questions

  • PCR alignment for sector X
  • Treatment of recycled content credit in BOM lines

JSON Schema (Draft 2020-12)

/src/components/policy-generator.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://zayaz.eco/schemas/policy-generation.json",
"title": "ZAYAZ Policy Generation Schemas",
"type": "object",
"properties": {
"companyProfile": { "$ref": "#/$defs/CompanyProfile" },
"policyGenerationSpec": { "$ref": "#/$defs/PolicyGenerationSpec" }
},
"required": ["companyProfile", "policyGenerationSpec"],
  "$defs": {
"CompanyProfile": {
"title": "CompanyProfile",
"type": "object",
"additionalProperties": false,
"properties": {
"companyId": {
"type": "string",
"description": "Internal unique identifier for the company in ZAYAZ."
},
"legalName": {
"type": "string",
"description": "Official legal name of the company."
},
"brandName": {
"type": "string",
"description": "Common brand or trade name (if different from legalName)."
},
"size": {
"type": "object",
"description": "Size metrics and CSRD-related classification.",
"additionalProperties": false,
"properties": {
"employees": {
"type": "integer",
"minimum": 0
},
"turnoverEUR": {
"type": "number",
"minimum": 0
},
"balanceSheetTotalEUR": {
"type": "number",
"minimum": 0
},
"csrdScope": {
"type": "string",
"description": "Categorisation relative to CSRD thresholds.",
"enum": [
"micro",
"small",
"medium",
"large_undertaking",
"listed_sme",
"consolidated_group",
"non_eu_parent",
"not_in_scope",
"unknown"
]
}
},
"required": ["csrdScope"]
},
"jurisdictions": {
"type": "array",
"description": "List of main jurisdictions where the company operates or is regulated. Typically ISO 3166 country codes or higher-level labels like EU.",
"items": { "type": "string" },
"uniqueItems": true
},
"headquartersCountry": {
"type": "string",
"description": "Primary country of headquarters (ISO 3166-1 alpha-2 or alpha-3)."
},
"naceCodes": {
"type": "array",
"description": "Primary and secondary NACE activity codes.",
"items": {
"type": "string",
"pattern": "^[A-U][0-9]{2}(\\.[0-9]{1,2})?$"
},
"uniqueItems": true
},
"sectors": {
"type": "array",
"description": "Normalised sector tags used by ZAYAZ (ontology can be maintained separately).",
"items": { "type": "string" },
"uniqueItems": true
},
"languages": {
"type": "array",
"description": "Preferred languages for generated content (BCP-47 or ISO 639).",
"items": { "type": "string" },
"uniqueItems": true,
"default": ["en"]
},
"esrsApplicability": {
"type": "object",
"description": "Per-standard qualitative materiality/priority signal (from SIS/materiality engine).",
"additionalProperties": false,
"properties": {
"E1": { "$ref": "#/$defs/MaterialityLevel" },
"E2": { "$ref": "#/$defs/MaterialityLevel" },
"E3": { "$ref": "#/$defs/MaterialityLevel" },
"E4": { "$ref": "#/$defs/MaterialityLevel" },
"E5": { "$ref": "#/$defs/MaterialityLevel" },
"S1": { "$ref": "#/$defs/MaterialityLevel" },
"S2": { "$ref": "#/$defs/MaterialityLevel" },
"S3": { "$ref": "#/$defs/MaterialityLevel" },
"S4": { "$ref": "#/$defs/MaterialityLevel" },
"G1": { "$ref": "#/$defs/MaterialityLevel" }
}
},
"riskSignals": {
"type": "object",
"description": "High-level risk signals that can influence ambition, emphasis and examples.",
"additionalProperties": false,
"properties": {
"climatePhysical": { "$ref": "#/$defs/RiskLevel" },
"climateTransition": { "$ref": "#/$defs/RiskLevel" },
"biodiversity": { "$ref": "#/$defs/RiskLevel" },
"waterStress": { "$ref": "#/$defs/RiskLevel" },
"supplyChainHumanRights": { "$ref": "#/$defs/RiskLevel" },
"dataPrivacySecurity": { "$ref": "#/$defs/RiskLevel" },
"corruptionBribery": { "$ref": "#/$defs/RiskLevel" },
"productSafety": { "$ref": "#/$defs/RiskLevel" }
}
},
"tonePreferences": {
"type": "object",
"description": "Content style and tone preferences to steer policy drafting.",
"additionalProperties": false,
"properties": {
"formality": {
"type": "string",
"enum": ["low", "medium", "high"],
"default": "high"
},
"length": {
"type": "string",
"enum": ["short", "medium", "long"],
"default": "medium"
},
"audience": {
"type": "string",
"enum": ["internal_only", "external_only", "internal_external"],
"default": "internal_external"
},
"readingLevel": {
"type": "string",
"description": "Approximate CEFR-style reading level.",
"enum": ["B1", "B2", "C1", "C2"],
"default": "B2"
}
}
},
"contacts": {
"type": "object",
"description": "Optional key ESG-related roles used for governance sections.",
"additionalProperties": false,
"properties": {
"esgLeadTitle": { "type": "string" },
"boardCommitteeName": { "type": "string" },
"sustainabilityDepartmentName": { "type": "string" }
}
},
"metadata": {
"type": "object",
"description": "Free-form extension for internal use (e.g. tags, clusters, scoring).",
"additionalProperties": true
}
},
"required": ["companyId", "legalName", "size"]
},

"PolicyGenerationSpec": {
"title": "PolicyGenerationSpec",
"type": "object",
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string",
"description": "Idempotency / trace ID for this generation request."
},
"companyId": {
"type": "string",
"description": "Must match CompanyProfile.companyId. Used for logging and storage."
},
"templateId": {
"type": "string",
"description": "The template to base the policy on (e.g. tpl_policy_env_climate_change_v1)."
},
"language": {
"type": "string",
"description": "Language for the generated policy content (BCP-47 or ISO 639).",
"default": "en"
},
"targetAudience": {
"type": "string",
"enum": ["internal_only", "external_only", "internal_external"],
"default": "internal_external"
},
"policyPurpose": {
"type": "string",
"description": "How the policy will be used.",
"enum": [
"core_policy",
"supporting_policy",
"guideline",
"procedure",
"supplier_addendum",
"customer_facing_statement"
],
"default": "core_policy"
},
"strictnessLevel": {
"type": "string",
"description": "Desired ambition/strictness of commitments.",
"enum": ["low", "medium", "medium_high", "high"],
"default": "medium_high"
},
"detailLevel": {
"type": "string",
"description": "Granularity of operational detail.",
"enum": ["principles_only", "balanced", "detailed"],
"default": "balanced"
},
"includeFrameworks": {
"type": "array",
"description": "Framework tags that MUST be referenced or at least considered in phrasing.",
"items": { "type": "string" },
"uniqueItems": true
},
"excludeFrameworks": {
"type": "array",
"description": "Framework tags that MUST NOT be referenced explicitly (e.g. not applicable jurisdictions).",
"items": { "type": "string" },
"uniqueItems": true
},
"jurisdictionOverride": {
"type": "array",
"description": "If set, restrict adaptation to these jurisdictions instead of full companyProfile.jurisdictions.",
"items": { "type": "string" },
"uniqueItems": true
},
"maxWords": {
"type": "integer",
"minimum": 200,
"maximum": 10000,
"description": "Soft maximum word count for generated content."
},
"sectionsToInclude": {
"type": "array",
"description": "Optional whitelist of section IDs/names from the template to include.",
"items": { "type": "string" },
"uniqueItems": true
},
"sectionsToExclude": {
"type": "array",
"description": "Optional blacklist of section IDs/names from the template to remove.",
"items": { "type": "string" },
"uniqueItems": true
},
"enablePlaceholdersFallback": {
"type": "boolean",
"description": "If true, the AI is allowed to fill unresolved placeholders with generic but sensible text; if false, unresolved placeholders should be left as-is.",
"default": false
},
"rewriteExistingText": {
"type": "string",
"description": "Control how much the AI is allowed to modify baseline template wording.",
"enum": ["minimal", "moderate", "extensive"],
"default": "moderate"
},
"debugMode": {
"type": "boolean",
"description": "If true, engine may attach extra diagnostics (e.g. section mapping, applied frameworks).",
"default": false
},
"metadata": {
"type": "object",
"description": "Free-form extension point (e.g. UI origin, userId, scenario).",
"additionalProperties": true
}
},
"required": ["companyId", "templateId"]
},

"MaterialityLevel": {
"type": "string",
"enum": ["none", "low", "medium", "high", "unknown"],
"description": "Qualitative importance / materiality level for a topic."
},

"RiskLevel": {
"type": "string",
"enum": ["none", "low", "medium", "high", "unknown"],
"description": "Qualitative risk level classification."
}
}
}
GitHub RepoRequest for Change (RFC)