Confidence scoring (SNUG-126)

Confidence is an evidence-quality heuristic, not a probability of correctness or an answerability measurement. Implemented in brain/src/hippo_brain/confidence_scoring.py.

Output shape

Each hit carries a confidence object:

FieldMeaning
levelhigh, medium, low, or insufficient
scoreBounded composite in [0, 1] from named factors
factorsWeighted factor breakdown (name, weight, score, contribution, detail)
explanationAgent-readable one-liner summarizing top factors
withheldtrue when level is insufficient
score_semanticsRetrieval scale; see the score contract
relevance_calibratedfalse; relevance has not been calibrated
uncapped_scoreOriginal score retained when conflict analysis changes the confidence level

Factors

FactorWeightInputs
evidence0.30Inspectable evidence packet count
source_diversity0.15Distinct source_kind families
recency0.15Hit captured_at age
retrieval_match0.20Semantic distance score; relative ranks contribute zero
capture_health0.15Inline evidence[].freshness.status
context_alignment0.05cwd / git_branch present

Limitations — when confidence is withheld or capped

Surfaces