Skip to content

Commit

Permalink
Minor typo in _answer_relevance.py (#1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanowski authored Oct 10, 2024
1 parent a05eef3 commit 6d815b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ragas/metrics/_answer_relevance.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ResponseRelevanceInput(BaseModel):
response: str


class RessponseRelevancePrompt(
class ResponseRelevancePrompt(
PydanticPrompt[ResponseRelevanceInput, ResponseRelevanceOutput]
):
instruction = """Generate a question for the given answer and Identify if answer is noncommittal. Give noncommittal as 1 if the answer is noncommittal and 0 if the answer is committal. A noncommittal answer is one that is evasive, vague, or ambiguous. For example, "I don't know" or "I'm not sure" are noncommittal answers"""
Expand Down Expand Up @@ -87,7 +87,7 @@ class ResponseRelevancy(MetricWithLLM, MetricWithEmbeddings, SingleTurnMetric):
}
}
)
question_generation: PydanticPrompt = RessponseRelevancePrompt()
question_generation: PydanticPrompt = ResponseRelevancePrompt()
strictness: int = 3

def calculate_similarity(self, question: str, generated_questions: list[str]):
Expand Down

0 comments on commit 6d815b0

Please sign in to comment.