ARF Risk Scoring Model

A Bayesian risk scoring model for AI system reliability and failure prediction.
This model implements the core risk assessment logic from the Agentic Reliability Framework (ARF).

πŸ“Œ Problem

AI‑driven systems fail silently in production. Without a calibrated measure of failure probability, operations teams cannot decide whether to approve, deny, or escalate infrastructure changes.

πŸ” Mathematical Formulation

Given a set of signals (telemetry, context), the risk score is defined as:

[ \text{Risk}(x) = P(\text{Failure} \mid \text{Signals}, \text{Context}) ]

Internally, ARF combines:

  • Conjugate Beta priors for per‑category online updates.
  • Hyperpriors that share statistical strength across categories.
  • Hamiltonian Monte Carlo (HMC) to capture complex patterns (time‑of‑day, user role, environment).

The final risk score is a weighted average of these three components, with weights determined by data availability.

πŸš€ Usage

You can use this model directly via the ARF API, or integrate the underlying Python library.

Example with ARF API (Python)

import requests

response = requests.post(
    "https://a-r-f-agentic-reliability-framework-api.hf.space/api/v1/incidents/evaluate",
    json={
        "service_name": "payment-gateway",
        "event_type": "latency_spike",
        "severity": "high",
        "metrics": {"latency_p99": 350, "error_rate": 0.12}
    }
)
result = response.json()
print(f"Risk score: {result['risk_score']:.3f}")
print(f"Risk factors: {result['risk_factors']}")
print(f"Recommended action: {result['recommended_action']}")

Example using the ARF Python package

from agentic_reliability_framework.core.governance.risk_engine import RiskEngine

engine = RiskEngine()
risk, explanation, contributions = engine.calculate_risk(
    intent=some_intent,
    cost_estimate=100.0,
    policy_violations=[]
)
print(f"Risk: {risk}")

πŸ“š Links

πŸ“Š Input / Output

InputTypeDescriptionservice_namestringName of the service being evaluatedevent_typestringType of incident (e.g., latency_spike)severitystringlow / medium / high / criticalmetricsdictTelemetry values (latency, error rate, CPU, etc.)OutputTypeDescriptionrisk_scorefloatCalibrated failure probability (0–1)risk_factorsdictAdditive contributions from conjugate, hyperprior, HMCrecommended_actionstringapprove / deny / escalatedecision_traceobjectExpected losses and variance

πŸ“„ License

Apache 2.0 – See LICENSE for details.

🀝 Contributing

Contributions are welcome! Please refer to the contribution guidelines in the main repository.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support