0

I have the following azure open ai models deployed

{
  "data": [
    {
      "scale_settings": {
        "scale_type": "standard"
      },
      "model": "text-davinci-003", <-- model
      "owner": "organization-owner",
      "id": "try-davinci",
      "status": "succeeded",
      "created_at": 1679465326,
      "updated_at": 1679465326,
      "object": "deployment"
    },
    {
      "scale_settings": {
        "scale_type": "standard"
      },
      "model": "text-search-curie-doc-001",<-- model
      "owner": "organization-owner",
      "id": "textsearchcuriedoc001mc",
      "status": "succeeded",
      "created_at": 1680504006,
      "updated_at": 1680504006,
      "object": "deployment"
    },
    {
      "scale_settings": {
        "scale_type": "standard"
      },
      "model": "text-search-curie-query-001",<-- model
      "owner": "organization-owner",
      "id": "textsearchcuriequery001mc",
      "status": "succeeded",
      "created_at": 1680504039,
      "updated_at": 1680504039,
      "object": "deployment"
    }
  ],
  "object": "list"
}

I create embeddings of a string

embeddings_of_i_live = get_embedding("I live in space",engine='textsearchcuriedoc001mc')
embeddings_of_i_live

part of result

[5.4967957112239674e-05,
 -0.01301578339189291,
 -0.002223075833171606,
...
]

Then I create embeddings of a query

queryembedding = get_embedding(
        'I live in space',
        engine="textsearchcuriequery001mc"
    )
queryembedding

[0.016271160915493965,
 0.0058170584961771965,
 -0.0046340785920619965,
...
]

Why is the value of cosine similarity not 1?

similarity = cosine_similarity(embeddings_of_i_live,queryembedding)
similarity
0.42056650555103214
Talha Tayyab
  • 8,111
  • 25
  • 27
  • 44
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184

0 Answers0