Skip to content

Commit 37c355c

Browse files
Merge pull request #279597 from jcodella/patch-10
Update vector-search.md
2 parents 64218c4 + 47490a2 commit 37c355c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

articles/cosmos-db/mongodb/vcore/vector-search.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ In this example, `vectorIndex` is returned with all the `cosmosSearch` parameter
279279

280280
## Example using an IVF Index
281281

282+
Inverted File (IVF) Indexing is a method that organizes vectors into clusters. During a vector search, the query vector is first compared against the centers of these clusters. The search is then conducted within the cluster whose center is closest to the query vector.
283+
284+
The `numList`s parameter determines the number of clusters to be created. A single cluster implies that the search is conducted against all vectors in the database, akin to a brute-force or kNN search. This setting provides the highest accuracy but also the highest latency.
285+
286+
Increasing the `numLists` value results in more clusters, each containing fewer vectors. For instance, if `numLists=2`, each cluster contains more vectors than if `numLists=3`, and so on. Fewer vectors per cluster speed up the search (lower latency, higher queries per second). However, this increases the likelihood of missing the most similar vector in your database to the query vector. This is due to the imperfect nature of clustering, where the search might focus on one cluster while the actual “closest” vector resides in a different cluster.
287+
288+
The `nProbes` parameter controls the number of clusters to be searched. By default, it’s set to 1, meaning it searches only the cluster with the center closest to the query vector. Increasing this value allows the search to cover more clusters, improving accuracy but also increasing latency (thus decreasing queries per second) as more clusters and vectors are being searched.
289+
282290
The following examples show you how to index vectors, add documents that have vector properties, perform a vector search, and retrieve the index configuration.
283291

284292
### Create a vector index

0 commit comments

Comments
 (0)