Skip to content

OpenAI.Embedding.DistanceFrom

Andrew Lambert edited this page Jan 21, 2024 · 2 revisions

OpenAI.Embedding.DistanceFrom

Method signature

 Function DistanceFrom(OtherEmbedding As OpenAI.Embedding) As Double

Parameters

Name Type Comment
OtherEmbedding Embedding The embedding to be compared to this embedding.

Return value

A Double between -1.0 and +1.0 where +1.0 means completely identical and -1.0 means completely different.

Remarks

Calculates the cosine similarity between this embedding and the other embedding.

Clone this wiki locally