Skip to content

Commit

Permalink
solved issue with summarization prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergiu Soima committed Aug 12, 2024
1 parent ac9b9ec commit 8dc528c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ragas/metrics/_summarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ def _get_extract_keyphrases_prompt(self, text) -> PromptValue:
return text_extract_key_phrases_factory().format(text=text)

def _get_question_generation_prompt(self, text, keyphrases) -> PromptValue:
return TEXT_GENERATE_QUESTIONS.format(text=text, keyphrases=keyphrases)
return text_generate_answers_factory().format(text=text, keyphrases=keyphrases)

def _get_answer_generation_prompt(
self, questions: t.List, summary: str
) -> PromptValue:
return TEXT_GENERATE_ANSWERS.format(summary=summary, questions=questions)
return text_generate_answers_factory().format(summary=summary, questions=questions)

async def _ascore(self, row: Dict, callbacks: Callbacks) -> float:
# text is the contexts provided
Expand Down

0 comments on commit 8dc528c

Please sign in to comment.