Policy as code
Knowledge base policy builder
Compose a guardrail from the same primitives the gateway evaluates, or write the YAML definition directly. Either way the policy-as-code document on the right is what ships — no translation layer, no drift between the written policy and the enforced one.
Draft ID · KBP-006
Rule identity
Metadata carried into the catalog
Severity
Knowledge base
Collections, classification and grounding thresholds
Conditions
Evaluated at ingestion and on every retrieval
When
Actions
Applied in order when the rule matches
Policy as code
Exactly what the gateway will execute
Enforce mode — matching traffic is acted on inline.
apiVersion: truint.ai/v1
kind: KnowledgeBasePolicy
metadata:
id: KBP-006
name: "Retail credit answers must cite the approved policy manual"
owner: "Knowledge Office"
scope: "Knowledge base · retail-credit"
spec:
severity: high
mode: enforce
knowledgeBase:
sources:
- "kb/retail-credit/manual-v22"
- "kb/retail-credit/circulars-2026"
classification: Internal
maxAgeDays: 90
minCitationCoverage: 90
retentionMonths: 84
audiences:
- "Credit officers"
- "Loan Approval Agent"
when:
- "kb.collection equals "kb/retail-credit""
- "AND retrieval.citationCoverage less than "90""
then:
- "Force citation rendering with source links"
- "Flag the source for knowledge refresh"Estimated added latency · 6–9 ms p99
Dry-run against the last 24 hours · 412 matches, 38 would have blocked
Requires AI Council approval before it reaches production.