> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up Alerts and Notifications

> Learn how to configure notification channels (Slack and PagerDuty) and set up alerts to monitor your AI application's performance and quality metrics. Maxim helps you stay updated about your AI application's performance and quality in real-time.

export const MaximPlayer = ({url}) => {
  return <iframe className="border-background-highlight-secondary h-full w-full rounded-md border-2 aspect-video" src={url} allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>;
};

## How to Set Up Alerts and Notifications?

Maxim provides a comprehensive alerting system that combines powerful notification channels with flexible alert configurations. Set up Slack or PagerDuty integrations to receive real-time notifications when your AI application's performance metrics or quality scores exceed specified thresholds.

## Notification Channels

Maxim supports multiple notification channels to ensure you stay informed about your alerts. Currently, we support [Slack](/integrations/create-a-slack-integration) and [PagerDuty](/integrations/create-a-pagerduty-integration) integrations.

<Note>
  You must set up at least one notification channel before creating alerts. Follow the instructions for your preferred notification channel.
</Note>

### Managing Integrations

You can manage your notification channel integrations in the following ways:

* **Edit an integration**: Hover over the integration on the Integrations page and click the edit icon
* **Delete an integration**: Hover over the integration and click the delete icon
* **View integration details**: Click on the integration to see its configuration and usage

<Note>
  When you delete an integration, any alerts using that integration will no longer send notifications. Make sure to update or remove those alerts first.
</Note>

## Performance Metrics Alerts

Monitor your application's performance by setting up alerts for latency, token usage, and cost metrics. Create custom thresholds and receive notifications when metrics exceed your specified limits.

<Note>
  Before creating alerts, make sure you have set up at least one notification channel in the [Notification Channels](#notification-channels) section above.
</Note>

### Available Performance Metrics

Set up alerts for:

* **Latency**: Response times for API calls
* **Token Usage**: Token consumption per request
* **Cost**: API usage expenses

### Creating Performance Alerts

<Steps>
  <Step title="Navigate to repository">
    Open the Logs page and select your repository
  </Step>

  <Step title="Access alerts tab">
    Select the **Alerts** tab and click **Create alert**
  </Step>

  <Step title="Configure alert settings">
    * Select **Log metrics** as the type of alert
    * Select a metric (Latency, Token Usage, or Cost)
    * Choose an operator (greater than, less than)
    * Enter the threshold value
    * Set minimum occurrence count
    * Define evaluation time range
  </Step>

  <Step title="Select notification channels">
    Select your preferred notification channels from the ones you've set up in the [Notification Channels](#notification-channels) section.
  </Step>

  <Step title="Save your alert">
    Click **Create alert**
  </Step>
</Steps>

<MaximPlayer url="https://drive.google.com/file/d/1jJc3wkB8LPi1q0RY8kEOWBnfuTI7CwE4/preview" />

### Performance Alert Examples

#### Monitor Response Time

```
Metric: Latency
Operator: greater than
Threshold: 1000 ms
Minimum occurrences: 5
Time range: 5 minutes
```

Triggers when response time exceeds 1 second in 5 requests within 5 minutes.

#### Setting Up Token Consumption Alerts

```
Metric: Token Usage
Operator: greater than
Threshold: 1000000
Minimum occurrences: 1
Time range: 1 hour
```

Triggers when hourly token usage exceeds 1 million.

#### Monitor Daily Costs

```
Metric: Cost
Operator: greater than
Threshold: 100 USD
Minimum occurrences: 1
Time range: 24 hours
```

Triggers when daily costs exceed \$100.

## Quality Metrics Alerts

Monitor your AI application's quality with alerts for evaluation scores and quality checks. Receive notifications when AI responses don't meet expected quality standards.

<Note>
  Before creating alerts, make sure you have set up at least one notification channel in the [Notification Channels](#notification-channels) section above.
</Note>

### Available Quality Metrics

Set up alerts for various evaluation scores, such as:

* **Bias-check**: Monitor potential biases in AI responses
* **Toxicity**: Check for inappropriate or harmful content
* **Clarity**: Validate clear and understandable output
* **Factual accuracy**: Verify generated information accuracy
* **Custom evaluators**: Monitor your defined evaluation metrics

### Creating Quality Alerts

<Steps>
  <Step title="Navigate to repository">
    Open the **Logs** page and select the repository you want to monitor.
  </Step>

  <Step title="Access alerts tab">
    Select the **Alerts** tab and click **Create alert**
  </Step>

  <Step title="Select alert type">
    Select **Evaluation scores** as the type of alert.
  </Step>

  <Step title="Configure alert settings">
    * Choose an evaluation metric (e.g., "Bias-check")
    * The violation criteria is based on your evaluator's type and configuration.
    * Specify how many times this should occur
    * Set the evaluation time range
  </Step>

  <Step title="Choose notification channels">
    Select your preferred notification channels from the ones you've set up in the [Notification Channels](#notification-channels) section.
  </Step>

  <Step title="Save your alert">
    Click **Create alert** to save your configuration.
  </Step>
</Steps>

<MaximPlayer url="https://drive.google.com/file/d/1F7MeY-fHmI8zF1rPwSd23ronC2gumFGa/preview" />

### Quality Alert Examples

#### Bias Check Alert

```
Metric: Bias-check
Minimum occurrences: 1
Time range: 15 minutes
```

Triggers when a response fails the bias check within 15 minutes.

#### Toxicity Alert

```
Metric: Toxicity
Condition: violates pass criteria
Score: 0.8
Minimum occurrences: 1
Time range: 5 minutes
```

Triggers when a response reaches 0.8 or higher toxicity score.

## Managing Alerts

Manage your alerts in the following ways:

* **Edit an alert**: Click the options icon (three dots) on the alert card and select "Edit alert"
* **Delete an alert**: Click the options icon and select "Delete alert"
* **Pause/Resume an alert**: Click the options icon and select "Pause alert" or "Resume alert"

## Best Practices

1. Monitor critical evaluators with immediate alerts for bias and toxicity
2. Adjust score thresholds to match application requirements
3. Combine evaluation metrics for comprehensive monitoring
4. Review and adjust alert criteria based on performance
5. Document quality issues and solutions from alerts

<Note>[Schedule a demo](https://getmaxim.ai/demo) to see how Maxim AI helps teams ship reliable agents.</Note>
