Labels and your own model
The default score is the same for everyone. What fraud looks like in an electronics store is not what it looks like in a healthcare SaaS. With labels, your account trains its own model that learns which reasons matter in your traffic.
How to label
When you confirm that a signup, order or login was fraud (chargeback, repeated trial account, scam), or that a suspicious case was legitimate:
curl -X POST https://siftil.com/v1/events/REQUEST_ID/label \
-H 'authorization: Bearer sk_…' -H 'content-type: application/json' \
-d '{"fraud": true}'That is why it pays to store the requestId next to the signup or order in your database.
You can also label in the dashboard: open the event and click Marcar como fraude (fraud) or Marcar como legítimo (legitimate).
When the model kicks in
- From 20 labels, with at least 3 fraud and 3 legitimate.
- Retrains on its own every 10 new labels. To retrain right away:
POST /v1/model. - Uses the 3,000 most recent labels.
What it returns
On every new event, suspect.learned is the fraud probability (0 to 1) according to your model, and suspect.model carries { n, auc }:
n: how many labels trained the model;auc: area under the ROC curve on a validation set of 20% held-out labels (only with 50 labels or more). 0.5 is a coin flip; above 0.85 is good.
const e = await getEvent(requestId)
if (e.suspect.learned !== null && e.suspect.learned > 0.8) return block()How it works
Logistic regression over the score's reasons (the same as in Signals), with L2 regularization. Simple on purpose: it trains in milliseconds, does not memorize a handful of examples, and the weights make sense to a human. GET /v1/model shows the learned weights.
Good practice
- Label both sides. Fraud alone teaches the model to distrust everything.
- Label by what happened, not by the score Siftil gave.
- Start by using
learnedalongside the score, not instead of it, until the AUC is stable.
Siftil · API v1 documentation