diff --git a/src/ragas/metrics/_factual_correctness.py b/src/ragas/metrics/_factual_correctness.py index 1b42b4713..582ab3c0e 100644 --- a/src/ragas/metrics/_factual_correctness.py +++ b/src/ragas/metrics/_factual_correctness.py @@ -300,7 +300,7 @@ async def _single_turn_ascore( if self.mode == "precision": score = tp / (tp + fp + 1e-8) elif self.mode == "recall": - score = tp / (tp + fp + 1e-8) + score = tp / (tp + fn + 1e-8) else: score = fbeta_score(tp, fp, fn, self.beta)