AI Evaluation, Guardrails and LLM Safety
AI guardrails that protect LLM applications from prompt injection, PII leakage, unsafe output and unauthorised tool use. Multi-layer controls across input, retrieval, model, tool and output. Policy enforcement, human approval, audit logs and red-team evaluation. No single prompt is the security boundary.
Assess Your AI ControlsEngineering Decisions This Capability Addresses
Rule-based vs model-based
Rules are fast and predictable but only catch known patterns. Model-based catches nuanced patterns but adds latency.
Where to filter
Filtering before ranking prevents unauthorised content. Filtering after ranking is faster but riskier.
False-positive management
A guardrail that blocks legitimate work will be bypassed. False-positive rate must be monitored and tuned.
Human approval thresholds
High-stakes actions need human approval. The threshold determines the balance between speed and safety.
Reference Architecture and Workflow
Input check
User input checked for prompt injection, PII and policy violations
Retrieval control
Retrieved content checked for untrusted instructions and permission violations
Model inference
Model generates response from approved, filtered context
Tool policy check
Tool request checked against tool permission policy
Output check
Model output checked for unsafe content, PII and secrets
Action decision
System decides: allow, block, redact or escalate to human
Audit log
Every input, output, tool call and decision logged for audit
Options and Trade-offs
Rule-based guardrails
Deterministic rules for known patterns. Fast, predictable, no model needed.
Model-based guardrails
A classifier evaluates inputs and outputs for safety. Catches patterns that rules miss. Higher latency.
Hybrid guardrails
Rules for fast, known checks. Model for nuanced, unknown patterns. The most effective approach.
Human-in-the-loop
High-stakes actions routed to a human for approval. The strongest control for consequential decisions.
Evaluation, Operational Controls and Failure Handling
Attack detection
Percentage of known attacks that are detected and blocked
False-positive rate
Percentage of legitimate requests incorrectly blocked—should be low
Policy violations
Number of policy violations detected and blocked
Audit coverage
Percentage of actions with a complete audit trail—should be 100%
Unsafe-output escape rate
Percentage of unsafe outputs that were not caught—should be near zero
Solutions That Use This Capability
Assess Your AI Controls
Tell us the engineering challenge you are facing. We respond with how we would approach it.
Assess Your AI ControlsNo finished technical specification required.