We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e6a96a commit c615a9fCopy full SHA for c615a9f
src/ragas/metrics/_string.py
@@ -81,7 +81,9 @@ async def _single_turn_ascore(
81
response = sample.response
82
assert isinstance(reference, str), "Expecting a string"
83
assert isinstance(response, str), "Expecting a string"
84
- return DISTANCE_MEASURE_MAP[self.distance_measure].distance(reference, response)
+ return 1 - DISTANCE_MEASURE_MAP[self.distance_measure].normalized_distance(
85
+ reference, response
86
+ )
87
88
async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float:
89
return await self._single_turn_ascore(SingleTurnSample(**row), callbacks)
0 commit comments