I turned on the slow query logging by setting up the environment variables QUERY_SLOW_LOG_ENABLED
and QUERY_SLOW_LOG_THRESHOLD
. Is there a document to help understand what each component means in the log?
For example, what does it mean by knn_search_rescore
? (Actually I think that is the only question I have)
Thanks in advance!
Hi @louisja1 !!
When QUERY_SLOW_LOG_ENABLED
is enabled, knn_search_rescore refers to the second phase of a two-phase search process specifically related to quantized vectors:
Phase 1 - A rough search is performed using compressed vectors with a larger candidate pool than needed.
Phase 2 (Rescore) - For this smaller pool of candidates, Weaviate fetches their uncompressed vector representations and performs a final search to find the true nearest neighbors. This rescoring phase helps maintain 95-97% recall accuracy.
The rescore process can be time-intensive especially with a cold page cache, where rescoring can take significantly longer than with a hot cache. The time spent on rescoring can be a substantial portion of the total query time - in some cases up to 68% of the total query duration.
Let me know if that helps!
THanjks!
It helps a lot! Thank you!
1 Like