Return docs most similar to embedding vector.
similarity_search_by_vector(
self,
embedding: list[float],
k: int = DEFAULT_K,
filter: dict[str, str] | None = None,
where_document: dict[str, str] | None = None,
**kwargs: Any = {}
) -> list[Document]| Name | Type | Description |
|---|---|---|
embedding* | list[float] | Embedding to look up documents similar to. |
k | int | Default: DEFAULT_KNumber of Documents to return. |
filter | dict[str, str] | None | Default: NoneFilter by metadata. |
where_document | dict[str, str] | None | Default: Nonedict used to filter by the document contents. E.g. {"$contains": "hello"}. |
kwargs | Any | Default: {}Additional keyword arguments to pass to Chroma collection query. |