Skip to main content
Jira progress: loading…

AIIL-PP

Prompt & Policy Contracts

1. Prompt & Policy Contracts

1.1. Purpose

The Prompt & Policy Contracts layer provides a deterministic guardrail for how ZAYAZ’s AI agents interact with knowledge stores, computation hubs, and governance rules.

Unlike free-form prompting, this system uses contractual patterns: reusable skeletons, substitution tokens, and enforcement policies.

  • Goal: Prevent hallucination and enforce compliance tone.
  • Scope: RAG queries, refusal templates, structured outputs, and multi-framework extensions.
  • Design principle: Prompts must be auditable, reproducible, and bound to policy.

1.2. Prompt Skeletons

All system prompts follow a three-layer skeleton:

Prompt Skeletons
Defines behavior and obligations: "You are ZAYAZ, a compliance-grade ESG AI assistant. Always cite document IDs and page/line numbers."

Example (YAML contract)

instruction.yaml
system: |
You are ZAYAZ, a compliance-grade ESG assistant.
Your responses must:
- Always ground answers in provided context.
- Return citations in [DocID:Lx-Ly] format.
- Refuse if context is insufficient.

user_template: |
User asks: {question}
Context:
{context_blocks}

1.3. RAG Prompt with Context-Only + Citations

The core retrieval prompt forces the model to anchor exclusively in retrieved context.

Policy Contract:

  • No external knowledge.
  • Always cite.
  • Refusal if context coverage < 70%.

Example (Python snippet)

rag-instruction.yaml
system: |
You are ZAYAZ, a compliance-grade ESG assistant.
Your responses must:
- Always ground answers in provided context.
- Return citations in [DocID:Lx-Ly] format.
- Refuse if context is insufficient.

user_template: |
User asks: {question}
Context:
{context_blocks}

Output Example:

“Under ESRS E1, companies must disclose Scope 1–3 GHG emissions [ESRS_E1.pdf:L52-L78].”

1.4. Refusal & Disclaimer Templates

Refusals must be structured, consistent, and jurisdiction-aware.

CaseTriggerTemplate
Insufficient ContextNo matching RAG results"I cannot answer with certainty given the provided sources."
Jurisdiction MismatchQuery outside supported frameworks"This query relates to {framework}, which is not yet supported in ZAYAZ Phase I. Supported: ESRS only."
Unsupported SpeculationUser asks for speculative “predictions”"I cannot provide financial or speculative predictions outside validated ESG contexts."
Scenario-Based EstimateUser asks for permissible Forward-Looking"Based on IPCC EFDB data and EU decarbonization pathways, a 30% reduction could be achieved in ~12–15 years under baseline assumptions. *Disclaimer: this is a modeled estimate with uncertainty, not a guaranteed outcome.*"

1.5. Forward-Looking Estimates & Disclaimers

While speculative or unsupported predictions must be refused, scenario-based forward-looking analysis is both valuable and permitted, provided it is anchored in validated data (e.g., IPCC pathways, EFDB factors, EU decarbonization targets).

Examples of Two Types of “Forward-Looking” Queries

  • Prohibited Forward-Looking

    • Speculative with no grounding at all.
    • Example: “Tell me what stock price Tesla will have in 2030.”
    • ✅ Here, refusal is correct.
  • Permissible Forward-Looking (with contracts)

    • Scenario-based, model-driven, grounded in standards or validated methods.
    • Example: “How fast can we reduce our GHG emissions by 30% given IPCC pathways?”
    • Example: “When might Europe reach 1.5°C given current NDCs?”
    • ✅ Here, ZAYAZ should provide an estimate, with explicit disclaimers (uncertainty, assumptions, model references).

Rules:

  • Allow projections that can be tied to validated models or datasets.
  • Require disclaimers on uncertainty, assumptions, and non-guarantee.
  • Refuse irrelevant speculation (e.g., stock prices, unrelated financial forecasts).

Prompt contract snippet (YAML):

prompt-contract-snippet.yaml
forward_looking:
allow_scenario: true
require_disclaimer: true
disclaimer_text: "Disclaimer: This is a modeled estimate with uncertainty. Not a guaranteed outcome."
prohibited_topics:
- speculative stock prices
- unvalidated financial forecasts

Python enforcement layer:

enforcement-layer.py
if query_type == "forward-looking":
if scenario_based:
return f"{answer}\n\nDisclaimer: This is a modeled estimate with uncertainty. Not a guaranteed outcome."
else:
return "I cannot provide speculative predictions outside validated ESG contexts."

Outcome

  • ZAYAZ does not block valuable forward-looking climate/scenario analysis.
  • Clients still get projections & estimates (high value).
  • Every forward-looking output is wrapped in a compliance-grade disclaimer.
  • Regulators/auditors see that ZAYAZ distinguishes between unsupported speculation vs. model-driven scenario analysis.

1.6. Policy Enforcement

JiraStoryUnlinkedZYZ-728AIIL-PP#16-policy-enforcement#1

Prompts are tied to runtime enforcement contracts:

  • Regex Policies → Validate citation format ([.+?:L\d+-L\d+]).
  • Post-Processors → Strip unsupported content (e.g., disclaimers if needed).
  • Eval Harness Integration → During test runs, responses failing citation/refusal rules are marked as No-Go.

Example (policy enforcement config):

enforcement-config.json
{
"rules": {
"require_citations": true,
"citation_pattern": "\\[.+?:L\\d+-L\\d+\\]",
"refusal_on_missing_context": true,
"tone": "compliance"
}
}

1.7. Multi-Framework Extension

JiraStoryUnlinkedZYZ-729AIIL-PP#17-multi-framework-extension#1

As ZAYAZ expands beyond ESRS, framework tags are embedded in the policy contracts.

Framework Registry Table

FrameworkStatusVersionEffective DateNotes
ESRSSupported2025.12025-01-01Full scope: ESRS 1–2, E1–E5, S1–S4, G1
ISSBPlannedDraftTBDAlignment with IFRS S1/S2
SECPlannedDraftTBDClimate disclosure rule
GRIFutureTBDTBDMapping in backlog

Example (multi-framework binding):

multi-framework-binding.yaml
system: |
You are ZAYAZ. Respond only with frameworks marked as "Supported" in the Framework
Registry.
If a query references a "Planned" or "Future" framework, provide a jurisdiction-
aware refusal.

Enforcement Logic (Python/Pseudo-code):

enforcement-logic.py
def get_supported_frameworks():
return db.query("SELECT framework FROM framework_registry WHERE status='Supported'")

def handle_query(query, framework):
supported = get_supported_frameworks()
if framework in supported:
return run_rag(query, framework)
else:
return f"{framework} is not yet supported in ZAYAZ. Currently supported: {', '.join(supported)}."

1.8. Summary

The Prompt & Policy Contracts ensure:

  • Grounded answers → Always from RAG context.
  • Provenance → Citations enforced via regex + post-processing.
  • Compliance tone → Refusals structured and jurisdiction-aware.
  • Extensibility → Framework tags allow seamless future integration.

Together, they make prompts reproducible, auditable, and enforceable — moving AI from “black box” to policy-compliant assistant.



GitHub RepoRequest for Change (RFC)