pub struct TifScore {
pub truth: f64,
pub indeterminacy: f64,
pub falsity: f64,
pub feedback_count: u64,
pub classification: TifClassification,
}Expand description
Truth-Indeterminacy-Falsity reliability score for a memory (T-I-F RFC Phase 3).
All three proportions (truth, indeterminacy, falsity) sum to 1.0.
Build via TifScore::from_feedback_history or TifScore::from_metadata.
Fields§
§truth: f64Proportion of positive feedback signals (upvote / positive).
indeterminacy: f64Proportion of uncertainty signals (flag).
falsity: f64Proportion of negative feedback signals (downvote / negative).
feedback_count: u64Total feedback events used to compute this score.
classification: TifClassificationHuman-readable reliability classification.
Implementations§
Source§impl TifScore
impl TifScore
Sourcepub fn from_feedback_history(history: &FeedbackHistoryResponse) -> Self
pub fn from_feedback_history(history: &FeedbackHistoryResponse) -> Self
Compute a TifScore from a memory’s FeedbackHistoryResponse.
Signals are bucketed as:
FeedbackSignal::Upvote/FeedbackSignal::Positive→ truthFeedbackSignal::Downvote/FeedbackSignal::Negative→ falsityFeedbackSignal::Flag→ indeterminacy
With no feedback the score is { truth: 0.0, indeterminacy: 1.0, falsity: 0.0, feedback_count: 0 }.
Sourcepub fn from_metadata(data: &Value) -> Option<Self>
pub fn from_metadata(data: &Value) -> Option<Self>
Deserialise a TifScore from a metadata["reliability"] map.
Expected keys: truth, indeterminacy, falsity, feedback_count (snake_case).