Updating Pinecone Index - Unable to set index ID with IngestionPipeline flow #14247
Replies: 1 comment 2 replies
-
Hey there, @luisedelgado! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together! To insert vectors into Pinecone with specified entry IDs using the
Additionally, if you are using the LlamaIndex framework, you can leverage the from llama_index.vector_stores.pinecone import PineconeVectorStore
from llama_index.schema import BaseNode
# Initialize PineconeVectorStore
vector_store = PineconeVectorStore.from_params(
api_key='your-api-key',
index_name='your-index-name',
environment='your-environment'
)
# Create nodes with embeddings
nodes = [
BaseNode(node_id="vector1", embedding=[0.1, 0.2, 0.3]),
BaseNode(node_id="vector2", embedding=[0.4, 0.5, 0.6]),
# Add more nodes as needed
]
# Add nodes to the vector store
vector_store.add(nodes)
# Query the vector store
query_result = vector_store.query(VectorStoreQuery(
query_embedding=[0.1, 0.2, 0.3],
similarity_top_k=2
))
# Print the query result
print(query_result) This approach provides a more structured way to manage your vectors and perform queries using the LlamaIndex framework [1][2][3][4]. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I'm using llama-index in my project to manipulate my Pinecone vector store. Specifically, I'm using the IngestionPipeline flow to insert vectors into the store, and now I'm needing to implement a way to update an index's vectors if the underlying data changes. But the problem is that the Pinecone documentation for both its
fetch
anddelete
API makes it clear that the request needs to include the IDs of the records you are planning on fetching/deleting (note this is different from the document ids), and we don't get an option to specify these when using theIngestionPipeline
flow. So ideally I'd expect to be able to do the following with llama-index:1. Insert vectors into Pinecone while specifying the entry ID(s) (preferably with the
IngestionPipeline
flow)2. Fetch the full set of vectors that was inserted by passing the ID(s) I used.
Has anyone done this? It seems like a fairly straight-forward scenario for which I can't find any information online :/
Thanks in advance for any info!
Beta Was this translation helpful? Give feedback.
All reactions