Engineering Capability

AI Guardrails and LLM Safety Engineering

Assess and strengthen the controls around an AI application. We define risks, evaluate behaviour and implement access, tool-use and review boundaries suited to the workflow.

Review Your AI Controls
Loading visual…

Risks and Actions to Control

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.

Evaluation Before Release

1

Input check

User input checked for prompt injection, PII and policy violations

control
2

Retrieval control

Retrieved content checked for untrusted instructions and permission violations

control
3

Model inference

Model generates response from approved, filtered context

ai
4

Tool policy check

Tool request checked against tool permission policy

control
5

Output check

Model output checked for unsafe content, PII and secrets

control
6

Action decision

System decides: allow, block, redact or escalate to human

control
7

Audit log

Every input, output, tool call and decision logged for audit

feedback

Permissions and Action Boundaries

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.

Monitoring and Incident 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

Deliverables

Illustrative test record

A retrieved file contains an instruction asking the agent to export unrelated records. The tool policy denies access to the export tool for that request, the attempt is logged with its context, and the agent continues the original task. Content filters alone would not have caught this — the enforcement point is the tool permission, not the text.

Review Your AI Controls

Tell us the engineering challenge you are facing. We respond with how we would approach it.

Review Your AI Controls

No finished technical specification required.

Frequently Asked Questions

Can guardrails prevent every incorrect answer?
No — and any claim of complete prevention should be treated with caution. Guardrails reduce specific, testable risks: known injection patterns, unauthorised tool use, unsafe output categories, unpermitted data access. Evaluation before release measures how the controls behave on representative and adversarial cases; monitoring catches what evaluation missed. Residual risk remains, and the deliverable includes a threat model that names what is and is not covered.
Where should tool permissions be enforced?
In the system, outside the model. A tool call is checked against a permission policy in code — identity, scope, rate limits — before execution, and consequential actions pass through human approval. Instructions inside a prompt are not an enforcement boundary: a model can be induced to ignore them, so authorisation lives in the application layer where it cannot be talked out of. The illustrative test record below shows this boundary in practice.
Can you assess an existing agent?
Yes. The assessment maps the agent's tools, data access and action paths, tests the current controls with representative and adversarial cases, and produces a threat model with prioritised remediation — what is enforced where, what is only instructed, and where the residual risk sits. It is a complete engagement on its own; carrying the fixes is optional.
What is the difference between rule-based and model-based guardrails?
Rule-based guardrails use deterministic patterns—blocked phrases, PII regex, rate limits. They are fast and predictable but only catch known patterns. Model-based guardrails use a classifier to evaluate inputs and outputs for safety. They catch nuanced and unknown patterns but add latency and can have false positives. The hybrid approach uses rules for fast, known checks and a model for nuanced, unknown patterns.