Edit

Share via


Azure OpenAI vectorizer

The Azure OpenAI vectorizer connects to an embedding model deployed to your Azure OpenAI in Foundry Models resource or Microsoft Foundry project to generate embeddings at query time. Your data is processed in the Geo where your model is deployed.

Although vectorizers are used at query time, you specify them in index definitions and reference them on vector fields through a vector profile. For more information, see Configure a vectorizer in a search index.

The Azure OpenAI vectorizer is called AzureOpenAIVectorizer in the REST API. Use the latest stable version of Indexes - Create (REST API) or an Azure SDK package that provides the feature.

Note

This vectorizer is bound to Azure OpenAI and is charged at the Azure OpenAI Standard price.

Prerequisites

  • An Azure OpenAI in Foundry Models resource or Foundry project.

    • Your Azure OpenAI resource must have a custom subdomain, such as https://<resource-name>.openai.azure.com. You can find this endpoint on the Keys and Endpoint page in the Azure portal and use it for the resourceUri property in this skill.

    • The parent resource of your Foundry project provides access to multiple endpoints, including https://<resource-name>.openai.azure.com, https://<resource-name>.services.ai.azure.com, and https://<resource-name>.cognitiveservices.azure.com. You can find these endpoints on the Keys and Endpoint page in the Azure portal and use any of them for the resourceUri property in this skill.

  • An Azure OpenAI embedding model deployed to your resource or project. For supported models, see the next section.

Vectorizer parameters

Parameters are case sensitive.

Parameter name Description
resourceUri (Required) The URI of the model provider. Supported domains are:

  • openai.azure.com
  • services.ai.azure.com
  • cognitiveservices.azure.com

Azure API Management endpoints are supported with URL https://<resource-name>.azure-api.net. Shared private links aren't supported for API Management endpoints.

apiKey The secret key used to access the model. If you provide a key, leave authIdentity empty. If you set both apiKey and authIdentity, the apiKey is used on the connection.
deploymentId (Required) The ID of the deployed Azure OpenAI embedding model. This is the deployment name you specified when you deployed the model.
authIdentity A user-managed identity used by the search service for the connection. You can use either a system- or user-managed identity. To use a system-managed identity, leave apiKey and authIdentity blank. The system-managed identity is used automatically. A managed identity must have Cognitive Services OpenAI User permissions to send text to Azure OpenAI.
modelName (Required) The name of the Azure OpenAI model deployed at the specified deploymentId. Supported values are:

  • text-embedding-ada-002
  • text-embedding-3-large
  • text-embedding-3-small

Supported vector query types

The Azure OpenAI vectorizer only supports text vector queries.

Expected field dimensions

The expected field dimensions for a field configured with an Azure OpenAI vectorizer depend on the modelName that is configured.

modelName Minimum dimensions Maximum dimensions
text-embedding-ada-002 1536 1536
text-embedding-3-large 1 3072
text-embedding-3-small 1 1536

Sample definition

"vectorizers": [
    {
        "name": "my-openai-vectorizer",
        "kind": "azureOpenAI",
        "azureOpenAIParameters": {
            "resourceUri": "https://my-fake-azure-openai-resource.openai.azure.com",
            "apiKey": "0000000000000000000000000000000000000",
            "deploymentId": "my-ada-002-deployment",
            "authIdentity": null,
            "modelName": "text-embedding-ada-002",
        },
    }
]

See also