
Top-1 prompt selection accuracy (Kamath Eq 3.8)
Source:R/kamath_llm2_native.R
morie_kamath_ch3_top1_prompt_metric.RdA(t) = mean over (x, y) of 1[y = argmax_y' P_LM(y'|x, t)]. A proportion, never a mean of the inputs.
Examples
morie_kamath_ch3_top1_prompt_metric(list(list("a", "pos"), list("b",
"neg")), "T1", function(x, t) c(pos = 0.9, neg = 0.1))
#> $estimate
#> [1] 0.5
#>
#> $n_correct
#> [1] 1
#>
#> $correct
#> [1] 1 0
#>
#> $template
#> [1] "T1"
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "top-1 prompt selection accuracy (Kamath Eq 3.8)"
#>