# ONTO Standard

**Epistemic Risk Measurement and Grounding for AI Systems.**

ONTO measures the gap between what AI claims to know and what it actually knows. Three deterministic metrics — REP (Response Epistemic Profile), EpCE (Epistemic Calibration Error), DLA (Dual-Layer Agreement) — scored against the EM1–EM5 epistemic marker taxonomy (92 patterns). Every evaluation signed with Ed25519 (104-byte proof chain).

Validated on 10 major AI systems. Mean risk score: 0.55 (Grade D). 9 of 10 hallucinated on verifiable questions. [Full data →](https://github.com/nickarstrong/onto-research)

## Installation

```bash
pip install onto-standard
```

## Quick Start

```python
from onto_standard import evaluate, Prediction, GroundTruth, Label

predictions = [
    Prediction(id="q1", label=Label.KNOWN, confidence=0.92),
    Prediction(id="q2", label=Label.UNKNOWN, confidence=0.15),
    Prediction(id="q3", label=Label.KNOWN, confidence=0.78),
    Prediction(id="q4", label=Label.UNKNOWN, confidence=0.45),
]

ground_truth = [
    GroundTruth(id="q1", label=Label.KNOWN),
    GroundTruth(id="q2", label=Label.UNKNOWN),
    GroundTruth(id="q3", label=Label.KNOWN),
    GroundTruth(id="q4", label=Label.UNKNOWN),
]

result = evaluate(predictions, ground_truth)
print(result.compliance_level)    # ComplianceLevel.STANDARD
print(result.risk_score)          # 18
print(result.ece)                 # 0.1025
print(result.u_recall)            # 1.0
print(result.certification_ready) # True
```

## CLI

```bash
onto-standard predictions.jsonl ground_truth.jsonl
```

## Compliance Levels

| Level | U-Recall | ECE | Use Case |
|------------|----------|--------|--------------------------------|
| **Basic** | ≥30% | ≤0.20 | Internal tools, prototypes |
| **Standard** | ≥50% | ≤0.15 | Customer-facing AI |
| **Advanced** | ≥70% | ≤0.10 | Regulated, high-stakes systems |

## ONTO Proxy (GOLD Injection)

For production grounding, connect your AI through ONTO Proxy. One line change — your model gains measurable epistemic discipline:

```python
# Before
client = OpenAI(api_key="sk-...")

# After — GOLD injected server-side
client = OpenAI(
    api_key="onto_...",
    base_url="https://api.ontostandard.org/v1/proxy/chat/completions"
)
```

GOLD never leaves the server. You get the effect, not the document.

| Tier | Price | Proxy Requests | GOLD Tier |
|-------------|------------------------|----------------|-------------------------------|
| Open | $0 | 500/day | TIER 2 (~17K tokens) |
| Standard | $30,000/yr ($2,500/mo) | 50,000/day | TIER 4 (~199K tokens) |
| Enterprise | $114,000/yr ($9,500/mo)| Unlimited | TIER 6 (~459K tokens) |

## Regulatory Alignment

- **EU AI Act** — Articles 9, 13, 15, 43
- **NIST AI RMF** — MEASURE function
- **ISO/IEC 42001** — Clauses 6, 8, 9

## Links

- Standard: [ontostandard.org](https://ontostandard.org)
- Documentation: [ontostandard.org/docs](https://ontostandard.org/docs/)
- Portal: [ontostandard.org/app](https://ontostandard.org/app/)
- Research Paper: [ontostandard.org/paper](https://ontostandard.org/paper/)
- Research Data: [github.com/nickarstrong/onto-research](https://github.com/nickarstrong/onto-research)
- API: api.ontostandard.org

## License

Apache 2.0 (SDK). GOLD corpus under [ONTO Gold Asymmetric AI License v5.1](https://ontostandard.org/docs/#license).

## Citation

```
Lee, T. (2026). ONTO: A Formal Framework for Measuring Epistemic Risk
in Large Language Model Outputs. ONTO Standards Council.
https://ontostandard.org/paper/
```

---

© 2026 ONTO Standards Council
