# 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.

## GREATER

Trigger when metric value > threshold. Common for drift detection, error rates, latency spikes.

## LESSER

Trigger when metric value < threshold. Common for accuracy drops, traffic decreases, availability issues.

### Example

```python
# 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
        )
```

## GREATER *= 'greater'*

## LESSER *= 'lesser'*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiddler.ai/api/fiddler-python-client-sdk/constants/alert-condition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
