19
19
prepare_llm ,
20
20
)
21
21
from pydantic import Field
22
- from ragas .metrics import Faithfulness , FaithfulnesswithHHEM
22
+ from ragas .metrics import Faithfulness
23
23
from langchain_core .prompt_values import StringPromptValue
24
24
25
25
@@ -37,10 +37,6 @@ class RagasFaithfulnessResult(EvaluationResult):
37
37
38
38
39
39
class RagasFaithfulnessSettings (RagasSettings ):
40
- use_hhem : bool = Field (
41
- default = False ,
42
- description = "Whether to use Vectara's HHEM-2.1-Open for faithfulness scoring." ,
43
- )
44
40
autodetect_dont_know : bool = Field (
45
41
default = True ,
46
42
description = "Whether to autodetect 'I don't know' in the output to avoid failing the evaluation." ,
@@ -63,11 +59,6 @@ class RagasFaithfulnessEvaluator(
63
59
docs_url = "https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/faithfulness/"
64
60
is_guardrail = False
65
61
66
- @classmethod
67
- def preload (cls ):
68
- cls .faithfulnessHHEM = FaithfulnesswithHHEM ()
69
- super ().preload ()
70
-
71
62
def evaluate (self , entry : RagasFaithfulnessEntry ) -> SingleEvaluationResult :
72
63
llm , _ = prepare_llm (self , self .settings )
73
64
@@ -81,7 +72,7 @@ def evaluate(self, entry: RagasFaithfulnessEntry) -> SingleEvaluationResult:
81
72
if skip :
82
73
return skip
83
74
84
- scorer = self . faithfulnessHHEM if self . settings . use_hhem else Faithfulness ()
75
+ scorer = Faithfulness ()
85
76
scorer .llm = llm
86
77
87
78
_original_create_statements = scorer ._create_statements
0 commit comments