Azure Machine Learning Custom Skill for Azure AI Search

 





How To Use Custom Azure Machine Learning Skillset ?

You can create robust AI models and host them on Azure using Azure Machine Learning. The endpoints of these AI models can be utilized in search strategies to improve indexes. Adding a machine learning custom skill to a search index functions in the same way as adding any other custom talent.

Custom Azure Machine Learning Skill Schema

An Azure Machine Learning (AML) custom skill enriches a search index at the document level. Your document indexer must have an AmlSkill in its skill set.

Note that batchSize options are not included in the custom skill. One document at a time will be processed by the AML model. The remaining parameters, timeout and degree of parallelism, regulate how the skill is performed. The timeout value in the aforementioned schema is set at 30 seconds.

One should be the starting point for the degree of parallelism. You may be able to raise this figure, depending on your infrastructure.

Scaling up the Kubernetes inference cluster suitably to manage your workload is the greatest approach to control the effectiveness of an AML expertise.

The findings from the AML model must be stored in a field in the document's index. The results from the custom skill set will then be stored in the field on the document in the index by adding an output field mapping.

Enrich Search Index Using an Azure Machine Learning Model

Developer tools such as the Python SDK, REST APIs, or Azure CLI are used to build your Azure Machine Learning model. Using the Azure AI Machine Learning studio, a graphical user interface that enables you to develop, train, and implement models without writing any code, is an additional choice.

With a model created, you alter how the scoring code calls the model to allow it to be used by your custom search skill. The last steps are to create a Kubernetes cluster to host an endpoint for your model.

Create AML Workspace

Azure will generate storage accounts, a key store, and application insights resources when you construct the AML workspace. You can open the Azure AI Machine Learning Studio by clicking on the link in the AML workspace Overview pane.

Create and Train Model in Azure Machine Learning Studio

With Azure AI Machine Learning Studio, you can utilize a designer to develop pipelines that generate and train models using drag and drop. Using prebuilt templates is an even simpler method of model creation.

However you choose to create your models, they need to be registered in Azure AI Machine Learning Studio so that you can deploy the model to a web service.

Create and Train Model in Azure Machine Learning Studio

With Azure AI Machine Learning Studio, you can develop pipelines that generate and train models using a designer and drag & drop. Using prebuilt templates makes model creation more simpler.

However you choose to create your models, they need to be registered in Azure AI Machine Learning Studio so that you can deploy the model to a web service.

Create Endpoint For Your Model To Use

An endpoint receives the model's deployment. A model can be deployed to a web service, a batch endpoint, or a real-time endpoint using Azure AI Machine Learning Studio. Currently, Azure AI Search's custom AmlSkill talent is limited to web service endpoints.

The other restriction is that the endpoint has to be an Azure Kubernetes Service (AKS), container instances aren't supported.

You can manually establish the clusters in the Azure portal and refer to them when you create your endpoint if you have prior expertise setting up and maintaining AKS clusters. However, letting Azure AI Machine Learning Studio build and run the cluster for you is a simpler choice.

You can create inference clusters by going to the studio's compute area. After that, AML Studio will let you select the cluster's size, enable HTTPS, and generate a domain name. The format for it will be location.cloudapp.azure.com:443.

Connect AML Custom Skill To Endpoint

With everything above in place, you need to update your Azure AI Search service. First, to enrich your search index you'll add a new field to your index to include the output for the model. Then you'll update your index skillset and add the #Microsoft.Skills.Custom.AmlSkill custom skill. Next, you'll change your indexer to map the output from the custom skill to the field you created on the index. The last step is to rerun your indexer to enrich your index with the AML model.

Conclusion

We have successfully learnt about building an Azure Machine Learning custom skill for Azure AI search.



























Comments

Popular posts from this blog

Connect Data to Azure Sentinel Using Data Connectors

Information Protection Scanner: Resolve Issues with Information Protection Scanner Deployment

Azure AI Search plugin in Microsoft Security Copilot (Preview)