Hi all,
We are storing approximately 25 million (768d) vectors in a class. I have two questions regarding the performance of the search.
1. Explanation for the results and their scores:
We use hybrid search to get the results and our vector index configuration is as follows:
"vectorIndexConfig": {
"skip": false,
"cleanupIntervalSeconds": 300,
"maxConnections": 64,
"efConstruction": 128,
"ef": -1,
"dynamicEfMin": 100,
"dynamicEfMax": 500,
"dynamicEfFactor": 8,
"vectorCacheMaxObjects": 1000000000000,
"flatSearchCutoff": 40000,
"distance": "cosine",
"pq": {
"enabled": false,
"bitCompression": false,
"segments": 0,
"centroids": 256,
"trainingLimit": 100000,
"encoder": {
"type": "kmeans",
"distribution": "log-normal"
}
}
}
Since we configured the ef
to be dynamic and the dynamicEfFactor
to be 8, using any limit beyond 100 (8*100) does not have any effect on the query time ef
as it’ll be set to maximum value of 500.
But the results I get vary a lot if I increase the limit to say 1000, 2000.
- 100 (limit) : 0.013114754 (score of the top result)
- 1000 (limit): 0.01558389(score of the top result)
- 2000(limit): 0.016393442 (score of the top result)
My question is why is this happening and how can we control it without modifying the vector config values (efConstruction
and maxConnections
) as it would required me to re-process the whole dataset.
2. Query speed
If I increase the limit it’s taking longer to get the response (which is expected I suppose).
limit 10: 4.88 seconds
limit 100: 4.58 seconds
limit 1000: 7.54 seconds
limit 2000: 11.69 seconds
Sometimes depending on the query, it takes up to 1 min 30 seconds to respond.
Is there anything that can be done to improve these speeds? (current hardware specs: 128GB RAM, 16 vcpus)
Thank you