| Name | Type | Description |
|---|---|---|
query* | str | Text to look up documents similar to. |
k | int | Default: DEFAULT_KNumber of Documents to return. |
fetch_k | int | Default: 20Number of Documents to fetch to pass to MMR algorithm. |
lambda_mult | float | Default: 0.5 |
filter | dict[str, str] | None | Default: None |
where_document | dict[str, str] | None | Default: None |
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.
Filter by metadata.
dict used to filter by the document contents.
e.g. {"$contains": "hello"}.
Additional keyword arguments to pass to Chroma collection query.