Compute the string distance between the prediction and reference.
This logs the string distance (Damerau-Levenshtein) to LangSmith and returns
a _Matcher instance for making assertions on the distance value.
This depends on the rapidfuzz package for string distance computation.
The predicted string to compare.
The reference string to compare against.
Optional configuration for the string distance evaluator.
Supported options:
metric: The distance metric to use for comparison.
Supported values: 'damerau_levenshtein', 'levenshtein',
'jaro', 'jaro_winkler', 'hamming', 'indel'.
normalize_score: Whether to normalize the score between 0 and 1.