pub enum RankAgreement {
High,
Medium,
Low,
Insufficient,
}Expand description
Categorical confidence label for a returned top-K ranking.
Derived from the softmax-entropy and the within-query median
adjacent margin. The mapping is intentionally coarse: the three-
bucket view is what downstream consumers (Gap 01 suggest_hop, UI
badges) actually use. The richer four-label string form from the
solution design (confident / likely / tie / flat) is preserved in
RankAgreement::as_fine_label for telemetry.
Variants§
High
The top-1 lead is unusually large relative to the rest of the
ranking and entropy is low. Downstream: do not suggest a hop.
Fine label: confident.
Medium
The top-1 lead beats the within-query median margin but does
not meet the stricter entropy floor. Fine label: likely.
Low
Top-K is near-tied or flat. Downstream: Gap 01 suggest_hop
should fire (subject to its graph-size gate). Fine labels:
tie (top is near-tied with runners-up) and flat (entire
distribution is near-uniform).
Insufficient
K < K_MIN_SHAPE_GATE: sample too small to label meaningfully.
Consumers should treat this as “no signal”.
Implementations§
Source§impl RankAgreement
impl RankAgreement
Sourcepub const fn as_fine_label(self) -> &'static str
pub const fn as_fine_label(self) -> &'static str
Stable fine-grained label for telemetry (confident / likely
/ tie / flat / insufficient_k). The coarse three-bucket
RankAgreement variant is what programmatic consumers should
match on; this string is for dashboards and logs.
Trait Implementations§
Source§impl Clone for RankAgreement
impl Clone for RankAgreement
Source§fn clone(&self) -> RankAgreement
fn clone(&self) -> RankAgreement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RankAgreement
impl Debug for RankAgreement
Source§impl<'de> Deserialize<'de> for RankAgreement
impl<'de> Deserialize<'de> for RankAgreement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for RankAgreement
impl Hash for RankAgreement
Source§impl PartialEq for RankAgreement
impl PartialEq for RankAgreement
Source§fn eq(&self, other: &RankAgreement) -> bool
fn eq(&self, other: &RankAgreement) -> bool
self and other values to be equal, and is used by ==.