| Name | Type | Description |
|---|---|---|
embedding* | List[float] | Embedding to look up documents similar to. |
k | int | Default: 4Number of Documents to return. Defaults to 4. |
fetch_k | int | Default: 20Number of Documents to fetch to pass to MMR algorithm. |
lambda_mult | float | Default: 0.5 |
pre_filter | Optional[Dict[str, Any]] | Default: None |
post_filter_pipeline | Optional[List[Dict]] | Default: None |
oversampling_factor | int | Default: 10 |
kwargs | Any | Default: {} |
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents.
Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5.
(Optional) dictionary of arguments to filter document fields on.
(Optional) pipeline of MongoDB aggregation stages following the vectorSearch stage.
Multiple of k used when generating number of candidates in HNSW Vector Search,
Additional arguments are specific to the search_type