Vicinity
Supported Backends
The backends supported by Vicinity
Vicinity supports a variety of backends for approximate nearest neighbor search. You can choose the backend that best fits your needs based on performance, memory usage, and other factors.
Backend | Parameter | Description | Default Value |
---|---|---|---|
BASIC | metric | Similarity metric to use (cosine , euclidean ). | "cosine" |
ANNOY | metric | Similarity metric to use (dot , euclidean , cosine ). | "cosine" |
trees | Number of trees to use for indexing. | 100 | |
length | Optional length of the dataset. | None | |
FAISS | metric | Similarity metric to use (cosine , l2 ). | "cosine" |
index_type | Type of FAISS index (flat , ivf , hnsw , lsh , scalar , pq , ivf_scalar , ivfpq , ivfpqr ). | "hnsw" | |
nlist | Number of cells for IVF indexes. | 100 | |
m | Number of subquantizers for PQ and HNSW indexes. | 8 | |
nbits | Number of bits for LSH and PQ indexes. | 8 | |
refine_nbits | Number of bits for the refinement stage in IVFPQR indexes. | 8 | |
HNSW | metric | Similarity space to use (cosine , l2 ). | "cosine" |
ef_construction | Size of the dynamic list during index construction. | 200 | |
m | Number of connections per layer. | 16 | |
PYNNDESCENT | metric | Similarity metric to use (cosine , euclidean , manhattan ). | "cosine" |
n_neighbors | Number of neighbors to use for search. | 15 | |
USEARCH | metric | Similarity metric to use (cos , ip , l2sq , hamming , tanimoto ). | "cos" |
connectivity | Number of connections per node in the graph. | 16 | |
expansion_add | Number of candidates considered during graph construction. | 128 | |
expansion_search | Number of candidates considered during search. | 64 | |
VOYAGER | metric | Similarity space to use (cosine , l2 ). | "cosine" |
ef_construction | The number of vectors that this index searches through when inserting a new vector into the index. | 200 | |
m | The number of connections between nodes in the tree’s internal data structure. |