HnswParameters interface
Contains the parameters specific to hnsw algorithm.
Properties
ef |
The size of the dynamic list containing the nearest neighbors, which is used during index time. Increasing this parameter may improve index quality, at the expense of increased indexing time. At a certain point, increasing this parameter leads to diminishing returns. |
ef |
The size of the dynamic list containing the nearest neighbors, which is used during search time. Increasing this parameter may improve search results, at the expense of slower search. Increasing this parameter leads to diminishing returns. |
m | The number of bi-directional links created for every new element during construction. Increasing this parameter value may improve recall and reduce retrieval times for datasets with high intrinsic dimensionality at the expense of increased memory consumption and longer indexing time. |
metric | The similarity metric to use for vector comparisons. |
Property Details
efConstruction
The size of the dynamic list containing the nearest neighbors, which is used during index time. Increasing this parameter may improve index quality, at the expense of increased indexing time. At a certain point, increasing this parameter leads to diminishing returns.
efConstruction?: number
Property Value
number
efSearch
The size of the dynamic list containing the nearest neighbors, which is used during search time. Increasing this parameter may improve search results, at the expense of slower search. Increasing this parameter leads to diminishing returns.
efSearch?: number
Property Value
number
m
The number of bi-directional links created for every new element during construction. Increasing this parameter value may improve recall and reduce retrieval times for datasets with high intrinsic dimensionality at the expense of increased memory consumption and longer indexing time.
m?: number
Property Value
number
metric
The similarity metric to use for vector comparisons.
metric?: "cosine" | "euclidean" | "dotProduct" | "hamming"
Property Value
"cosine" | "euclidean" | "dotProduct" | "hamming"