Create your first policy and guardrail

Create your first policy and guardrail

WitnessAI Documentation
List
Start Here
Home
Discovery
Analytics
Conversations
Users
Alerts
Policy
Administration
Apps & Resources
Tutorials
Release Notes
Release Notes
November 3, 2026 WitnessAI Release
October 27, 2026 WitnessAI Release
October 20, 2026: WitnessAI Release
October 13, 2026: WitnessAI Release
September 29, 2026: WitnessAI Release
September 22, 2026: WitnessAI Release
September 15, 2026: WitnessAI Release
September 8, 2026: WitnessAI Release
September 1, 2026: WitnessAI Release
August 25, 2026: WitnessAI Release
August 18, 2026 WitnessAI Release
August 4, 2026 WitnessAI Release
July 21, 2026 WitnessAI Release
July 14, 2026 WitnessAI Release
July 9, 2026 WitnessAI Release
June 30, 2026 WitnessAI Hotfix
June 23, 2026 WitnessAI Release
June 16, 2026 WitnessAI Release
June 11, 2026 WitnessAI Release
June 4, 2026 WitnessAI Hotfix
June 2, 2026 WitnessAI Update
May 19, 2026 WitnessAI Update
April 30, 2026 WitnessAI Update
April 28, 2026 WitnessAI Update
April 23, 2026 WitnessAI Update
April 16, 2026 WitnessAI Update
April 14, 2026 WitnessAI Update
April 9, 2026 WitnessAI Update
April 2, 2026 WitnessAI Update
March 31, 2026 WitnessAI Update
March 24, 2026 WitnessAI Update
March 19, 2026 WitnessAI Update
March 17, 2026 WitnessAI Update
March 12, 2026 WitnessAI Update
March 5, 2026 WitnessAI Update
February 26, 2026 WitnessAI Update
February 24, 2026 WitnessAI Update
February 10, 2026 WitnessAI Update
January 27, 2026 WitnessAI Update
January 20, 2026 WitnessAI Update
January 13, 2026 WitnessAI Update
December 18, 2025 WitnessAI Update
December 9, 2025 WitnessAI Update
November 18, 2025 WitnessAI Update
November 25, 2025 WitnessAI Update
November 11, 2025 WitnessAI Update
October 28, 2025 WitnessAI Update
October 23, 2025 WitnessAI Update
October 9, 2025 WitnessAI Update
April 11, 2025: WitnessAI Release v2.0
Draft: November 10, 2026 WitnessAI Release
June 9, 2025: WitnessAI Update
June 23, 2025: WitnessAI Update
July 18, 2025: WitnessAI Update
September 30, 2025: WitnessAI Update
July 31, 2025: WitnessAI Update
August 12, 2025: WitnessAI Update
September 23, 2025: WitnessAI Update
October 2, 2025 WitnessAI Update
Integrations
API Reference
Administrator Guide
#
This tutorial walks you through governing AI traffic for the first time. You will create a policy, scope it to a test user or group, attach a Data Protection guardrail that detects sensitive data, save it, and then confirm it works by sending a test prompt and reviewing the result in Conversations.
By the end you will have a working policy that inspects prompts for sensitive data and warns the user when it is detected.
TIP
Scope this first policy to a single test user or a small test group so you can verify its behavior without affecting everyone.

Prerequisites

  • You must have permission to create and edit policies.
  • A test user (or a small test group) you can send a prompt as, so you can safely verify the policy.
  • An AI application or model your test user can reach, so the policy has a destination to match.

Step 1 — Open Policies and add a policy

  1. In the left navigation, select Policies.
  2. Select Add New Policy.
  3. Enter a Policy Name (for example, Test - Data Protection) and a Policy Description.
  4. Select Continue.

Step 2 — Set the source and destination

The Source and Destination determine when the policy applies. The policy triggers only when an interaction matches both.
  1. Open the policy's Sources & Destinations tab.
  2. In the Source section, choose a source type and pick the values it applies to. For this tutorial, choose Users (or Groups) and select your test user or test group.
  3. In the Destination section, choose a destination type and pick the values. To keep the test simple, choose Applications or Models and select the application or model your test user will use.
  4. Select Save.
IMPORTANT
You cannot select Any for both the source and the destination. Keep the source set to your test user or group so the policy stays narrowly scoped.

Step 3 — Enable the Data Protection guardrail

  1. Open the policy and go to the Guardrails area.
  2. Select Data Protection from the guardrail list to open its settings.
  3. Use the toggle to enable the guardrail. When enabled, all prompts routed through this policy are inspected.

Step 4 — Add an action and message

  1. Under Rules, select Add Action.
  2. Open the action menu and choose Warn. (The menu also offers None, Block, and Route.)
  3. In the message field, type the message users see when sensitive data is detected — for example, This prompt appears to contain sensitive data. Please remove it before continuing.
NOTE
Warn and Block require a message. Warn lets the user proceed after seeing the message, which makes it a good choice for a first test.

Step 5 — Add a data-type rule

  1. Select Add Rule, then Add Data Type to open the Select Data Types panel.
  2. Expand a category and choose a data type that is easy to test — for example, United States Identity ▸ Social Security Number (SSN).
  3. Close the panel. The data type now appears in your rule.
The Data Protection guardrail, configured with an action and a data-type rule.
 
The Data Protection guardrail configured with an action and a data-type rule.

Step 6 — Save the policy

  1. Review the policy: a scoped source and destination, the Data Protection guardrail enabled, a Warn action with a message, and one data-type rule.
  2. Select Save to apply the policy.
NOTE
A newly saved policy is added as Enabled near the bottom of the list. For a first test this is fine; if you need to pause it, you can toggle it off from the Policies list. See Create a policy.

Step 7 — Verify with a test prompt

  1. As your test user, open the AI application or model you set as the destination.
  2. Send a prompt that includes a sample value matching your data-type rule — for example, a test Social Security number such as 123-45-6789.
  3. Confirm the user sees the warning message you configured.
WARNING
Use only fake or sample values when testing. Never enter a real person's sensitive data.

Step 8 — Confirm it in Conversations

  1. In the left navigation, select Conversations.
  2. Find the conversation from your test user (use the User filter and select Apply if needed).
  3. Select the row to open the Conversation Details panel.
  4. Review the prompt: the detected sensitive value is shown as a redaction marker, and the matched policy and guardrail appear inline with the action that was taken.
Review the test prompt and the guardrail action in Conversations.
 
NOTE
Conversations in the WitnessAI Console
TODO: confirm the test prompt also surfaces on the Alerts page for a Warn action in your environment. If it does, you can open it from Alerts to see the full alert record.

What you'll have at the end

  • A policy scoped to a test user or group with a defined destination.
  • A Data Protection guardrail that detects a chosen data type and warns the user.
  • A verified result you can see in Conversations, confirming the guardrail inspected the prompt and applied its action.
From here, broaden the source to a larger group, add more data-type rules, or switch the action from Warn to Block once you trust the behavior.

Related topics