Finds the k closes neighbors of each instance of embeddings.
find_neighbors(
self,
embeddings: list[list[float]],
k: int = 4,
filter_: list[Namespace] | dict | None = None,
numeric_filter: list[NumericNamespace] | None = None,
*,
sparse_embeddings: list[dict[str, list[int] | list[float]]] | None = None,
rrf_ranking_alpha: float = 1,
**kwargs: Any = {}
) -> list[list[dict[str, Any]]]| Name | Type | Description |
|---|---|---|
embeddings* | list[list[float]] | List of embeddings vectors. |
k | int | Default: 4Number of neighbors to be retrieved. |
filter_ | list[Namespace] | dict | None | Default: NoneFor v1: list of |
numeric_filter | list[NumericNamespace] | None | Default: NoneList of |
sparse_embeddings | list[dict[str, list[int] | list[float]]] | None | Default: NoneList of Sparse embedding dictionaries which represents an
embedding as a list of indices and as a list of sparse values:
ie. |
rrf_ranking_alpha | float | Default: 1Reciprocal Ranking Fusion weight, float between
|