Filtering documents by similarity score when using RetrievalQAWithSourcesChain #4669
Replies: 5 comments 1 reply
-
similarity_score_threshold search type is not implemented for Pinecone. I think you can use Redis, Faiss or Weaviate |
Beta Was this translation helpful? Give feedback.
-
Thanks @jupyterjazz, do you know if there is a limitation with pinecone that prevents this? |
Beta Was this translation helpful? Give feedback.
-
Any news on how to use "similarity_score_threshold" with Pinecone? Is there currently a way to implement a threshold? |
Beta Was this translation helpful? Give feedback.
-
As far as I know you will need to use a different vector store than Pinecone. Once you have chosen a vector store that supports the "similarity_score_threshold" search type, you can use the following code to use it with the RetrievalQAWithSourcesChain:
|
Beta Was this translation helpful? Give feedback.
-
I was having the same issue with Pinecone. I think this is poor business practice from Pinecone to have this issue outstanding months in, after receiving a ton of funding and when it's like 20-30 minutes of dev at best. Also Chat GPT seems to suggest that this feature was removed at some point. I could still be missing something, but if not here's my workaround. Workaround: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use the "similarity_score_threshold" VectorStore search type with the RetrievalQAWithSourcesChain but I get a NotImplementedError, here is the relevant code:
Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions