Skip to content

Conversation

@sarahlwelton
Copy link
Contributor

Adding another entry to the similarity metric setting for cosine similarity.

Only one change needed as it's in a partial already.

Use *cosine* similarity to get the best results with an embedding model that uses cosine similarity.
Cosine similarity works well for semantic search, document classification, and recommendation systems.
+
The Search Service will normalize any vectors before indexing when using cosine similarity.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth mentioning that - we will also normalize the query vector prior to executing the nearest neighbor search if the field it is associated with is using the cosine similarity distance metric.

Copy link
Contributor

@Rebecca-Martinez007 Rebecca-Martinez007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sarahlwelton sarahlwelton merged commit 43d2ceb into prerelease/7.6.4 Nov 21, 2024
@sarahlwelton sarahlwelton deleted the DOC-12608-cosine-similarity-metric branch November 21, 2024 16:17
@simon-dew simon-dew added the 7.6.4 Couchbase Server 7.6.4 label Dec 12, 2024
simon-dew pushed a commit that referenced this pull request Feb 3, 2025
* [DOC-12608] Adding another entry to similarity metric setting for cosine similarity.

* [DOC-12608] Implementing feedback from SME review
simon-dew pushed a commit that referenced this pull request Feb 19, 2025
* [DOC-12608] Adding another entry to similarity metric setting for cosine similarity.

* [DOC-12608] Implementing feedback from SME review
sarahlwelton added a commit that referenced this pull request Apr 17, 2025
* [DOC-12608] Adding another entry to similarity metric setting for cosine similarity.

* [DOC-12608] Implementing feedback from SME review
sarahlwelton added a commit that referenced this pull request Apr 17, 2025
* [DOC-12608] Adding another entry to similarity metric setting for cosine similarity.

* [DOC-12608] Implementing feedback from SME review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.6.4 Couchbase Server 7.6.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants