Are queries stable?

Are queries stable in the sense that the search for a vector will always return the same result if the data in the index does not change? Or is it possible a query to return a different value when executed a second time on the same data?

Hi @till

Queries are (mainly, ignoring filters and namespaces) based on your input vector. Mathematically any similarity will stay the same if you input the same input vector.

Hope this helps

To add to what @Jasper said, if you change the top_k, you could see slightly different results. This is because the vector search is an approximate nearest neighbor, and the size of the top_k influences the size of the vector set being searched against. So a top_k of ten will search a smaller subset of the entire index than a top_k of 100, or 1000. It’s possible those larger sets will yield vectors that are also mathematically similar to your query that weren’t evaluated with a lower top_k.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.