From 0522e6b78735a13f49f8cad444e5f315701c795a Mon Sep 17 00:00:00 2001 From: jeff yang Date: Thu, 17 Oct 2024 12:06:43 +0800 Subject: [PATCH] Expand sentence-ending punctuation check in _create_statements method --- src/ragas/metrics/_faithfulness.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ragas/metrics/_faithfulness.py b/src/ragas/metrics/_faithfulness.py index 1485b8fa5..88e0cf83a 100644 --- a/src/ragas/metrics/_faithfulness.py +++ b/src/ragas/metrics/_faithfulness.py @@ -243,7 +243,7 @@ async def _create_statements( sentences_with_index = { i: sentence for i, sentence in enumerate(sentences) - if sentence.strip().endswith(".") + if sentence.strip().endswith(('.', '。', '!', '!')) } statements_simplified = await self.statement_prompt.generate(