
Groundedness reward (Kamath Ch 7)
Source:R/kamath_llm2_native.R
morie_kamath_groundedness_reward.Rd|answer tokens present in the context| / |answer tokens|.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_kamath_groundedness_reward(V, V)
#> $estimate
#> [1] 1
#>
#> $n_grounded
#> [1] 8
#>
#> $n_tokens
#> [1] 8
#>
#> $ungrounded
#> character(0)
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Groundedness reward (answer tokens found in context)"
#>