Return documents and score values most similar to query.
similaritySearchWithScore(
query: string,
k: number,
filter: Filter
): Promise<[Document<Record<string, any>>, number][]>| Name | Type | Description |
|---|---|---|
query* | string | Query text for the similarity search. |
k* | number | Number of Documents to return. Defaults to 4. |
filter | Filter | A dictionary of metadata fields and values to filter by. Defaults to None. |