WitnessAI Documentation
List
Start Here
Start Here
Analytics
Analytics
Conversations
Conversations
Users
Users
Alerts
Alerts
Policy
Policy
Administration
Administration
Apps & Resources
Apps & Resources
Release Notes
Release Notes
Administrator Guide
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
- In the left navigation, select Policies.
- Select Add New Policy.
- Enter a Policy Name (for example,
Test - Data Protection) and a Policy Description. - 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.
- Open the policy's Sources & Destinations tab.
- 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.
- 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.
- 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
- Open the policy and go to the Guardrails area.
- Select Data Protection from the guardrail list to open its settings.
- Use the toggle to enable the guardrail. When enabled, all prompts routed through this policy are inspected.
Step 4 — Add an action and message
- Under Rules, select Add Action.
- Open the action menu and choose Warn. (The menu also offers None, Block, and Route.)
- 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
- Select Add Rule, then Add Data Type to open the Select Data Types panel.
- Expand a category and choose a data type that is easy to test — for example, United States Identity ▸ Social Security Number (SSN).
- Close the panel. The data type now appears in your rule.
The Data Protection guardrail, configured with an action and a data-type rule.
Step 6 — Save the policy
- Review the policy: a scoped source and destination, the Data Protection guardrail enabled, a Warn action with a message, and one data-type rule.
- 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
- As your test user, open the AI application or model you set as the destination.
- 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. - 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
- In the left navigation, select Conversations.
- Find the conversation from your test user (use the User filter and select Apply if needed).
- Select the row to open the Conversation Details panel.
- 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
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
PrerequisitesStep 1 — Open Policies and add a policyStep 2 — Set the source and destinationStep 3 — Enable the Data Protection guardrailStep 4 — Add an action and messageStep 5 — Add a data-type ruleStep 6 — Save the policyStep 7 — Verify with a test promptStep 8 — Confirm it in ConversationsWhat you'll have at the endRelated topics