1:1 mentoring with Big Tech AI engineers
System Design

Guardrails & Safety

Where guards sit on one request (input, each tool call, output and stream), what each may decide, how to budget and overlap their latency, how to count their false blocks before enforcing, and what to do when a guard is down.

Last updated

Production12 min readFirst readSecurity Overview

After this section you can

  • Place a guard at each checkpoint and pick its verdicts
  • Budget guard latency and count its false blocks before enforcing
  • Choose fail-open or fail-closed for each action, with a reason
12

Guardrails & Safety

Where guards sit on one request, what each verdict does, and what happens when a guard is down.

Key idea

A guard is a probabilistic check with a latency, an error rate and a failure policy. Put it where its verdict can still change the outcome, and count its false blocks before you enforce it.

Three checkpoints on one request, each with a fallback
User 1 Input check Model 2 Action gate 3 Output check VERDICTS EACH CHECKPOINT CAN RETURN allow redact warn block allow require approval block allow redact warn retract block Fallback: a fixed message, never the model’s text ON A BLOCK

Blue request, amber model, teal checkpoints, red failure path, green output.

Related

More in System Design

Get full access to all 149 sections with code examples, diagrams, and interactive animations.

Unlock Premium