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
Behavioral Activity guardrail
Behavioral Activity is the WitnessAI user behavior and intention guardrail. Its purpose is to monitor user behavior during interactions with AI models, determine the user’s intentions, and provide control over these activities.
When this guardrail detects a behavior you defined, it can Allow, Warn, Block, or Route the prompt to another model.
For example, technical support-related behaviors can be automatically routed to an internal model designed to assist employees, ensuring appropriate handling and alignment with internal policies.
WitnessAI Policies enable organizations to manage and control AI usage effectively. By using the Behavioral Activity guardrail, administrators can define rules that enhance compliance, productivity, and ethical AI use.
How it works
Behavioral Activity looks at the intention behind each user prompt, such as asking for programming help or comparing competitors, and applies the outcome you set for that behavior.
You shape the guardrail with rules. Each rule has two parts:
- A condition, shown as User Behavior: one or more behaviors the rule looks for. Each behavior has an editable Definition that describes what it means.
- A THEN outcome: a severity (High, Medium or Low) and an action (Allow, Warn, Block or Route).
The last rule, For all other behaviors, covers any prompt that none of your rules match, so the guardrail always has a defined outcome.
You can add rules by hand, have WitnessAI draft them from a Purpose you describe, or refine existing rules with AI.
Use Case Examples
Ethical AI Usage
Warn or block users attempting to engage in unethical or non-compliant behavior.
Secure AI Usage:
Block users generating prompts that might lead to security or compliance risks.
Behavioral Activity guardrails are integrated into policies to provide granular control over user behaviors.
Technical Support Queries
Route prompts requesting technical support to an internal model specialized for technical assistance.
Using Behavioral Activity Step-by-Step
This section covers how to add a Behavioral Activity guardrail to a policy. See Policy Creation for how to create a policy.
Adding a Behavioral Activity guardrail
After creating a Policy
- Click the Guardrails tab in the policy editor.
- Select the Behavioral Activity guardrail from the available options.
- Click the slide button to enable the guardrail.
- Optionally, describe what the policy is for in the Purpose field. WitnessAI uses the Purpose when it drafts or refines rules for you.
With the guardrail enabled, build its rules with any of the methods below.
Add a rule manually
- Click Manually Add Rule. Once the guardrail has at least one rule, the button reads Add Rule.
- Under User Behavior, select a behavior. You can search the list or type a new behavior name.
- Review the behavior's Definition and edit it if needed. A precise definition helps the guardrail detect the behavior.
- Under THEN, set the severity (High, Medium or Low) and choose the action:
- Allow: Permit the behavior without restriction.
- Warn: Display a customizable warning message to the user.
- Block: Block the behavior, with an optional message to the user.
- Route: Redirect the prompt to a specific model for specialized handling (e.g., route technical queries to an internal support model).
- Type a message or pick a saved one, or choose the destination model for Route.
- Save the configuration.
- Test the policy in a controlled environment to ensure it behaves as expected.
Generate rules from a Purpose
When the guardrail has no rules yet, WitnessAI can draft a starting set for you.
- In the Purpose field, describe the policy: the industry or domain, who it applies to, and the behavior you want to control.
- Click Create it for Me. The button appears only while there are no rules, and it stays disabled until you enter a Purpose.
- Review the summary of the proposed rules, then click Keep to accept them or Undo to discard them.
- Adjust any rule by hand, then save.
Refine rules with AI
Once you have rules, click Refine All Rules to have WitnessAI improve the whole set against your Purpose. Review the proposed changes, then click Keep, Undo or Try Again.
Add more than one behavior to a rule
In an open rule, click Add Behavior, choose the behavior and review its Definition. All behaviors in a rule share that rule's severity and action. To give behaviors different outcomes, add separate rules.
The For all other behaviors rule
The last rule, For all other behaviors, applies to prompts that no other rule matches. Set it to Allow to let everything else through, or to Block to stop everything you did not explicitly allow.
Note: When a rule lists more than one behavior, they have an implied “OR” relationship: a prompt that matches any of them gets that rule's outcome.
Best Practices
- Rule order: when a guardrail has several rules, it evaluates the prompt against each rule from top to bottom, and the first rule that matches applies its action. Rules lower down the list are not evaluated for that prompt.
- Behavior Routing: Define clear rules for routing prompts to appropriate models based on detected behaviors.
- Customization: Use the customizable warning feature to provide context-specific guidance.
- Testing: Always test policies and guardrails in a controlled environment before deploying them organization-wide.
Behavioral Activity guardrailHow it worksUse Case ExamplesEthical AI UsageSecure AI Usage:Technical Support QueriesUsing Behavioral Activity Step-by-StepAdding a Behavioral Activity guardrailAdd a rule manuallyGenerate rules from a PurposeRefine rules with AIAdd more than one behavior to a ruleThe For all other behaviors ruleBest Practices