)
# Only get the single most similar document from the dataset
docsearch.as_retriever(search_kwargs={'k': 1})
# Use a filter to only retrieve documents from a specific paper
docsearch.as_retriever(
    search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}}
)
async asearch(query: str, search_type: str, metadata: Optional[Dict[str, Any]] = None, k: int = 3, **kwargs: Any) → List[Document][source]¶
Return docs most similar to query using specified search type.
async asimilarity_search(query: str, k: int = 4, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document][source]¶
Return docs most similar to query.
async asimilarity_search_by_vector(embedding: List[float], k: int = 4, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document][source]¶
Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Tuple[Document, float]][source]¶
Return docs most similar to query.
async asimilarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶
Run similarity search with distance asynchronously.
delete(ids: Optional[List[str]] = None, **kwargs: Any) → None[source]¶
Delete by Zep vector UUIDs.
Parameters
ids (Optional[List[str]]) – The UUIDs of the vectors to delete.
Raises
ValueError – If no UUIDs are provided.