Trust Score Algorithm
Trust Score (0-100) represents overall platform trustworthiness based on hallucination detection, correction rates, and compliance posture. This guide explains the calculation.
Score Components
Trust Score = Hallucination Detection Rate × 0.35 + Correction Rate × 0.35 + Compliance Score × 0.30
Component 1: Hallucination Detection Rate (35%)
Measures how well hallucinations are detected and caught:
Detection Rate = Hallucinations Detected / (Hallucinations Detected + Missed)
Example:- Detected: 47 hallucinations- Missed: 3 hallucinations- Detection Rate: 47/50 = 94%- Component Score: 94 × 0.35 = 32.9/100Component 2: Correction Rate (35%)
Measures how many detected hallucinations are corrected:
Correction Rate = Corrected / Detected
Example:- Detected: 47 hallucinations- Corrected: 45 hallucinations- Correction Rate: 45/47 = 96%- Component Score: 96 × 0.35 = 33.6/100Component 3: Compliance Score (30%)
Measures regulatory and policy compliance:
Compliance Score = (Policies Enforced / Policies Defined) × 100
Example:- 12 policies defined- All 12 enforced successfully- Compliance Score: 12/12 = 100%- Component Score: 100 × 0.30 = 30/100
Overall: 32.9 + 33.6 + 30 = 96.5/100Scoring Bands
| Score | Interpretation | Action |
|---|---|---|
| 95-100 | Excellent | Maintain current posture |
| 85-94 | Very Good | Monitor for degradation |
| 70-84 | Good | Address emerging gaps |
| 50-69 | Fair | Significant improvements needed |
| <50 | Poor | Urgent intervention required |
Time-Based Averaging
Trust Score is smoothed over time to avoid noise:
Daily Score = Real-time calculation (as above)Weekly Score = Average of 7 daily scores (30% weight to last 3 days)Monthly Score = Average of 30 daily scoresOverall = Weighted average (today: 10%, this week: 30%, this month: 60%)This prevents single bad days from disproportionately affecting the score.
Historical Tracking
View score evolution:
history = client.shield.get_trust_score_history( granularity="daily", days=90)
for entry in history: print(f"{entry.date}: {entry.score}/100") print(f" Detection: {entry.detection_rate}%") print(f" Correction: {entry.correction_rate}%") print(f" Compliance: {entry.compliance_score}%")Benchmarking
Compare your score to industry peers:
benchmark = client.shield.get_score_benchmark()
print(f"Your Score: {benchmark.your_score}")print(f"Industry Average: {benchmark.industry_avg}")print(f"Your Percentile: {benchmark.percentile}%") # e.g., top 25%Next Steps
- Improving Score: Strategies to increase each component
- Monitoring: Set up score tracking
- Benchmarking: Compare against industry