From dbc64d919e2e7ea063aef1e730bcd9bbd1ee1f70 Mon Sep 17 00:00:00 2001 From: Yongtae Date: Tue, 21 Nov 2023 20:41:29 +0900 Subject: [PATCH] Create statements from question and answer sentences --- src/ragas/metrics/_faithfulness.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ragas/metrics/_faithfulness.py b/src/ragas/metrics/_faithfulness.py index 1da97b955..6adca8225 100644 --- a/src/ragas/metrics/_faithfulness.py +++ b/src/ragas/metrics/_faithfulness.py @@ -16,13 +16,16 @@ ################# LONG_FORM_ANSWER_PROMPT = HumanMessagePromptTemplate.from_template( """\ -Given a question and answer, create one or more statements from each sentence in the given answer. +Given a question and answer, create one or more statements from each sentence in the given answer. If you can't create a statement, you can return None. question: Who was Albert Einstein and what is he best known for? answer: He was a German-born theoretical physicist, widely acknowledged to be one of the greatest and most influential physicists of all time. He was best known for developing the theory of relativity, he also made important contributions to the development of the theory of quantum mechanics. statements:\nAlbert Einstein was born in Germany.\nAlbert Einstein was best known for his theory of relativity. question: Cadmium Chloride is slightly soluble in this chemical, it is also called what? answer: alcohol statements:\nCadmium Chloride is slightly soluble in alcohol. +question: Where is the Tokyo Tower located? +answer: Nintendo +statements:\nNone question: Were Shahul and Jithin of the same nationality? answer: They were from different countries. statements:\nShahul and Jithin were from different countries.