Concepts
Explain
GET /v1/decisions/{id}/explain says why a decision came out the way it did, in sentences a reviewer or a support agent can read. It reads only the stored decision, so it explains the decision as it was made, even after the policy has changed.
curl "https://api.getvindex.com/v1/decisions/$DECISION_ID/explain" \
-H "Authorization: Bearer $VINDEX_KEY"The summary
One sentence for the whole decision, and the policy line that decided it:
{
"id": "dec_f29c8d657b7b453baf27e2fa54497b3a",
"outcome": "review",
"summary": "Sent to review by real_person (checks.real_person.on_act). Score 0.99 reached the act line 0.50, so checks.real_person.on_act applied: send to review.",
"decided_by": {
"check": "real_person",
"policy_line": "checks.real_person.on_act",
"action": {
"type": "review"
}
},
"policy": {
"id": "pol_cb805d8999bd453f8f2b0ffd04f05b59",
"version": 1,
"youth_coded_adult": "review",
"adult_max_level": 5
}
}decided_by.policy_line is the part of the policy document that produced the outcome: checks.<check>.on_act, checks.<check>.on_review, adult.max_level or youth_coded_adult. On a clean allow, decided_by is null.
Per check
checks has one entry per check the policy ran, in policy order:
scoreandreview_scoreagainstact_lineandreview_line: the lines as they were when the decision was made.routed: which line the check reached,act,revieworallow.action: what the policy did about it.explanation: the same, as a sentence.signals: each signal that fired, with its probability, its own line, and a description.floors: forminors_sexual, each floor hit: which rule, where in the prompt as character offsets, and whether it counted. Never the matched text.adult_level: foradult, the level on the adult scale.
{
"check": "real_person",
"version": 1,
"routed": "act",
"action": {
"type": "review"
},
"policy_line": "checks.real_person.on_act",
"score": 0.99,
"review_score": 0.99,
"act_line": 0.5,
"review_line": 0.3,
"explanation": "Score 0.99 reached the act line 0.50, so checks.real_person.on_act applied: send to review.",
"signals": [
{
"signal": "rp_present",
"probability": 0.99,
"line": 0.5,
"text": "a specific real, identifiable person: 0.99 against a line of 0.50."
}
],
"floors": []
}What ran
actions.ran lists what happened because of the decision, in words: a review item opened, webhook deliveries queued, tags applied, or why nothing was sent (a dry run, a test key, shadow mode).
{
"actions": {
"review_id": "rev_b518334420eb45edb2508efe2f9a697d",
"webhook_events": [],
"webhooks_suppressed": null,
"tags": [],
"ran": [
"Opened review item rev_b518334420eb45edb2508efe2f9a697d."
]
}
}