Skip to main content
Returns documents most similar to the query along with relevance scores.

Parameters

Returns

List[Tuple[Document, float]]: List of (Document, score) tuples where score is normalized [0, 1]

Example Usage

The Embedded library also exposes _similarity_search_with_relevance_scores, an internal method that supports a score_threshold keyword argument for server-side score filtering:
Keyword Arguments:Example:

Async

The Embedded and Python SDK provide async versions of this method prefixed with a:
JS/TS methods are natively async — all signatures above already return Promise<...>. No separate async variant is needed.