ClassificationResult

@ApiStatus.Experimental
sealed interface ClassificationResult

A provider assessment. No match, insufficient evidence, and operational failure are distinct.

In JSON a classification result is an object whose status member names its class: selected, no_match, inconclusive or failure.

Inheritors

Types

Link copied to clipboard

Assessment failed operationally; this is not a judgment about the input.

Link copied to clipboard

The provider could not reach a sufficiently supported judgment.

Link copied to clipboard
data class NoMatch constructor(val provenance: ModelProvenance) : ClassificationResult, MappedClassificationResult<Nothing>

A successful judgment that none of the requested categories matches.

Link copied to clipboard
data class Selected constructor(val categoryId: String, val provenance: ModelProvenance, val confidence: Double? = null) : ClassificationResult

A canonical category ID with optional provider-reported confidence; no score is inferred. Confidence is finite and in 0,1, without a calibration guarantee. Direct construction cannot check membership; providers should use ClassificationSpec.selected, and consumers can validate against the spec or use CategoryMapping.map.