Parameters
embedding – Embedding vector to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
filter – Filter by metadata. Defaults to None.
search_params – Additional search params
offset – Offset of the first result to return.
May be used to paginate results.
Note: large offset values may cause performance issues.
score_threshold – Define a minimal score threshold for the result.
If defined, less similar results will not be returned.
Score of the returned result might be higher or smaller than the
threshold depending on the Distance function used.
E.g. for cosine similarity only higher scores will be returned.
consistency – Read consistency of the search. Defines how many replicas should be
queried before returning the result.
Values:
- int - number of replicas to query, values should present in all
queried replicas
’majority’ - query all replicas, but return values present in themajority of replicas
’quorum’ - query the majority of replicas, return values present inall of them
’all’ - query all replicas, and return values present in all replicas
**kwargs – Any other named arguments to pass through to
QdrantClient.async_grpc_points.Search().
Returns
List of Documents most similar to the query.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs most similar to query.