Skip to contents

Supported facts / total facts. facts must be 0/1 or logical.

Usage

morie_kamath_ch7_faithfulness_metric(facts)

Arguments

facts

Support indicators.

Value

List with estimate, n_supported, n_facts.

Examples

morie_kamath_ch7_faithfulness_metric(c(1, 0, 1, 1))
#> $estimate
#> [1] 0.75
#> 
#> $n_supported
#> [1] 3
#> 
#> $n_facts
#> [1] 4
#> 
#> $n
#> [1] 4
#> 
#> $method
#> [1] "RAG faithfulness = supported / total facts (Kamath Eq 7.2)"
#>