TrustScorer

fun interface TrustScorer

Policy SPI: assigns a trust score to a proposition.

Trust is an advisory signal layered on top of confidence: it lets consumers weight propositions by how much they trust the source (authorityTier) and how a clash with existing knowledge was classified (conflictType), without DICE core hard-coding any particular trust model. The cached score is later consumed by query filters and gates (a downstream stage).

The returned score is a value in [0.0, 1.0], where 1.0 is fully trusted and 0.0 is untrusted. Out-of-range scores from custom implementations are advisory only and must not be relied on for access control.

Consumers may supply their own implementation; the shipped default NeutralTrustScorer is deliberately trivial so behaviour is preserved until a consumer opts into a real trust model.

Inheritors

Functions

Link copied to clipboard
open fun score(proposition: Proposition): Double

Score a proposition when you have no authority or conflict context to pass.

open fun score(proposition: Proposition, authorityTier: AuthorityTier?): Double

Score a proposition given its authority tier but no conflict context.

abstract fun score(proposition: Proposition, authorityTier: AuthorityTier?, conflictType: ConflictType?): Double

Score the trustworthiness of a proposition.