Logo di Data Drift Monitor

Data Drift Monitor

Organizzazione
SkillMedev
data-drift-monitor

Progetta un piano di monitoraggio in produzione del drift per i sistemi ML: test statistici per tipo di feature, soglie di allerta PSI e KS, frequenza del monitoraggio e trigger di riaddestramento basati su evidenze. Include un calcolatore PSI eseguibile. Usala quando qualcuno chiede «come faccio a capire se il mio modello sta mostrando drift?», «imposta il monitoraggio del drift per questo modello», «dovremmo riaddestrarlo?» o sta indagando su un calo inspiegabile delle prestazioni del modello. NON usarla per valutare se un modello è abbastanza valido da essere rilasciato: usa invece model-evaluation-report; per monitorare le esecuzioni di training, usa experiment-tracking; per documentare il modello ai suoi utilizzatori, usa model-card-writer.

Panoramica

Pubblicato daSkillMedev
Repositoryskills
Nome della skilldata-drift-monitor
Stelle
25
Fork
3
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da SkillMedev su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Data Drift Monitor in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/SkillMedev/skills/tree/main/skills/data-drift-monitor
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SkillMedev/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/data-drift-monitor .claude/skills/data-drift-monitor
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Data Drift Monitor in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Data Drift Monitor non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Data Drift Monitor non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Data Drift Monitor

Models trained on historical data degrade when the world changes. Drift monitoring is the early-warning system that distinguishes a model aging gracefully from one silently failing - and without thresholds tied to actions, it degenerates into dashboards nobody reads and alerts everybody mutes. This skill produces a monitoring plan where every alert has a named owner and a defined next step.

Operating procedure

Work in order: drift types (Step 2) determine which tests apply (Step 3), and thresholds (Step 5) are meaningless until cadence and coverage (Step 4) define what is measured.

Step 1: Gather inputs

  1. The model's top features by importance (at minimum the top 10) and their types (continuous vs categorical).
  2. Prediction volume and frequency - this sets monitoring cadence.
  3. Ground-truth label lag: how long after a prediction the true label arrives. If unknown, label the estimate a guess.
  4. The primary business metric the model serves and its current 30-day baseline.
  5. Retraining cost in engineering time and compute, so triggers can be calibrated against it.

Step 2: Classify what can drift

Not all drift requires the same response.

  • Data drift (covariate shift): input feature distributions change; the model may still work if the feature-label relationship holds.
  • Concept drift: the feature-label relationship itself changes; requires retraining regardless of input distributions.
  • Label drift: the ground-truth label distribution shifts; matters for classification thresholds.
  • Upstream drift: schema changes or pipeline failures masquerading as real drift. Rule this out first on every alert - a column silently going all-null "drifts" spectacularly.

Step 3: Match statistical tests to feature types

  • Continuous features: Population Stability Index (PSI) or Kolmogorov-Smirnov test.
  • Categorical features: chi-squared test or Jensen-Shannon divergence.
  • PSI interpretation: below 0.1 stable; 0.1 to 0.25 moderate - investigate; above 0.25 significant - act. Teams wanting a conservative action line trigger at 0.2.
  • Reference window: use a rolling reference (the last 30 days of training-representative data), not a fixed baseline frozen at training time - seasonality against a stale baseline manufactures false alarms.

Step 4: Set cadence and coverage

Monitoring everything at the same frequency is wasteful.

  • Always monitor the top 10 features by model importance at maximum frequency.
  • High-frequency inputs: daily. Low-frequency inputs: weekly.
  • Monitor the prediction (score) distribution itself daily - it is the cheapest single drift signal because it aggregates all inputs.
  • Concept-drift checks run on the label-lag delay: if labels arrive 14 days late, today's concept-drift verdict describes two weeks ago. Say so on the dashboard.

Step 5: Define alert thresholds and escalation

Alerts with no action plan create alert fatigue.

  • Warning: PSI above 0.1 on any monitored feature, or KS p-value below 0.05 - investigate, do not retrain yet. Check upstream pipeline first.
  • Critical: PSI above 0.25 (or 0.2 conservative), or the primary business metric drops more than 5 percent from its 30-day baseline - initiate the retraining evaluation.
  • Every alert routes to a named owner. Suppress alerts during known events (marketing pushes, holidays) with documented suppression windows, never silent mutes.

