Skip to content

Commit

Permalink
[DOCS] Adds note to inference tutorial about similarity (elastic#106567)
Browse files Browse the repository at this point in the history
  • Loading branch information
szabosteve committed Mar 21, 2024
1 parent 893e85b commit 9b0ed0d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/reference/tab-widgets/inference-api/infer-api-task.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ key.
<3> The name of the embedding model to use. You can find the list of Cohere
embedding models https://docs.cohere.com/reference/embed[here].

NOTE: When using this model the recommended similarity measure to use in the
`dense_vector` field mapping is `dot_product`. In the case of Cohere models, the
embeddings are normalized to unit length in which case the `dot_product` and
the `cosine` measures are equivalent.



// end::cohere[]


Expand All @@ -35,8 +42,6 @@ PUT _inference/text_embedding/openai_embeddings <1>
"service_settings": {
"api_key": "<api_key>", <2>
"model_id": "text-embedding-ada-002" <3>
},
"task_settings": {
}
}
------------------------------------------------------------
Expand All @@ -51,4 +56,9 @@ key.
embedding models
https://platform.openai.com/docs/guides/embeddings/embedding-models[here].

NOTE: When using this model the recommended similarity measure to use in the
`dense_vector` field mapping is `dot_product`. In the case of OpenAI models, the
embeddings are normalized to unit length in which case the `dot_product` and
the `cosine` measures are equivalent.

// end::openai[]

0 comments on commit 9b0ed0d

Please sign in to comment.