Models for getting similarity scores between categories and keywords

Kayla Farivar 55 Reputation points
2024-07-11T23:34:30.7+00:00

I want to get a similarity score between a category like vehicles and a list of words like headphone, water, truck, and green. The goal would be for each score to be low on words outside the category and high on words inside the category. I know I could easily train this but I'd want it as a one time use for each category. I'm also using this for sentences so I'd need a good nlp system. It should accept a category like dates after 2018 and it should take in random sentences like "how are you" "I got my car in 2020" and "I went on a date with him".

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,285 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,091 Reputation points
    2024-07-12T05:28:15.7933333+00:00

    Kayla Farivar To get similarity scores between a category and a list of words, you can use the Azure OpenAI Embeddings. You can generate embeddings for each word in the list and for the category, and then calculate the cosine similarity between each word embedding and the category embedding. The cosine similarity score will be high for words that are similar to the category and low for words that are dissimilar.

    See Understand embeddings in Azure OpenAI Service for more details.

    Do let me know if you have any further queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.