From the course: Using AI with Filemaker Pro

Unlock this course with a free trial

Join today to access over 24,300 courses taught by industry experts.

Understanding cosine similarity

Understanding cosine similarity - FileMaker Pro Tutorial

From the course: Using AI with Filemaker Pro

Understanding cosine similarity

- [Instructor] The CosineSimilarity function gets the similarity between two embedding vectors. While there are other similarity functions for vectors like Euclidean distance or Manhattan distance, cosine is the specific function that's used by the Claris platform. For embedded vectors, CosineSimilarity gives a useful measure of how similar two values are likely to be. So you'll convert text values from the text into vectors, and then you'll compare the similarity of those two vectors. The result of the similarity evaluation will range between negative one and one, which will be inclusive of those two values. The values that are closest to one indicate higher semantic similarity. Zero indicates no similarity, and minus one indicates dissimilarity, and those are evaluated within a range. Now this is very important. The vectors must also have the same dimensions. So what does that mean? Well, it means that the number of elements in the vector arrays must be the same. So different models…

Contents