Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

Updated on 2026-10-04

Anomaly detection

How the product flags out-of-the-ordinary points in a series and what to do with them.

On this page (9)

Engine: Deterministic (no LLM)


1. What it does

Flags the "off-the-curve" points of a series on the dashboard, explains why each point was flagged, and helps you calibrate the sensitivity before you turn on an alert.

2. Deterministic or LLM?

100% deterministic. There is no LLM anywhere. It's pure math (moving average + standard deviation), with no I/O, reproducible bit for bit. A language model never decides what counts as an anomaly. The explanation, the backtest, and the sensitivity suggestion use exactly the same numbers as the detector.

How it works: each point is compared with the window before it (it only looks back, so the anomaly itself can't inflate the deviation and hide):

  • Default window: 8 previous points (ANOMALY_WINDOW).
  • Default sensitivity: 2.5σ (ANOMALY_SIGMA).
  • Minimum points in the series: 5 (ANOMALY_MIN_POINTS); each point needs ≥3 previous ones.
  • Relative floor: a change below 1% of the reference is never an anomaly (ANOMALY_MIN_DELTA_PCT) — this avoids alarms over 0.5% in a very stable series.

3. Data sent and egress

None. It runs entirely on our server over the already materialized snapshot. Nothing leaves the product and no tokens are spent.

4. Privacy and retention

There is no egress. The explanation of each anomaly uses exactly the same numbers as the detector (same window, mean, and deviation) — a test guarantees they match byte for byte.

5. Tokens, cost, and budget

Not applicable — it's deterministic, zero AI cost.

6. How to turn it on, who can use it, and how to turn it off

It's a dashboard visualization feature (per widget, via config.anomaly). It doesn't call an AI provider, so it doesn't go through the external-sending and budget checks. What turns it on or off is the widget's own configuration.

7. Refusals

  • Series too short (fewer than the minimum, or a point without 3 previous ones) → flags nothing (returns empty). "I don't know yet" instead of a made-up alarm.
  • Change below the relative floor → not flagged, no matter how many standard deviations it seems to be.

8. Limitations and absence of causality

  • It detects statistical deviation, not cause. "Point X is 3σ above the mean" does not mean something caused it — only that it stands out from its own recent history.
  • It's a simple moving-average detector: it does not capture seasonality, cycles, or regime changes. An expected seasonal spike may be flagged as an anomaly.
  • The backtest (how many times the rule would have fired on your history) always comes with the fixed warning: the past doesn't guarantee the future (AVISO_SUGESTAO_SIGMA).

9. How to validate

  • Reproducibility: detection is deterministic — the same dashboard always produces the same anomalies.
  • No egress: confirm that detection makes no external calls (there's no provider, no ai.usage event).
  • Explanation = detector: check that each point's explanation uses exactly the same window/mean/deviation that flagged the anomaly.
  • Backtest before turning it on: use the backtest and the sensitivity suggestion to see the historical firing rate and the warning that past ≠ future.

Related links