Documentation Index
Fetch the complete documentation index at: https://docs.gorules.io/llms.txt
Use this file to discover all available pages before exploring further.
This guide shows how to build risk scoring models that combine multiple factors into an overall risk assessment.
What you’ll build
A risk scoring decision that:
- Evaluates multiple risk factors independently
- Weights factors based on importance
- Produces a composite risk score
- Classifies into risk categories
Decision flow
Example: Fraud risk scoring
{
"transaction": {
"amount": 1500,
"currency": "USD",
"country": "NG",
"isFirstPurchase": true
},
"customer": {
"accountAgeDays": 5,
"verificationLevel": "email_only",
"previousTransactions": 0
},
"device": {
"isKnown": false,
"vpnDetected": true,
"riskScore": 75
}
}
Step 1: Transaction risk factors
Score transaction-level signals:
Step 2: Customer risk factors
Evaluate customer signals:
Step 3: Device risk factors
Step 4: Calculate composite score
Combine all factors with weights:
Step 5: Risk classification
Map score to action:
Output structure
{
"riskScore": 85,
"riskLevel": "critical",
"action": "block",
"factors": {
"transaction": 45,
"customer": 65,
"device": 50
},
"signals": [
"High-risk country",
"New account",
"Unknown device",
"VPN detected"
]
}
Variations
Credit risk scoring
Best practices
Document factor weights — Make it clear why each factor has its weight.
Normalize scores — Use consistent 0-100 scales across factors.
Include signal details — Output which factors contributed to the score.
Tune thresholds — Adjust classification thresholds based on false positive rates.