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

# AlertCondition

> Alert trigger conditions for metric comparisons.

Defines the comparison operator used to evaluate whether an alert should trigger
based on the metric value and threshold.

**Values:**

* `GREATER` = `"greater"` - Trigger when metric value > threshold. Common for drift detection, error rates, latency spikes.
* `LESSER` = `"lesser"` - Trigger when metric value \< threshold. Common for accuracy drops, traffic decreases, availability issues.

## Example

```python theme={null}
# Alert when data drift exceeds 5%
drift_alert = AlertRule(
    condition=AlertCondition.GREATER,
    threshold=0.05
)

# Alert when model accuracy drops below 90%
accuracy_alert = AlertRule(
    condition=AlertCondition.LESSER,
    threshold=0.90
)
```
