A chain for comparing the output of two models using embeddings.
Abstract base class for creating structured sequences of calls to components.
Chains should be used to encode a sequence of calls to components like models, document retrievers, other chains, etc., and provide a simple interface to this sequence.
Compare the output of two models (or two outputs of the same model).
String evaluator interface.
Grade, tag, or otherwise evaluate predictions relative to their inputs and/or reference labels.
Embedding Distance Metric.
Embedding distance evaluation chain.
Use embedding distances to score semantic difference between a prediction and reference.
Use embedding distances to score semantic difference between two predictions.
Examples:
chain = PairwiseEmbeddingDistanceEvalChain() result = chain.evaluate_string_pairs(prediction="Hello", prediction_b="Hi") print(result) {'score': 0.5}