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
Risk Analysis guardrail
Risk Analysis is WitnessAI’s prompt risk analysis and control guardrail. Its primary purpose is to analyze user prompts to detect potential risks and assess their severity. This guardrail identifies activities that may harm the user or the business by evaluating prompts across multiple topics, such as Data Theft, Harmful Code Generation, Violence, and other high-risk areas.
When these types of activities are detected, administrators can configure the guardrail to Allow, Warn, or Block prompts and provide a customizable message to guide or inform the user.
WitnessAI Policies leverage the Risk Analysis guardrail to ensure safe, ethical, and compliant use of AI, protecting both users and organizational integrity.
Use Cases
Preventing Data Exfiltration
Warn or block prompts that attempt to extract sensitive information, such as proprietary algorithms or confidential business data.
Mitigating Harmful Code Risks:
Detect prompts that generate harmful or insecure code and notify the user to review their request.
Violence Prevention:
Block or warn users attempting to generate violent or harmful content, ensuring adherence to ethical and safety standards.
Risk Profiling:
Provide risk level analysis for user prompts to inform administrators about trends or emerging threats.
Using Risk Analysis guardrail Step-by-Step
Step 1: Create a New Policy
- In the left-side menu, click Policy, then Policies.
- Click Add New Policy.
- Enter a Policy Name and Policy Description (e.g., "High-Risk Prompt Monitoring Policy").
- Click Continue.
See Policy Creation for the full steps.
Step 2: Choose Who the Policy Applies To
- Open the Sources & Destinations tab.
- In the Source section, choose Groups or Users and pick the user groups or users.
- In the Destination section, choose the providers, models, applications or lists the policy covers.
Step 3: Configure the Risk Analysis guardrail
- Go to the Guardrails tab in the policy editor.
- Select Risk Analysis from the list of available guardrails.
- Enable the guardrail for the policy.
Step 4: Define guardrail Actions
- Specify the action to take when the Risk Analysis guardrail detects risky prompts:
- Allow: Permit the prompt to proceed without restriction.
- Warn: Display a customizable warning message to alert the user about potential risks.
- Block: Prevent the prompt from being processed by the model and provide an explanatory message.
- Customize the associated message to provide relevant guidance or warnings.
- Example Message: “The detected prompt poses a risk of harmful code generation. This activity is blocked. Please contact your administrator for more information.”
- Save the configuration.
Step 5: Select Risk Types
- Click Add Risk Type to open the Select Risk Types panel.
- Expand a category and choose the risk types this rule should detect, for example:
- Malicious Intent, with child types such as Illegal Activities and Self Harm.
- Harmful Content, with child types such as Hate Speech, Violence and Bias & Discrimination.
- Sensitive Content.
- Click Save in the panel.
- Under Set severity to, choose the rule's severity: High, Medium or Low.
- To track another group of risk types at a different severity, click Add Rule and repeat. The action and message from Step 4 apply to every rule.
WitnessAI maintains the list of risk types, so the categories you see can vary by tenant.
Step 6: Test and Save the Policy
- Test the policy configuration in a controlled environment to ensure it detects and handles risky prompts as expected.
- Once verified, save the policy to activate the Risk Analysis guardrail for the assigned User Groups.
Best Practices
- Severity Review: Regularly review the risk types and severities in your rules to match evolving organizational needs.
- User Communication: Use customized warning messages to educate users on acceptable prompts and potential risks.
- Comprehensive Testing: Validate the Risk Analysis guardrail configuration in test environments before deployment.
- Policy Documentation: Keep detailed records of risk settings and policy actions for compliance purposes.
By employing the Risk Analysis guardrail, organizations can proactively monitor and control user interactions with AI, reducing potential harm and ensuring safe and ethical use. This guardrail provides the flexibility to tailor risk management strategies to organizational requirements, safeguarding both users and business assets.