Parameters
texts (List[str]) – The list of texts to add to the vectorstore.
embedding (Optional[Embeddings]) – Optional embedding function to use to
embed the texts.
metadatas (Optional[List[Dict[str, Any]]]) – Optional list of metadata
associated with the texts.
collection_name (str) – The name of the collection in the Zep store.
api_url (str) – The URL of the Zep API.
api_key (Optional[str]) – The API key for the Zep API.
config (Optional[CollectionConfig]) – The configuration for the collection.
**kwargs – Additional parameters specific to the vectorstore.
Returns
An instance of ZepVectorStore.
Return type
ZepVectorStore
max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document][source]¶
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity
among selected documents.
Parameters
query – Text to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
fetch_k – Number of Documents to fetch to pass to MMR algorithm.
lambda_mult – 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.
metadata – Optional, metadata to filter the resulting set of retrieved docs
Returns
List of Documents selected by maximal marginal relevance.