Step 6: Gate retraining on evidence

Retraining has a cost; trigger it on evidence, not on schedule alone.

  • Triggers: a critical drift alert, primary-metric degradation past threshold, or a quarterly review as the minimum floor.
  • Before retraining: verify the new training window does not encode the drift as label leakage (for example, an outage period teaching the model that a feature predicts the outage).
  • After retraining: shadow-deploy and compare against the incumbent on recent production data before promotion.
  • Document every retraining event: trigger reason, data window, metric delta, promotion decision. Feed the run into experiment-tracking.

Worked artifact: PSI calculator with output

Self-contained Python; edit the two distributions (bucket proportions over the same 10 bins) and run.

python
import math

def psi(ref, cur, eps=1e-6):
    return sum((max(c, eps) - max(r, eps)) * math.log(max(c, eps) / max(r, eps))
               for r, c in zip(ref, cur))

ref = [0.10] * 10  # reference: deciles of the rolling 30-day window
features = {
    "age_days":      [0.06,0.07,0.08,0.09,0.10,0.10,0.11,0.12,0.13,0.14],
    "session_count": [0.03,0.05,0.06,0.08,0.10,0.11,0.12,0.13,0.15,0.17],
    "spend_30d":     [0.02,0.04,0.05,0.07,0.09,0.11,0.13,0.14,0.16,0.19],
}
for name, cur in features.items():
    v = psi(ref, cur)
    verdict = "stable" if v < 0.1 else "investigate" if v < 0.25 else "ACT"
    print(f"{name:14s} PSI = {v:.3f}  -> {verdict}")

Expected output:

age_days       PSI = 0.063  -> stable
session_count  PSI = 0.214  -> investigate
spend_30d      PSI = 0.338  -> ACT

Read it: age_days is noise. session_count crossed the 0.1 warning line - investigate upstream before touching the model. spend_30d exceeds 0.25 - open the retraining evaluation, starting with the upstream-drift rule-out.

Deliverable

Produce a monitoring plan containing: the monitored feature list with test and cadence per feature, the warning and critical thresholds with named owners, the reference-window definition, the label-lag statement for concept-drift checks, the retraining trigger criteria and post-retraining shadow-deploy gate, and the retraining event log template.

Do NOT

  • Do not alert on drift without first ruling out upstream schema or pipeline failure - it is the most common cause and the cheapest fix.
  • Do not freeze the reference window at training time; seasonality will page you forever.
  • Do not retrain on a calendar schedule alone while ignoring evidence in either direction - it wastes compute when stable and reacts too slowly when not.
  • Do not treat a warning-level PSI as a retraining trigger; investigation and retraining are different responses with different costs.
  • Do not report concept-drift verdicts without stating the label lag; a "healthy" verdict on 14-day-old labels is not a statement about today.

Quality bar

The plan ships only when: every monitored feature has a test, a cadence, a threshold, and an owner; the two-tier warning/critical distinction maps to two different documented responses; the upstream-drift rule-out is the first step of every alert runbook; and the retraining gate includes both the leakage check and the shadow-deploy comparison.

Domande frequenti

Cosa fa la skill IA Data Drift Monitor?

Progetta un piano di monitoraggio in produzione del drift per i sistemi ML: test statistici per tipo di feature, soglie di allerta PSI e KS, frequenza del monitoraggio e trigger di riaddestramento basati su evidenze. Include un calcolatore PSI eseguibile. Usala quando qualcuno chiede «come faccio a capire se il mio modello sta mostrando drift?», «imposta il monitoraggio del drift per questo modello», «dovremmo riaddestrarlo?» o sta indagando su un calo inspiegabile delle prestazioni del modello. NON usarla per valutare se un modello è abbastanza valido da essere rilasciato: usa invece model...

Perché usare Data Drift Monitor su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Data Drift Monitor è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Data Drift Monitor in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/SkillMedev/skills/tree/main/skills/data-drift-monitor. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Data Drift Monitor?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Data Drift Monitor?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Data Drift Monitor: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Data Drift Monitor è gratuita?

Sì. È pubblicata su GitHub da SkillMedev con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