Metadata filtering of a Pinecone Index with langchainjs

I am currently in a rut with my app development. The app allows users to upload documents to a Knowledge Base, which can then be segmented into categories called “Brains” by attaching documents. These Brains can be attached to “Expert” chatbots to configure the user’s knowledge.

When a question is asked to an Expert, it should only have knowledge of the embeddings of the documents attached to its Brains. To achieve this, I am using a Pinecone Index to store the user’s Knowledge Base embeddings, with documentID Metadata attached to each vector indicating the Brains they belong to.

However, I am unable to use PineconeStore.fromExistingIndex() as it does not support Metadata filtering yet. I am looking for a way to create a vectorStore of only vectors that an Expert has knowledge of. My goal is to pass this vectorStore into VectorDBQAChain.fromLLM(model, vectorStore).

Also, I don’t know if anyone at Pinecone contributes to the langchainjs project, but I would really appreciate it if Metadata filtering was fully supported throughout the library as it seems like a core feature of Pinecone.

1 Like

“I don’t know if anyone at Pinecone contributes to the langchainjs project, but I would really appreciate it if Metadata filtering was fully supported throughout the library as it seems like a core feature of Pinecone”

Second this!

1 Like