LangChain - Evaluation and Testing
Given this custom metric class, what will
metric.evaluate(['hello'], ['hello']) return?
class ExactMatch(Evaluation):
def evaluate(self, predictions, references):
return sum(p == r for p, r in zip(predictions, references)) / len(references)