LangChain - Evaluation and Testing
What is wrong with this custom metric class that causes an error?
class LengthDiff(Evaluation):
def evaluate(self, predictions, references):
return abs(len(predictions) - len(references)) / len(references)