Metadata-Version: 2.4
Name: onto-standard
Version: 10.2.1
Summary: ONTO — Epistemic Risk Measurement and Grounding for AI Systems. Deterministic scoring (REP, EpCE, DLA), EM1-EM5 taxonomy, Ed25519 proof chain, GOLD v4.5 calibration. pip install onto-standard.
Author-email: ONTO Standards Council <council@ontostandard.org>
Maintainer-email: ONTO Standards Council <council@ontostandard.org>
License: Apache-2.0
Project-URL: Homepage, https://ontostandard.org
Project-URL: Documentation, https://ontostandard.org/docs/
Project-URL: Portal, https://ontostandard.org/app/
Project-URL: Paper, https://ontostandard.org/paper/
Project-URL: Repository, https://github.com/nickarstrong/onto-research
Project-URL: Research Data, https://github.com/nickarstrong/onto-research
Project-URL: Changelog, https://github.com/nickarstrong/onto-research/blob/main/CHANGELOG.md
Keywords: ai,ml,llm,calibration,uncertainty,epistemic,compliance,risk,onto,hallucination,grounding
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: api
Requires-Dist: httpx>=0.24; extra == "api"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# 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
