specification.
Returns
List of Documents most similar to the query text.
similarity_search_by_vector(embedding: List[float], k: int = 4, filter: Optional[str] = None, **kwargs: Any) → List[Document][source]¶
Return docs most similar to embedding vector.
Parameters
embedding – Embedding to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
filter – Doc fields filter conditions that meet the SQL where clause
specification.
Returns
List of Documents most similar to the query vector.
similarity_search_with_relevance_scores(query: str, k: int = 4, filter: Optional[str] = None, **kwargs: Any) → List[Tuple[Document, float]][source]¶
Return docs most similar to query text , alone with relevance scores.
Less is more similar, more is more dissimilar.
Parameters
query – input text
k – Number of Documents to return. Defaults to 4.
filter – Doc fields filter conditions that meet the SQL where clause
specification.
Returns
List of Tuples of (doc, similarity_score)
similarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶
Run similarity search with distance.
Examples using DashVector¶
DashVector