Skip to main content

answer_confidence

Function answer_confidence 

Source
pub fn answer_confidence(p: &[f64], k: usize) -> f64
Expand description

Probability mass on the answer being reported: max(p[:k]), clamped to [0, 1].

This is the quantity temperature scaling fits and every calibration figure is computed on (conf = max(probs)), so it is the one confidence with the calibration guarantee the gating docs rely on. confidence_from_probs reports a different quantity on a different scale and carries no such guarantee, so the two must not be compared against the same threshold.