Return docs most similar to embedding vector asynchronously.
asimilarity_search_by_vector(
self,
embedding: List[float],
k: int = 4,
filter: Optional[Union[Callable, Dict[str, Any]]] = None,
fetch_k: int = 20,
**kwargs: Any = {}
) -> List[Document]| Name | Type | Description |
|---|---|---|
embedding* | List[float] | Embedding to look up documents similar to. |
k | int | Default: 4Number of Documents to return. Defaults to 4. |
filter | Optional[Dict[str, str]] | Default: NoneFilter by metadata. Defaults to None. If a callable, it must take as input the metadata dict of Document and return a bool. |
fetch_k | int | Default: 20(Optional[int]) Number of Documents to fetch before filtering. Defaults to 20. |