Skip to content

Commit 43d2ceb

Browse files
authored
[DOC-12608] Add Cosine Similarity Metric (#290)
* [DOC-12608] Adding another entry to similarity metric setting for cosine similarity. * [DOC-12608] Implementing feedback from SME review
1 parent 000ac71 commit 43d2ceb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/search/partials/vector-search-field-descriptions.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ Smaller euclidean distances mean that the values of each coordinate in the vecto
3636
+
3737
It's best to use *l2_norm* similarity when your embeddings contain information about the count or measure of specific things, and your embedding model uses the same similarity metric.
3838
39+
* *cosine*: Calculated by adding the result of multiplying a vector's components, or the product of the magnitudes of the vectors and the cosine of the angle between them.
40+
This metric is not affected by the size of the vectors being measured.
41+
+
42+
Use *cosine* similarity to get the best results with an embedding model that uses cosine similarity.
43+
Cosine similarity works well for semantic search, document classification, and recommendation systems.
44+
+
45+
The Search Service will normalize any vectors in your documents before indexing when using cosine similarity.
46+
It will also normalize any vectors in your queries if the field for those queries uses cosine similarity.
47+
Use *dot_product* similarity if your vectors are already normalized.
48+
3949
For more information about Vector Search indexes, see xref:vector-search:vector-search.adoc[] or xref:vector-search:create-vector-search-index-ui.adoc[].
4050
// end::similarity_metric[]
4151
// tag::dimension[]

0 commit comments

Comments
 (0)