The engineering field guide21 guides · Free to read

Models suggest. Your system decides.

AI guardrails,
from prompt
to production.

Understand prompt injection, validate outputs and control tool actions. Follow worked examples, then test what your own system allows.

Before a tool actsControl map / 01
  1. 01
    Input & retrieval

    A request meets outside content

    Keep the user’s authority separate from documents and tool results.

    Trace an indirect injection ↗
  2. 02
    Model output

    The model proposes an action

    Check the structure and meaning of the proposed arguments.

    Validate the output ↗
  3. 03
    Application boundary

    Enforce identity, scope and approval

    The system receiving the action checks whether it is allowed.

    Control the tool call ↗
  4. 04
    Observed result

    Check what actually happened

    Test the protected resource and keep the decision record.

    Build a useful test ↗
An example control path. The checks required depend on the action and the data it can reach.

What are AI guardrails?

AI guardrails are checks on an application’s inputs, outputs and actions. A content filter can reject a response; an authorization check can reject a tool request. Each control protects a different boundary, and each needs its own failure tests.

Choose your next task

Understand it. Build it. Check it.

All 21 guides ↗

Work through a concrete decision

The example is where the rule gets specific.

Follow a request through the control, the failure case and the evidence you would inspect. The examples make their assumptions explicit.

Open the worked examples ↗

From the test bench

Use what you learn

Try a policy decision.

Change the request, access and approval state. See why an illustrative policy allows, holds or denies the action.