Skip to main content

Function: similarity()

similarity(embedding1, embedding2, mode?): number

The similarity between two embeddings.

Parameters

embedding1: number[]

embedding2: number[]

mode?: SimilarityType

Returns

number

similarity score with higher numbers meaning the two embeddings are more similar

Defined in

packages/core/embeddings/dist/index.d.ts:22