- The counts. Each trace has the number of other accounts read under it. Each count is a feature, so you can filter on it and put a threshold on it, and the fit weighs it against your outcomes. What the counts are says exactly what they count.
- A narrow reading. The engine reads the status and the start of the name of each linked account, and answers one question: do these accounts show that this account is part of a group used for fraud or abuse?
Write the four traces on each account
Write each trace as an attribute on the account, and for each trace the judgment reads the other accounts with the same value. Each value is one block of a candidates relation, so the judgment has four relations on four keys, each with a count.- Write each value as a valid document id: up to 128 bytes of letters, digits,
.,_,-,:and/.- An email address or a phone number is not a valid id, so normalise it (lower case, no spaces) and write a hash of it, as hex.
- For the card, write the fingerprint your payment processor gives, and never the card number.
- Only exact values link. Two accounts link through a key only when they hold exactly the same value. Each account holds one value for each key, so an account seen on several devices links only through the device you write.
- Leave a key out when you do not have it. An account with no value, or a value that is not a valid id, is in no block for that key, so it reads no accounts there and no account reads it. Never write a placeholder such as
unknown, since every account without the key would then share it.
What the counts are, and are not
The starter reads up to 10 other accounts for each key, created within 365 days before the newest account with that value. Each count is the number of accounts the judgment read under its key. Account A shares a device with B and C, and a card with C. A’s judgment reads B and C and counts C under both keys, sodevices.count is 2 and cards.count is 1, although only two accounts link to A. D shares a phone with C but no key with A, so A never reads D.
- A count is per key, of the accounts shown.
devices.countis the other accounts read under the device key, at most 10 (the relation’slast_n) and all created within itswindow, so a count of 10 means 10 or more. - Not the number of linked accounts. An account that shares two keys with this one is counted under both, so the sum of the four counts can count one account twice.
- Not every account ever linked. An account created more than 365 days before the newest account with that value is not counted. The 365 days count back from that newest account, not from now and not from this account.
- Not a ring. The judgment reads only accounts that share a key directly with this one, since no relation follows a chain of shared keys. If A shares a device with B, and B a card with C, A never sees C.
- Show more accounts. Raise
last_n(up to 254) orwindow. Every account counted is also shown, so each one is in every judgment’s context and the size class grows with them. - Count more than the engine reads. Add a second relation on the same key, with a larger
last_nand"aggregate": {"count": true, "render": false}, and name its count infeatures. The engine never reads that relation, so the size class stays the same, and a change that moves only this count makes no engine call and is not billed.
Start from the linked accounts starter
Thelinked_accounts.risk starter is this judgment, ready to use. Fill it with your own paths.
POST /v1/namespaces/acme%2Fsignups/judgments
- It judges each account, meaning the documents whose
kindisaccount, and from the account it reads the status and the first 50 characters of the name. - For each key, it reads up to 10 other accounts with the same value, created within 365 days before the newest of them: when each was created, its status, and the first 50 characters of its name. It never reads the judged account itself.
- The counts are on the answer. Each answer and evaluation has
devices.count,phones.count,emails.countandcards.countunderfeatures. A query or a subscription can filter on them (onanswers.linked_risk.features.devices.count, for example). - Thresholds.
holdis 0.85 andreviewis 0.5, so you hold an account aboveholdand send the accounts between the two to a person.busy_deviceis true whendevices.countis 5 or more, with no engine involved. All three are starting values (see thresholds). - A new account waits for a quiet period. A judgment with features waits until an account has had no write for 10 minutes. To judge a new account within seconds of sign-up, send
"freshness": {"policy": "on_change", "debounce_ms": 0}(see debounce). - Your own wording. Send
dry_run: trueto get the filled definition, change it, and create the judgment from that. The starter needs all four keys, so if you have fewer, remove the unused relations and their features from the definition. - The dashboard. “Add: Linked accounts” in the relation editor fills the same four relations. Set the judgment’s Applies to to your accounts, and add the four counts to
featuresto keep them on the answer.
reference_index jobs in job_ids, and the answers are unavailable until the jobs are done.
A max_tokens of 1,800 keeps each judgment standard in size. Over it, Brussle removes linked accounts (the oldest of one key first) before it cuts any field of the judged account, and the evaluation records context_truncated: true. The counts are not cut, so they still count each selected account.
What the answer does not tell you
- Not a fraud verdict. The question, the criteria and the thresholds are starting values, and your outcomes measure how much fraud the judgment finds on your accounts.
- Not their answers. The judgment reads the linked accounts’ fields and never their answers, to this judgment or any other. When you act on an account, write the result to a field the judgment shows (a status set to
suspended, for example), and the accounts linked to it read that.
What it costs
A write to an account judges that account again, as for any judgment. The cost to plan for runs the other way. A change to what a key value shows judges again every account that shares the value.re-judgments a month = key value changes a month × accounts sharing the value inside the re-judge scope
- A key value changes when an account gets or loses the value (a new sign-up on a device), or when a field the judgment shows changes on an account with the value (a status set to
suspended). An edit to a field the judgment does not show changes nothing. - Brussle reads each value’s accounts once the value settles, and compares them with what they showed before. How fan-out works covers the quiet period, 10 minutes by default, and its 1-hour ceiling while changes continue.
- Nothing shown changed: Brussle makes no engine call, and nothing counts.
- Something shown changed: Brussle judges again each account in scope that shares the value. An account whose context did not change is not billed, although it still counts toward the rolling limit.
Brussle also bills each new sign-up’s own judgment, one each. All three cases are well inside the default rolling limit of 300,000 re-judgments in any 30 days.
Set the limits for your keys
Each control is a setting infreshness.fanout that you send at create or change with a PATCH, while window and last_n are in the definition. The controls, in order of effect explains each one. For linked accounts:
block_cap, 1,000 by default, is the most accounts one key value can have. Brussle refuses a create where a value already has more withinvalid_request, naming the value indetails.key. Such a value is usually a placeholder, or a device fingerprint every emulator reports, so remove it from those accounts or leave that key out. A value that passes the cap later waits, with its accountsstaleandstale_reasonlimit_reached, until it is back within the cap or aPATCHraises it.rolling_limitis 300,000 by default. The values that used the most of it wait first when it is short, so one busy device cannot make every other account stale.scope.created_withinis 30 days by default. An account created longer before a change to its key keeps its answer and readsstale(stale_reasonreferenced_changed) until its own next write. If an older account must be judged again when a new account links to it, send"scope": {"created_within": null}.
Confirm the cost before you create it
A create withoutconfirm: true returns its cost estimate and creates nothing. fanout.cost_usd_at_limit is the most that changes to key values can cost in any 30 days.
The replay estimate counts the writes to each account itself, and each account created in the last 30 days as judging again the accounts that share its values. The estimate cannot see a change to an existing account (a suspension, for example), so it says "excludes": ["candidate_edits", "candidate_deletes"] with lower_bound: true and its figures are “at least”. The rolling limit caps what the estimate cannot count (see what the replay estimate cannot count).
confirm: true agrees to both amounts, and after that no change to a key waits for a person.