Skip to content

Commit 8b50e93

Browse files
authored
[DOCS] Adds note to inference tutorial about similarity (#106567) (#106605)
1 parent 893e85b commit 8b50e93

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/reference/tab-widgets/inference-api/infer-api-task.asciidoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ key.
2222
<3> The name of the embedding model to use. You can find the list of Cohere
2323
embedding models https://docs.cohere.com/reference/embed[here].
2424

25+
NOTE: When using this model the recommended similarity measure to use in the
26+
`dense_vector` field mapping is `dot_product`. In the case of Cohere models, the
27+
embeddings are normalized to unit length in which case the `dot_product` and
28+
the `cosine` measures are equivalent.
29+
30+
31+
2532
// end::cohere[]
2633

2734

@@ -35,8 +42,6 @@ PUT _inference/text_embedding/openai_embeddings <1>
3542
"service_settings": {
3643
"api_key": "<api_key>", <2>
3744
"model_id": "text-embedding-ada-002" <3>
38-
},
39-
"task_settings": {
4045
}
4146
}
4247
------------------------------------------------------------
@@ -51,4 +56,9 @@ key.
5156
embedding models
5257
https://platform.openai.com/docs/guides/embeddings/embedding-models[here].
5358

59+
NOTE: When using this model the recommended similarity measure to use in the
60+
`dense_vector` field mapping is `dot_product`. In the case of OpenAI models, the
61+
embeddings are normalized to unit length in which case the `dot_product` and
62+
the `cosine` measures are equivalent.
63+
5464
// end::openai[]

0 commit comments

Comments
 (0)