Index.upsert and index.query not working properly/reflecting properly

Whenever i run this code:

from openai import OpenAI

client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
assistant_id = "asst_321"

embeddings = client.embeddings.create(
    model="text-embedding-ada-002",
    input="The food was delicious and the waiter...",
)
vectors = embeddings.data[0].embedding
index.upsert(namespace=assistant_id, vectors=[{"id": "node-id-1", "values": vectors}], show_progress=True)

it shows me the output:

{'upserted_count': 1}

but when i do:

query_results = index.query(
    namespace=assistant_id,
    vector=embeddings.data[0].embedding,
    top_k=3,
    include_values=True
)
query_results
{'matches': [], 'namespace': 'asst_321', 'usage': {'read_units': 1}}

Be vary, these are the same vector values, that were used during the upsertion process. Now the thing is, this new namespace doesn’t reflect in my dashboard and neither when i use index.describe_index_stats(). But i am able to view it, only if i use the index.fetch command and specifying the exact id and namespace, that i used while upsertion but as you can see it will not be of any use to me on runtime. Now please tell me why the index.query and index.upsert is not properly working? Has anyone else also faced similar issue?

Hi @saadk8,

Welcome to the Pinecone forum, and apologies for not responding sooner. Pinecone is eventually consistent, so it isn’t uncommon for a new record to not be returned by a query right away. Is the query returning the expected results now? Please share an update.

Best wishes,
Jesse

Hi jesse, thanks for the response, but i opened a ticket on their support and they told me that i was using the deprecated architecture and all support to it has been terminated and hence i shifted to serverless architecture.