Abstain and your line
abstain: true means: send this case to a person.
Built and tested, not yet deployed. Early access.
On this page
What abstain means
abstain is true when:
- the probability is under the line;
- the model gave no probability for its answer (
probabilityisnull,answeris still set); - the model declined the question (
answerandprobabilityarenull,reasonsis["model_declined"]).
A rule-settled answer has probability 1, so it never abstains, whatever line you set.
Your line: 0.8 unless you move it
The default line is 0.8, the same for all nine named decisions and for your own questions. To move it for one call, send abstainBelow with any number from 0.5 to 0.99. Anything else is a 400:
{ "error": { "message": "abstainBelow must be a number from 0.5 to 0.99", "field": "abstainBelow" } }
The worked pair
A sweepstakes casino’s descriptor at the default line: the answer is true at 0.621, under 0.8, so it abstains.
curl "$UNDERSTANDING_API_URL/v1/understand" \ -H "Authorization: Bearer $UNDERSTANDING_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "decision": "restricted_merchant", "input": { "merchant": "LUCKY COINS LLC", "mcc": "5816" } }'
const base = process.env.UNDERSTANDING_API_URL; const key = process.env.UNDERSTANDING_API_KEY; const body = { decision: "restricted_merchant", input: { merchant: "LUCKY COINS LLC", mcc: "5816" }, }; const res = await fetch(`${base}/v1/understand`, { method: "POST", headers: { Authorization: `Bearer ${key}`, "Content-Type": "application/json", }, body: JSON.stringify(body), }); const result = await res.json();
import os import requests base = os.environ["UNDERSTANDING_API_URL"] key = os.environ["UNDERSTANDING_API_KEY"] body = { "decision": "restricted_merchant", "input": {"merchant": "LUCKY COINS LLC", "mcc": "5816"}, } res = requests.post( f"{base}/v1/understand", headers={"Authorization": f"Bearer {key}"}, json=body, timeout=10, ) result = res.json()
{ "decision": "restricted_merchant", "type": "predicate", "answer": true, "probability": 0.62, "reasons": ["mcc_5816", "kind_sweepstakes_casino"], "abstain": true }
The same request with abstainBelow: 0.6: the same answer and probability, and abstain is now false. The line moves only abstain, never answer or probability.
curl "$UNDERSTANDING_API_URL/v1/understand" \ -H "Authorization: Bearer $UNDERSTANDING_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "decision": "restricted_merchant", "input": { "merchant": "LUCKY COINS LLC", "mcc": "5816" }, "abstainBelow": 0.6 }'
const base = process.env.UNDERSTANDING_API_URL; const key = process.env.UNDERSTANDING_API_KEY; const body = { decision: "restricted_merchant", input: { merchant: "LUCKY COINS LLC", mcc: "5816" }, abstainBelow: 0.6, }; const res = await fetch(`${base}/v1/understand`, { method: "POST", headers: { Authorization: `Bearer ${key}`, "Content-Type": "application/json", }, body: JSON.stringify(body), }); const result = await res.json();
import os import requests base = os.environ["UNDERSTANDING_API_URL"] key = os.environ["UNDERSTANDING_API_KEY"] body = { "decision": "restricted_merchant", "input": {"merchant": "LUCKY COINS LLC", "mcc": "5816"}, "abstainBelow": 0.6, } res = requests.post( f"{base}/v1/understand", headers={"Authorization": f"Bearer {key}"}, json=body, timeout=10, ) result = res.json()
{ "decision": "restricted_merchant", "type": "predicate", "answer": true, "probability": 0.62, "reasons": ["mcc_5816", "kind_sweepstakes_casino"], "abstain": false }
Choosing a line
A higher line sends more cases to people. Measure your own abstain rate on your own traffic before you lower it.
Note. Probabilities are the model’s own; they aren’t calibrated yet. We make no claim about accuracy or abstain rates at any line.
Planned: rule conflicts
When a gambling category code is answered “not gambling”, abstain with rule_differs. The switch exists in the code and is off until we decide; today the answer comes back as the model gave it.
# Abstain and your line
`abstain: true` means: send this case to a person.
Built and tested, not yet deployed. Early access.
## What abstain means
`abstain` is true when:
- the probability is under the line;
- the model gave no probability for its answer (`probability` is `null`, `answer` is still set);
- the model declined the question (`answer` and `probability` are `null`, `reasons` is `["model_declined"]`).
A rule-settled answer has probability 1, so it never abstains, whatever line you set.
## Your line: 0.8 unless you move it
The default line is 0.8, the same for all nine named decisions and for your own questions. To move it for one call, send `abstainBelow` with any number from 0.5 to 0.99. Anything else is a 400:
Response: 400 Bad Request
```json
{
"error": {
"message": "abstainBelow must be a number from 0.5 to 0.99",
"field": "abstainBelow"
}
}
```
## The worked pair
A sweepstakes casino’s descriptor at the default line: the answer is `true` at 0.62, under 0.8, so it abstains.
The request at the default line in cURL:
```bash
curl "$UNDERSTANDING_API_URL/v1/understand" \
-H "Authorization: Bearer $UNDERSTANDING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"decision": "restricted_merchant",
"input": { "merchant": "LUCKY COINS LLC", "mcc": "5816" }
}'
```
The request at the default line in TypeScript:
```typescript
const base = process.env.UNDERSTANDING_API_URL;
const key = process.env.UNDERSTANDING_API_KEY;
const body = {
decision: "restricted_merchant",
input: { merchant: "LUCKY COINS LLC", mcc: "5816" },
};
const res = await fetch(`${base}/v1/understand`, {
method: "POST",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
const result = await res.json();
```
The request at the default line in Python:
```python
import os
import requests
base = os.environ["UNDERSTANDING_API_URL"]
key = os.environ["UNDERSTANDING_API_KEY"]
body = {
"decision": "restricted_merchant",
"input": {"merchant": "LUCKY COINS LLC", "mcc": "5816"},
}
res = requests.post(
f"{base}/v1/understand",
headers={"Authorization": f"Bearer {key}"},
json=body,
timeout=10,
)
result = res.json()
```
Response: 200 OK (the probability is a stand-in)
```json
{
"decision": "restricted_merchant",
"type": "predicate",
"answer": true,
"probability": 0.62,
"reasons": ["mcc_5816", "kind_sweepstakes_casino"],
"abstain": true
}
```
The same request with `abstainBelow: 0.6`: the same answer and probability, and `abstain` is now false. The line moves only `abstain`, never `answer` or `probability`.
The request with the line at 0.6 in cURL:
```bash
curl "$UNDERSTANDING_API_URL/v1/understand" \
-H "Authorization: Bearer $UNDERSTANDING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"decision": "restricted_merchant",
"input": { "merchant": "LUCKY COINS LLC", "mcc": "5816" },
"abstainBelow": 0.6
}'
```
The request with the line at 0.6 in TypeScript:
```typescript
const base = process.env.UNDERSTANDING_API_URL;
const key = process.env.UNDERSTANDING_API_KEY;
const body = {
decision: "restricted_merchant",
input: { merchant: "LUCKY COINS LLC", mcc: "5816" },
abstainBelow: 0.6,
};
const res = await fetch(`${base}/v1/understand`, {
method: "POST",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
const result = await res.json();
```
The request with the line at 0.6 in Python:
```python
import os
import requests
base = os.environ["UNDERSTANDING_API_URL"]
key = os.environ["UNDERSTANDING_API_KEY"]
body = {
"decision": "restricted_merchant",
"input": {"merchant": "LUCKY COINS LLC", "mcc": "5816"},
"abstainBelow": 0.6,
}
res = requests.post(
f"{base}/v1/understand",
headers={"Authorization": f"Bearer {key}"},
json=body,
timeout=10,
)
result = res.json()
```
Response: 200 OK (the probability is a stand-in)
```json
{
"decision": "restricted_merchant",
"type": "predicate",
"answer": true,
"probability": 0.62,
"reasons": ["mcc_5816", "kind_sweepstakes_casino"],
"abstain": false
}
```
## Choosing a line
A higher line sends more cases to people. Measure your own abstain rate on your own traffic before you lower it.
> Note. Probabilities are the model’s own; they aren’t calibrated yet. We make no claim about accuracy or abstain rates at any line.
## Planned: rule conflicts
When a gambling category code is answered “not gambling”, abstain with `rule_differs`. The switch exists in the code and is off until we decide; today the answer comes back as the model gave it.
Source: /api/docs/abstain