Inconsistency in response for Same keywords(e.g - keyboard) some time

I am building a software for product recommendation. I have inserted data in data base and also in pinecone. I am also using open-ai.

Here is the whole process which is happening when a user asks a question:
Let’s say user is asking a question I am looking for a keyboard then it will check in pinecone and if the product is available then it will go to the open-ai and fetch more questions for better product recommendation and then again user will enter the input and open-ai will give some response to it. Now if pinecone is having the product then it will give me a product list else it will give me error such as No products found.

Now here is the problem which I am facing: when I ask a question such as I am looking for a keyboard it gives me the response and sometimes I ask the same question and it gives me error that no products found.

Why is this happening? If I enter same question in two different chat then one is getting response from open-ai and the other one is throwing error because it does not find the product in pinecone.

Without getting too in the weeds. One thing I would check is what vector you are passing into Pinecone. Ideally, the vector of query one and query two should have a cosine distance of very near 1.

If this is not the case - this is why you are getting different answers. Otherwise, ensure that you are referring to the correct namespace and not accidentally filtering out the answer with metadata or other params. Given the same or near same vectors you should get similar answers given a static vectorspace.