diff --git a/src/ragas/metrics/_factual_correctness.py b/src/ragas/metrics/_factual_correctness.py index 0a88ae683..0d1f406ad 100644 --- a/src/ragas/metrics/_factual_correctness.py +++ b/src/ragas/metrics/_factual_correctness.py @@ -257,10 +257,10 @@ async def _single_turn_ascore( else: response_reference = np.array([]) + response_reference = np.array(response_reference, dtype=bool) tp = sum(reference_response) fp = sum(~reference_response) if self.mode != "precision": - response_reference = np.array(response_reference, dtype=bool) fn = sum(~response_reference) else: fn = 0