Notifications
Get alerted when your rules trigger through multiple communication channels
Notifications
Notifications allow you to receive alerts through various communication channels when your rules are triggered. This feature helps you stay informed about potential issues with your AI system’s performance in real-time.
Overview
The notification system works with rules to:
- Monitor your evaluation metrics
- Check if they meet your defined conditions
- Send alerts through your preferred channels when conditions are met
Notifications can be configured globally or per rule, allowing you to customize how you’re alerted based on the specific rule that was triggered.
Rules and notifications only work with built-in APIScorers. Local scorers and custom scorers are not supported for triggering notifications.
Notification Configuration
Notifications are configured using the NotificationConfig
class from the judgeval.rules
module.
Configuration Options
Parameter | Type | Description |
---|---|---|
enabled | boolean | Whether notifications are enabled (default: True ) |
communication_methods | list of strings | The methods to use for sending notifications (e.g., ["email", "slack"] ) |
email_addresses | list of strings | Email addresses to send notifications to |
send_at | integer (Unix timestamp) | Schedule notifications for a specific time (learn more) |
For aggregated reports and periodic summaries of multiple alerts, use the Scheduled Reports feature in the Judgment Platform.
Basic Configuration
Communication Methods
Judgeval supports multiple communication methods for notifications:
"email"
: Send emails to specified email addresses"slack"
: Send messages to configured Slack channels
You can configure multiple methods to be used simultaneously.
Slack Integration
For detailed information on integrating Slack with Judgment notifications, see the Platform Notification Center documentation.
Attaching Notifications to Rules
Notifications can be attached to rules during rule creation or added/configured later.
During Rule Creation
Scheduled Notifications
You can schedule one-time notifications to be sent at a specific time using the send_at
parameter:
The send_at
parameter accepts a Unix timestamp (integer) that specifies when the notification should be sent. This is useful for delaying notifications or grouping them to be sent at a specific time of day.
The send_at
parameter only delays when a single notification is sent. It doesn’t create recurring notifications or group multiple alerts together. Each time a rule is triggered, a separate notification is generated.
Notification Types in the Platform
The Judgment Platform offers two main types of notifications:
-
Evaluation Alerts - Real-time notifications sent when specific rules are triggered. When using the API, these can be scheduled for a specific time using the
send_at
parameter. -
Custom Alert Recaps - Periodic summaries (daily, weekly, monthly) of evaluation metrics and alerts. These are configured in the Platform Notification Center.
Setting Up Custom Alert Recaps
To set up periodic notification summaries:
- Navigate to the Notifications page in your Judgment account settings
- Under “Custom Alert Recaps,” click the ”+” button to create a new report
- Configure your preferred frequency (Daily, Weekly, Monthly) and delivery time
- Add recipient email addresses
For more details, see the Scheduled Reports documentation.
Judgment Platform Features
For information about configuring notifications in the Judgment web platform, including email alerts, scheduled reports, and Slack integration, see the Platform Notification Center documentation.
Practical Example
Here’s a complete example showing how to set up rules with notifications and integrate them with the Tracer: