Overview
Azure AI services offer a series of interconnected components that allow you to create, deploy and configure the services you need to create an AI solution - in this case, a chat interface to provide useful and contextual information about our developer portal site.
Steps
Whilst it can be fun to jump straight in and start playing there are a few things to consider when looking to build a long term solution.
Consider how to structure your containers
We have a situation where the data we want to train our model on is going to differ based on the role of the caller. Depending on the role of the caller we are going to want to elicit a response from an index trained on all of our data, or possibly only data we have categorised as “public only”.
You need to consider that each index will be built and trained at the Storage container level.
Hence we have two containers: all-content and public-content.
Once you have decided how you are going to partition your data (you may not need to), determine a folder stucture inside each of those container and upload your content.
Create or review your hub dependencies
Before we create the Azure AI Foundry hub, there are some dependencies that it will need to function. They can be automatically created (and named) for you, you can point at existing resources (not recommended), or you can create and review them before continuing.
You will need:
- Azure Storage - to store the data you want indexed for yout AI model to consume
- Azure key vault - for the hub and projects to stire sensitive information securly such as storage keys and connection strings.
- Azure application insights - to monior and diagnose the health of you AI solution.
Create your AI Foundry hub
From your resource group, search for and create “Azure AI Foundry”. Select the resources you created in the previous step, or create these dependencies as you go.
Once created you can click “Launch Azure AI Foundry” to launch the foundry management centre and begin creating a project.
Create a project
Click on the “New Project” button, select a meaningful project name, and click “Create”
Create a Search service
In order to be able to index your content, you will need to create an Azure Search service. Search for “Search service”, then “Create new”
Select and deploy an AI model
From the project view left hand panel, select “Model catalog”. Browse and select a model, then click “Deploy”.
Once you have deployed your model you will see some excellent code samples (you can select from several different languages, libraries and means of authentication).
Create you data connections, models and indexes.
From within the chat playground, click the button “Add a data source”
On the modal and from the drop down “Select data source”, select “Azure Blob Storage (preview)”
Select the Subscription, Blob resource, container and AI Search resource, then add a unique name for the index.
Click “Next”.
You can select a means of authentication via managed identity, or Api key. Select “Api key”.
Play in the playground
Before writing any code first head to the playground by clicking the item in the left hand panel, or clicking the “Open in playground button”
Components
The Developer portal’s AI chat solution has been configured using the following components:
Azure AI hub ai-hub-developer-portal Azure AI project developer-portal-chat Search service ai-services-developer-portal Azure AI services ai-cognitive-services-developer-portal Storage developerportalaistorage Key vault kv-ai-hub-devportal Application insights ai-developer-portal-insights