A class for setting expectations on test results.
Compute the embedding distance between the prediction and reference.
This logs the embedding distance to LangSmith and returns a _Matcher instance
for making assertions on the distance value.
By default, this uses the OpenAI API for computing embeddings.
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.
Create a _Matcher instance for making assertions on the given value.
Log a numeric score to LangSmith.