Skip to content

Commit 0f956b4

Browse files
committed
Use oversample to modify k instead of num_candidates for rescoring
1 parent d18ce7d commit 0f956b4

File tree

19 files changed

+53
-59
lines changed

19 files changed

+53
-59
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.retrievers/20_knn_retriever.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ setup:
100100
k: 3
101101
num_candidates: 3
102102
rescore_vector:
103-
num_candidates_factor: 1.5
103+
oversample: 1.5
104104

105105
# Get rescoring scores - hit ordering may change depending on how things are distributed
106106
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/210_knn_search_profile.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ setup:
106106
k: 3
107107
num_candidates: 3
108108
"rescore_vector":
109-
"num_candidates_factor": 2.0
109+
"oversample": 2.0
110110

111-
# We expect the knn search ops + rescoring num_cnaidates (for rescoring) per shard
111+
# We expect the knn search ops + rescoring k * oversample (for rescoring) per shard
112112
- match: { profile.shards.0.dfs.knn.0.vector_operations_count: 6 }
113113

114114
# Search with similarity to check number of operations are propagated correctly
@@ -131,7 +131,7 @@ setup:
131131
num_candidates: 3
132132
similarity: 100000
133133
"rescore_vector":
134-
"num_candidates_factor": 2.0
134+
"oversample": 2.0
135135

136-
# We expect the knn search ops + rescoring num_cnaidates (for rescoring) per shard
136+
# We expect the knn search ops + rescoring k * oversample (for rescoring) per shard
137137
- match: { profile.shards.0.dfs.knn.0.vector_operations_count: 6 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/40_knn_search.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ setup:
589589
k: 3
590590
num_candidates: 3
591591
rescore_vector:
592-
num_candidates_factor: 1.5
592+
oversample: 1.5
593593

594594
# Compare scores as hit IDs may change depending on how things are distributed
595595
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_bbq_hnsw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ setup:
140140
k: 3
141141
num_candidates: 3
142142
rescore_vector:
143-
num_candidates_factor: 1.5
143+
oversample: 1.5
144144

145145
# Get rescoring scores - hit ordering may change depending on how things are distributed
146146
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_byte_quantized.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ setup:
398398
field: vector
399399
query_vector: [0.5, 111.3, -13.0, 14.8, -156.0]
400400
rescore_vector:
401-
num_candidates_factor: 1.5
401+
oversample: 1.5
402402

403403
# Get rescoring scores - hit ordering may change depending on how things are distributed
404404
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_half_byte_quantized.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ setup:
575575
k: 3
576576
num_candidates: 3
577577
rescore_vector:
578-
num_candidates_factor: 1.5
578+
oversample: 1.5
579579

580580
# Get rescoring scores - hit ordering may change depending on how things are distributed
581581
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_bbq_flat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ setup:
139139
k: 3
140140
num_candidates: 3
141141
rescore_vector:
142-
num_candidates_factor: 1.5
142+
oversample: 1.5
143143

144144
# Get rescoring scores - hit ordering may change depending on how things are distributed
145145
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_flat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ setup:
304304
k: 3
305305
num_candidates: 3
306306
rescore_vector:
307-
num_candidates_factor: 1.5
307+
oversample: 1.5
308308

309309
# Compare scores as hit IDs may change depending on how things are distributed
310310
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_int4_flat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ setup:
371371
k: 3
372372
num_candidates: 3
373373
rescore_vector:
374-
num_candidates_factor: 1.5
374+
oversample: 1.5
375375

376376
# Get rescoring scores - hit ordering may change depending on how things are distributed
377377
- match: { hits.total: 3 }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_int8_flat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ setup:
288288
k: 3
289289
num_candidates: 3
290290
rescore_vector:
291-
num_candidates_factor: 1.5
291+
oversample: 1.5
292292

293293
# Get rescoring scores - hit ordering may change depending on how things are distributed
294294
- match: { hits.total: 3 }

0 commit comments

Comments
 (0)