Skip to content

modify first prompt of faithfullness #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ragas/metrics/_faithfulness.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down