Skip to main content
TealClassifier performs local content classification using ONNX models — no external API calls, no data exfiltration risk. It supports multiple ensemble modes that combine regex pattern matching with ML inference for high-accuracy, low-latency classification.
TealClassifier mitigates data exfiltration risk (OWASP ASI-04). By running classification locally via ONNX Runtime, sensitive content never leaves your infrastructure for classification purposes. The governance path remains deterministic — ML confidence scores are thresholded into binary allow/deny decisions.

Why This Matters

Compliance alignment: NIST AI RMF (MAP 2.3 — data minimization), ISO 42001 (A.8.2 — data management), GDPR Article 25 (data protection by design).

Ensemble Modes

TealClassifier supports four ensemble modes that combine regex and ML classification:

Class


ClassifierOptions


classify()

Classify a single content string.

ClassificationResult


Ensemble Behavior Examples

ensemble_union (Maximum Recall)

Flags content if either regex or ML detects it. Catches more, but may have higher false positive rate.

ensemble_intersection (Maximum Precision)

Flags content only if both regex and ML agree. Fewer false positives, but may miss novel patterns.

ONNX Model Loading

TealClassifier uses ONNX Runtime for inference. Models are loaded once and kept in memory.

Supported Model Formats


Custom Patterns

Extend built-in regex patterns with domain-specific patterns:

Fallback Behavior

When the ML model fails (corrupted file, OOM, unsupported operation), TealClassifier falls back gracefully:

Performance


Integration with TealEngine