Skip to content

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 21, 2025

Backport of #125370 to 8.18

Cohere embeddings are expected to be normalized to unit vectors, but due to floating point precision issues,
our check ({@link DenseVectorFieldMapper#isNotUnitVector(float)}) often fails.
This change fixes this bug by setting the default similarity for newly created Cohere inference endpoint to cosine.

Closes elastic#122878
@jimczi jimczi added >bug :ml Machine learning backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v8.18.1 labels Mar 21, 2025
@elasticsearchmachine elasticsearchmachine merged commit 8256aaa into elastic:8.18 Mar 21, 2025
15 checks passed
@jimczi jimczi deleted the backport_125370_8_18 branch March 21, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :ml Machine learning v8.18.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants