
Round-trip back-translation prompt score (Kamath Eq 3.9)
Source:R/kamath_llm2_native.R
morie_kamath_ch3_back_translation_prob.RdP(t) = P_forward(t_hat|t) . P_backward(t|t_hat). The printed equation cannot be a round trip; the coherent reading is implemented, as in Python.
Examples
morie_kamath_ch3_back_translation_prob("a", "b", p_forward = 0.5,
p_backward = 0.25)
#> $estimate
#> [1] 0.125
#>
#> $p_forward
#> [1] 0.5
#>
#> $p_backward
#> [1] 0.25
#>
#> $candidate
#> [1] "a"
#>
#> $pivot
#> [1] "b"
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "round-trip back-translation score (Kamath Eq 3.9)"
#>