Advisory AI Guardrails & Evidence Intake

Advisory AI never invents facts: every claim it emits is traced back to immutable upstream evidence, and every output is sanitized, citation-checked, and sealed before it leaves the service. This guide describes those guardrail stages and the evidence-intake boundaries that enforce them.

Audience: operators enabling Advisory AI in a tenant, and integrators who need to know exactly which evidence sources feed the model and how outputs are validated.

It binds Advisory AI guardrails to their upstream evidence sources and explains how Link-Not-Merge (LNM) documents flow into Retrieval-Augmented Generation (RAG) payloads.

1) Evidence sources and contracts

Upstream readiness gates (now satisfied)

Evidence feeds

All evidence items must carry content_hash + source_id; Advisory AI never mutates or merges upstream facts (Aggregation-Only Contract).

2) Guardrail stages

  1. Pre-flight sanitization
    • Redact secrets (AWS-style keys, PEM blobs, generic tokens).
    • Strip prompt-injection phrases; enforce max input payload 16kB (configurable, default).
    • Reject requests missing advisoryKey or linkset-backed evidence (LNM guard).
  2. Prompt assembly
    • Deterministic section order: advisory excerpts -> VEX statements -> SBOM deltas -> policy traces -> runtime hints.
    • Vector previews capped at 600 chars + ellipsis; section budgets fixed per profile (default, fips-local, gost-local, cloud-openai) in profiles.catalog.json and hashed into DSSE provenance.
  3. LLM invocation (local/remote)
    • Profiles selected via profile field; remote profiles require Authority tenant consent plus advisory-ai:operate and aoc:verify.
  4. Validation & citation enforcement
    • Every emitted fact must map to an input chunk (source_id + content_hash); citations serialized as [n] in Markdown.
    • Block outputs lacking citations, exceeding section budgets, or including unredacted PII.
  5. Output sealing
    • Store outputHash, inputDigest, provenanceHash; wrap in DSSE when configured.
    • Cache TTL defaults to 24h; regenerate only when inputs change or forceRefresh=true.

Metrics: advisory_ai_guardrail_blocks_total, advisory_ai_outputs_stored_total, advisory_ai_citation_coverage_ratio. Logs carry output_hash, profile, and block reason; no secrets or raw prompt bodies are logged.

3) RAG payload mapping to LNM (summary)

LNM fieldRAG chunk fieldNotes
observation._idsource_idUsed for citations and conflict surfacing.
observation.advisoryIdadvisory_keyKeyed alongside task type in cache.
observation.affected[].purlpurlIncluded for remediation + SBOM joins.
observation.severities[]severityPassed through unmerged; multiple severities allowed.
linkset.conflicts[]conflictsRendered verbatim for conflict tasks; no inference merges.
provenance.sourceArtifactShacontent_hashDrives determinism and replay.

See Evidence Payloads for full JSON examples and alignment rules.

4) Compliance with upstream artefacts and verification

5) Operator checklist