SentenceSimilarityInputsCheck expected dict not list: `__root__` in `parameters`
Hi,I’m new to ML/AI and haven’t experimented much yet. I am a experienced developer in my day job though. I’m having a few issues I’m hoping someone can help me with. My main goal is the following.I’m trying to write a bot that crawls a website, vectorizes all the text and stores this in pinecone db. Then the user can ask a question, and I query pinecone db for text that hopefully answers their question and feed that to chatgpt for it to answer the question. Everything seems to be working but the vector embedding/semantic search doesn’t seem to be returning text that really answers the question.I am using the langchain js to do a lot of this, langchain has a HuggingFaceInferenceEmbeddings that I can use to vectorize text. The model it defaults to is the sentence-transformers/distilbert-base-nli-mean-tokens. I wanted to use a different model to see if I could get better results but when I try to use sentence-transformers/all-mpnet-base-v2 it throws the following error:C:\projects\test\node_modules\.pnpm\@huggingface+inference@2.3.0\node_modules\@huggingface\inference\dist\index.js:136
        throw new Error(output.error);
              ^
Error: SentenceSimilarityInputsCheck expected dict not list: `__root__` in `parameters`
    at request (C:\projects\test\node_modules\.pnpm\@huggingface+inference@2.3.0\node_modules\@huggingface\inference\dist\index.js:136:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async featureExtraction (C:\projects\test\node_modules\.pnpm\@huggingface+inference@2.3.0\node_modules\@huggingface\inference\dist\index.js:458:15)
    at async RetryOperation._fn (C:\projects\test\node_modules\.pnpm\p-retry@4.6.2\node_modules\p-retry\index.js:50:12) {
  attemptNumber: 7,
  retriesLeft: 0
}There was a similar post hereFeature extraction using Inference API errorbut I’m not sure what this means. I don’t understand the difference between sentence similarity and feature extraction. I tried to look it up but I couldn’t find much. I don’t understand how they differ, I just want to vectorize the text so I can store and query it from the db. Also I did take that answers advice and if I use something likequestgen/all-mpnet-base-v2-feature-extraction-pipeline · Hugging Facethen it works, but this model only has ~90 downloads so I think I’m doing something wrong, or misunderstanding.Any help would be appreciated. Thanks
2023-05-16T00:29:54Z
Hi@Denaldo,Our API Inference supports multiple tasks. For certain models, we provide a straightforward abstraction for embedding similarity, such as with sentences. Thetagand/orpipeline_tagestablishes the correct task on the API Inference backend for all compatible models on our hub.When usingsentence-similarity, the backend establishes a sentence similarity pipeline. It expects multiple sentence inputs, which will subsequently be transformed into embeddings and compared through cosine similarityWhen the model is set forfeature-extraction, it expects the input sentence and returns the corresponding embeddings vector.So if you need a model that is not supported into thefeature-extractionpipeline, you can duplicate it and set the correcttagandpipeline_tag.You can check theREADME.mdin different models for comparison
2023-05-16T00:59:08Z
Thank you for replying that makes a lot of sense. I’ve been a bit obsessive over this project so I’ve put in a insane amount of hours since I asked this question and have learned a lot.
2023-07-07T13:47:01Z
I am using this modelsentence-transformers/multi-qa-mpnet-base-dot-v1huggingface.coREADME.md · sentence-transformers/multi-qa-mpnet-base-dot-v1 at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.I get theChain run errored with error: "SentenceSimilarityInputsCheck expected dict not list: `__root__` in `parameters`"when I try to use inference withtiiuae/falcon-7b-instructor other models, regardless of how I edit the README filePerhaps the bug is at the langchain side of things?
2023-07-07T19:04:42Z
@nephelare you trying to usesentence-transformers/multi-qa-mpnet-base-dot-v1for feature extractionor sentence similarity?
2023-07-07T21:04:59Z
Sentence similarityI’ve also seen thisError: SentenceSimilarityInputsCheck · Issue #1083 · hwchase17/langchainjs · GitHub
2023-08-11T09:41:45Z
Hello friends I need help with these errors…My client site is effected…please help
2023-08-11T09:49:29Z
My clint website still has issues is core web vitals how i can fix it…This website is totaly on drama andTelenovelaseries like as entertainment dramas …please help me.@nephel