Skip to content

Commit 7c4e7e6

Browse files
pmbaumgartnerBaumgartner, Peter
andauthored
Correct Faithfulness Verdict Map (#739)
closes #736 Co-authored-by: Baumgartner, Peter <[email protected]>
1 parent 16cf5d7 commit 7c4e7e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ragas/metrics/_faithfulness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def _create_nli_prompt(self, row: t.Dict, statements: t.Any) -> PromptValue:
150150

151151
def _compute_score(self, output: t.Any):
152152
# check the verdicts and compute the score
153-
verdict_score_map = {"1": 1, "0": 0, "null": np.nan}
153+
verdict_score_map = {"1": 1, "0": 0, "-1": np.nan}
154154
output = output if isinstance(output, list) else [output]
155155
faithful_statements = sum(
156156
verdict_score_map.get(

0 commit comments

Comments
 (0)