similaritySearchVectorWithScore(
query: number[],
k: number,
filter: (doc: Document) => boolean
)| Name | Type | Description |
|---|---|---|
query* | number[] | |
k* | number | |
filter | (doc: Document) => boolean |
Method to perform a similarity search in the vector store using a query vector. It returns the k most similar documents along with their similarity scores. An optional filter function can be provided to filter the documents.
The query vector.
The number of most similar documents to return.
An optional filter function to filter the documents.