Docs

Reality Signal turns a model's raw confidence into true probability + uncertainty so you can build reliable routing: automate, reroute to a stronger model, or escalate — based on calibrated risk.

Quickstart

Call /decide to calibrate a score. Send /feedback to improve calibration over time.

Copy/paste a quick /decide call (Python or cURL), then send outcomes to /feedback.
Python
python
import requests

API_URL = "https://api.realitysignal.ai"
HEADERS = {"x-api-key": "YOUR_API_KEY"}

payload = { "features": { "score": 0.82 } }

res = requests.post(f"{API_URL}/decide", json=payload, headers=HEADERS)
res.raise_for_status()
data = res.json()

print(data)  # decision_id, p_true, uncertainty, decision
cURL
bash
curl -X POST https://api.realitysignal.ai/decide   -H "x-api-key: YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "features": { "score": 0.82 }
  }'
json
{
  "decision_id": 123,
  "p_true": 0.62,
  "uncertainty": 0.08,
  "decision": false
}
Send feedback
Use decision_id from /decide and send the outcome back to improve calibration over time.
bash
curl -X POST https://api.realitysignal.ai/feedback   -H "x-api-key: YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "decision_id": 123,
    "feedback": 1,
    "force_retrain": false
  }'
What you get back
Calibrated probability (p_true), uncertainty, and a boolean decision flag.
json
{
  "decision_id": 123,
  "p_true": 0.62,
  "uncertainty": 0.08,
  "decision": false
}

Real‑world patterns

Three common ways teams use Reality Signal in production decision workflows.

1) Reroute to a stronger LLM

Use p_true + uncertainty to decide when to fall back from a fast/cheap model to a stronger one.

python
rc = rc_decide(score)

if rc["p_true"] < 0.70 or rc["uncertainty"] > 0.15:
    answer = strong_model(prompt)   # reroute
else:
    answer = base_model(prompt)
2) Gate an agent action

Before an agent triggers a side effect (refund, email, purchase), require calibrated confidence above your safety threshold.

python
rc = rc_decide(action_confidence)

if rc["decision"]:
    perform_action()
else:
    reprompt_with_constraints()
    # or: request_human_review()
3) KYC / compliance triage

Route borderline cases to stricter checks or human compliance when uncertainty is high — while approving clearly safe cases.

python
rc = rc_decide(kyc_score)

if rc["p_true"] >= 0.90 and rc["uncertainty"] <= 0.10:
    approve()
elif rc["uncertainty"] > 0.20:
    send_to_compliance()
else:
    run_additional_checks()