Compute an exact match between the prediction and the reference.
evaluator = ExactMatchChain() evaluator.evaluate_strings( prediction="Mindy is the CTO", reference="Mindy is the CTO", ) # This will return {'score': 1.0}
evaluator.evaluate_strings( prediction="Mindy is the CTO", reference="Mindy is the CEO", ) # This will return {'score': 0.0}
ExactMatchStringEvaluator(
self,
*,
ignore_case: bool = False,
ignore_punctuation: bool = False,
ignore_numbers: bool = False,
**_: Any = {}
)This evaluator does not require input.
This evaluator requires a reference.
Get the input keys.
Get the evaluation name.