Step - similarity

similarity ยท category: Vectors

Score of a vector property (or the incoming vector) against q: cosine (default), dot, l2 or hamming; a text q is embedded by the model the schema declares for the property.

Forms

similarity(arg1: any)
similarity(arg1: any, arg2: any)
similarity(arg1: any, arg2: any, arg3: string)

Example

g.inject(vector([3.0, 4.0])).similarity([0, 0], "l2").next()   // 5.0