
Self-RAG reflection-token decisions (Kamath Ch 7)
Source:R/kamath_llm2_native.R
morie_kamath_self_rag.RdA CLOSED reflection vocabulary; an unknown or contradictory token is refused rather than ignored.
Examples
morie_kamath_self_rag("ctx", function(c, q) "[Retrieve] [Relevant] [Utility:4]")
#> $tokens
#> [1] "[Retrieve]" "[Relevant]" "[Utility:4]"
#>
#> $by_group
#> $by_group$retrieve
#> [1] "[Retrieve]"
#>
#> $by_group$relevance
#> [1] "[Relevant]"
#>
#> $by_group$utility
#> [1] "[Utility:4]"
#>
#>
#> $retrieve
#> [1] TRUE
#>
#> $relevant
#> [1] TRUE
#>
#> $supported
#> NULL
#>
#> $support_level
#> NULL
#>
#> $utility
#> [1] 4
#>
#> $estimate
#> [1] 3
#>
#> $n
#> [1] 3
#>
#> $method
#> [1] "Self-RAG reflection-token decisions"
#>