For business
What it is
Automatic checks on what goes in and what comes out: no personal data leaks, nothing that breaks policy, the right tone.
Why it matters
Mistakes are caught by the system before a client or a regulator sees them, and the rules are written down instead of left to the model.
Risk without it
A single non-compliant answer can cost more than the whole system saves.
For engineers
How it works
Input checks (prompt injection, personal data) and output checks: deterministic rules first (forbidden phrases, required disclaimers, a PII scan), then classifier or LLM-judge checks for tone and policy. A failure triggers a retry with feedback or goes to a human.
Typical stack
- rule engine
- PII scanner
- classifier models
- LLM-as-judge with fixed rubrics
Pitfalls & trade-offs
- Rules before models: cheaper and predictable.
- Track false positives: over-blocking erodes trust too.
- Treat retrieved documents as untrusted input (prompt injection).
In this example
draft report
PII leak none policy pass advice tone pass
Fictional sample · not a client system