Here is what I have done - Converted a Snowflake schema into vectors and uploaded them to a Pinecone vector DB.
However when I try to run a query against the Pinecone DB, it does not bring up any results.
I have used this as reference: OpenAI I know I am able to access the Pinecone db because when I try index.describe_index_stats(), it gives me the description of my vector db.
Here is what I have done:
from openai import OpenAI
import pinecone
client = OpenAI(api_key="my_API_key")
pinecone_client = pinecone.Pinecone(api_key='api_key', environment='my_env')
index = pinecone_client.Index('Index_name')
query = "give me the list of clients"
xq = client.embeddings.create(input=query, model=MODEL).data[0].embedding
if pinecone_client.describe_index(index_name).status['ready']:
res = index.query(vector=xq, top_k=1, include_metadata=True)
else:
print("server not ready")
for match in res['matches']:
print(f"{match['score']:.2f}: {match['metadata']['text']}")
Ideally res should include a match that is similar to my query but all i am getting is an empty list.