You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/search/search-your-data/knn-search.asciidoc
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1074,12 +1074,13 @@ the global top `k` matches across shards. You cannot set the
1074
1074
==== Oversampling and rescoring for quantized vectors
1075
1075
1076
1076
When using <<dense-vector-quantization,quantized vectors>> for kNN search, you can optionally rescore results to balance performance and accuracy, by doing:
1077
-
* Oversampling: Retrieve more candidates per shard using approximate kNN
1078
-
* Rescoring: Use the original vector values for re-calculating the score on the oversampled candidates.
1077
+
1078
+
* *Oversampling*: Retrieve more candidates per shard.
1079
+
* *Rescoring*: Use the original vector values for re-calculating the score on the oversampled candidates.
1079
1080
1080
1081
As the non-quantized, original vectors are used to calculate the final score on the top results, rescoring combines:
1081
1082
1082
-
* The performance and memory gains of approximate retrieval using quantized vectors on the top candidates.
1083
+
* The performance and memory gains of approximate retrieval using quantized vectors for retrieving the top candidates.
1083
1084
* The accuracy of using the original vectors for rescoring the top candidates.
1084
1085
1085
1086
All forms of quantization will result in some accuracy loss and as the quantization level increases the accuracy loss will also increase.
@@ -1097,17 +1098,15 @@ There are three main ways to oversample and rescore:
===== Use the `rescore` option to rescore per shard
1101
+
===== Use the `rescore_vector` option to rescore per shard
1101
1102
1102
1103
preview:[]
1103
1104
1104
-
You can use the `rescore` option to automatically perform reranking.
1105
-
When a rescore `oversample` parameter is specified, the approximate kNN search will retrieve the top `k * oversample` candidates per shard.
1105
+
You can use the `rescore_vector` option to automatically perform reranking.
1106
+
When a rescore `num_candidates_factor` parameter is specified, the approximate kNN search will retrieve the top `num_candidates * oversample` candidates per shard.
1106
1107
It will then use the original vectors to rescore them, and return the top `k` results.
1107
1108
1108
-
`num_candidates` will not be affected by oversample, besides ensuring that there are at least `k * oversample` candidates per shard.
1109
-
1110
-
Here is an example of using the `rescore` option with the `oversample` parameter:
1109
+
Here is an example of using the `rescore_vector` option with the `num_candidates_factor` parameter:
0 commit comments