All Collections
APIs & Integrations
How to set up a data source in Azure OpenAI
How to set up a data source in Azure OpenAI

How to set up a resource group, storage account and search service to store documents in your Azure environment

Franz Vitulli avatar
Written by Franz Vitulli
Updated over a week ago

To gain all the benefits of our native integration with OpenAI, there are some foundational tasks that need to be done in your company’s Microsoft Azure environment. This will likely need someone who has the right permissions to operate in there—it might be you as bot builder, or someone within your organisation’s IT team or department. Once you have completed this set up, you will be able to set up the OpenAI connection and add the OpenAI message part into your bot, as outlined here.

This guide assumes that you have those permissions, or are being assisted by someone in your organisation who does.

Create a resource

Navigate to https://portal.azure.com, and under Azure services, click on "Create a resource":

Search for "OpenAI" and pick Azure OpenAI by Microsoft:

Click "Create", select a subscription and select or create a resource group (Create recommended), then pick region, name and pricing tier:

Select "All Networks"—this is required so that our bots can use it:

Add any tags (optional), hit "Next", then "Create", and wait for deployment to complete.

At this point, click on "Go to resource", then go to "Azure OpenAI studio" and click "Create new deployment":

Create a search service

  • Click "Create" at the top

  • Search for "Azure AI Search" and select it in the results:

  • Click "Create"

  • Select subscription and the Resource Group (pro-tip: leave as same resource group as selected for OpenAI)

  • Give it a service name and location (pro-tip: same location as OpenAI):

  • Hit "Review + Create"

  • Review costs and hit "Create"

  • Wait for the deployment to complete

Create a storage account

  • Click "Create"

  • Select Subscription and Resource Group (pro-tip: leaving as pre-selected resource group from earlier step)

  • Give it a name, region and performance (pro-tip: Standard performance and Geo-redundant storage (GRS):

  • Click "Review"

  • Click "Create"

  • Wait for the deployment to succeed

Add your data source

  • Click "Go to Azure OpenAI studio"

  • Click "Chat" in the side-menu:

  • Click "Add your data (preview)"

  • Click "Add a data source"

  • Select "Upload files" as the data source

  • Select Azure storage service resource you created earlier

  • Click "Turn on CORS"

  • Select the Azure AI search resource you created earlier

  • Select an index name

  • Tick to acknowledge the cost implications

  • Hit "Next":

  • Upload your files, then hit "Next"

  • Select "Keyword" as the search type

  • Hit "Save and Close"

  • Wait for ingestion to complete

  • Chat to your bot on the right hand panel “Chat Session”

  • Click "View code" to see how to integrate/get config options

Accessing your content and data

  • Go to Resource Groups and select the resource group: https://portal.azure.com/#view/HubsExtension/BrowseResourceGroupsClick your OpenAI resource

  • Click "Go to Azure OpenAI studio"

  • Click "Chat" in the side-menu

  • Click "Add your data (preview)"

  • Click "Add a data source"

  • Select "Azure AI search" from the dropdown

  • Select your search service and index

  • Click "Acknowledge usage" and "Next"

  • Hit "Next"

  • Select "Keyword" as search type

  • Hit "Next" then "Save and Close"

  • Chat on the right hand panel (their playground sometimes takes a couple of attempts, or a bit of time to hook up despite saying its ready, e.g.:

Deleting assets and resources

Assuming everything deployed in the same resource group, simply delete the resource group. Otherwise delete the storage service, azure ai search and open ai resources created, then any resource groups created for this deployment

Did this answer your question?