Skip to main content

verdict

Function verdict 

Source
pub fn verdict(
    assertions: &[AssertionResult],
    threshold: Option<f64>,
) -> (bool, f64)
Expand description

Promptfoo scoring: the score is the weighted mean of the assertion scores (weight 0 = report only). Without a threshold every gating assertion must pass; with one, the score must reach it. Excluded results (a judge’s unknown with unknown: exclude) take no part; a test whose results are all excluded passes with score 1.