Find answers from the community

O
Obelix
Offline, last seen 3 months ago
Joined September 25, 2024
-> 322 response = self._pinecone_index.query(
323 vector=query_embedding,
324 sparse_vector=sparse_vector,

AttributeError: 'str' object has no attribute 'query'
11 comments
O
L
I.e. HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
2 comments
L
O
Obelix
·

Hi all

Hi all,

How do you fetch data from Pinecone namespaces? For example, I have already preprocessed and upserted to pinecone, and the data is separated with namespaces. Now we want to query over the data in Pinecone with GPT-Index(llama-index):

index = GPTPineconeIndex([], pinecone_index=index_name, add_sparse_vector=True)

(data in Pinecone is separated by namespaces, unsure how to append that to GPTPineconeIndex)

response = index.query(question, vector_store_query_mode="hybrid")

Throws the following error:

AttributeError: 'str' object has no attribute 'query'

Since we can't get the data from the namespace itself, we can't query over the vector store, and it’s returning an empty object.

How do you query pinecone indexes that are separated by namespace? Or is that not possible? Do I need to write my own function to fetch the data from Pinecone?

Any help or guidance appreciated. Thank you all
8 comments
O
j