Pinecone return results consistency


When the scores of embedded vectors are the same and the search query is the same, will Pinecone return the same results in the same order for every search?

From my experiments, it appears to be the same. Just want to make sure by posting the question here.


Hi @Max123, thanks for the post.

While you may see that the same results are returned in the same order for identical queries (especially at a smaller scale), this is not the guaranteed behavior for approximate nearest neighbor algorithms.

Approximate nearest neighbor algorithms are designed to quickly find the closest matches to a given data point within large datasets with reasonable accuracy rather than perfect precision. Depending on the data, ANN may have a slightly lower accuracy than Known Nearest Neighbor (KNN) algorithms, but will have significantly lower read costs and latency than KNN. This is one of the key features of ANN.

ANN algorithms assess broad data clusters to find matches. Some of these clusters might be ignored even if they contain relevant records simply because their overall similarity to the query is lower, because the algorithm aims to optimize the search by focusing on areas with a higher density of potential matches.

Source: Approximate nearest neighbor (ANN)

1 Like