Guardrails policy checks
A policy check is a typed question whose instructions + criteria are your rules (“refunds over $50 need a manager,” “do not quote medical dosage”). Jev scores compliance; code enforces it. This is the second layer after the Noul screen.
Unofficial. Official “how to build”: keep deterministic rules in code when you can; use System One for common-sense over unstructured text. We do not certify GDPR/HIPAA. No keys sold.
Pattern
- Put policy text and the artifact (draft reply, tool args) in structured
state. - One Noul per atomic rule: “Does
draftviolatepolicy.refund_capgivenorder.total?” - AND/OR in code. Do not hide five rules in one vague Score.
- Money and dates: extract numbers in code; ask Jev only about the semantic remainder (jaggedness).
violations = [
name for name, noul in answers.items()
if noul.noul >= T_VIOLATION
]
if violations:
return review(violations)
Use-case map “Universal Verification” also lists citation errors, tool-call mistakes, and response-quality failures — same shape, different instructions.
Honest limits
- Policy text in
statecan itself be attacked (injected “ignore the policy”). - A Noul of 0.01 is not a legal opinion.
- If a regex can enforce the rule, skip Jev.
Hub: Use cases. Sibling: guardrail glossary. Official: docs.typesafe.ai.
Sources
Public TypeSafe or adjacent documentation only. No private claims.