Verify LLM Output
Block AI responses that violate regulatory or corporate policies before they reach users. Formal verification using Z3 theorem proving.
$
pip install aare-core
view source
guardrail.py
from aare import HIPAAGuardrail
from langchain_openai import ChatOpenAI
llm = ChatOpenAI()
guardrail = HIPAAGuardrail()
# verify output before it reaches users
chain = prompt | llm | guardrail
try:
response = chain.invoke({"text": user_input})
except ViolationError as e:
# blocked - policy violated
log_violation(e.result)// pipeline
input
User Query
generate
LLM Response
verify
Aare
output
Safe Response
Current guardrails fail
- Prompt engineering: "please don't violate policies"
- Regex filters: brittle, easy to bypass
- Human review: doesn't scale
- Trust the model: jailbreaks happen
Aare provides proof
- Formal verification via Z3 theorem prover
- Post-generation: immune to prompt injection
- Audit-ready proof traces
- Configurable: block, warn, or redact
// use cases
live demo
HIPAA Compliance
Block PHI from AI responses in healthcare apps. All 18 Safe Harbor categories.
PCI DSS
Prevent credit card numbers and cardholder data in responses.
Corporate Policy
No competitor mentions, pricing commitments, or legal advice.
Content Safety
Block harmful content before it reaches users.
Data Leakage
Prevent internal data and API keys from being exposed.
Legal Compliance
GDPR, CCPA, and jurisdiction-specific regulations.
// hipaa demo
See verification in action
// click verify to check for violations
api log
[+]
// waiting for api call...
detects all 18 hipaa safe harbor categories
names
geographic
dates
phone
fax
email
ssn
mrn
health plan id
account #
license #
vehicle id
device id
urls
ip address
biometric
photos
other ids