loadEvaluator does not pass the embedding option to PairwiseEmbeddingDistanceEvalChain #7738
Open
5 tasks done
Labels
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I'm trying to use the PairwiseEmbeddingDistanceEvalChain as documented here: https://js.langchain.com/v0.1/docs/guides/evaluation/comparison/pairwise_embedding_distance/ with a custom embedding implementation, however,
loadEvaluator
is incorrectly ignoring theembedding
option (Note: I'm using the latest version of langchainjs, but the new docs do not include any mention ofloadEvaluator
).This is pretty obviously a bug right here:
langchainjs/langchain/src/evaluation/loader.ts
Line 103 in d303e90
For
embedding_distance
theembedding
option is applied, but forpairwise_embedding_distance
it is not even though it is supported byPairwiseEmbeddingDistanceEvalChain
as isdistanceMetric
.System Info
node version:
v20.18.1
uname:
Linux 60d905d1af20 6.2.16 #1-NixOS x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: