MAXIMUM_INNER_PRODUCT

Maximum inner product. This is like VectorSimilarityFunction.DOT_PRODUCT, but does not require normalization of the inputs. Should be used when the embedding vectors store useful information within the vector magnitude

Properties

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
abstract fun compare(v1: ByteArray, v2: ByteArray): Float

Calculates a similarity score between the two vectors with a specified function. Higher similarity scores correspond to closer vectors. Each (signed) byte represents a vector dimension.

abstract fun compare(v1: FloatArray, v2: FloatArray): Float

Calculates a similarity score between the two vectors with a specified function. Higher similarity scores correspond to closer vectors.