Notebooks
A
Azure
Comparing Embeddings

Comparing Embeddings

azure-openai-samplesBasic_Samplesdotnetembeddingscsharp

Comparing text using embeddings

Installation

Install the Azure Open AI SDK using the below command.

[17]
[18]

Run this cell, it will prompt you for the apiKey, endPoint, and embedding deployment

[ ]

Import namesapaces and create an instance of OpenAiClient using the azureOpenAIEndpoint and the azureOpenAIKey

[19]
[20]

Create some text

[33]

Create text embeddings using the deployment

[34]
[35]

calculate Cosine Similarity

[36]