From the course: Azure AI Engineer Associate (AI-102) Cert Prep: Implement Generative AI Solutions
Bring your own data with Azure OpenAI
From the course: Azure AI Engineer Associate (AI-102) Cert Prep: Implement Generative AI Solutions
Bring your own data with Azure OpenAI
- [Instructor] Using OpenAI out of the box is really awesome. But what if we have data that the model wasn't trained on? For example, company data, niche topics we enjoy, or maybe data newer than the last time the model was trained. We can bring our own data with Azure OpenAI. The first concern of any professional when it comes to private data and models should be: Is my data safe? There have been news reports of engineers using AI tools and models, then returning that personal information in the models. In Azure OpenAI, that is not an issue. There is a longer answer on what exactly is stored and what is not, but the short answer is your data is never stored. The only thing that is stored is the prompt itself, to be reviewed by AI to make sure you're using Azure OpenAI, according to the terms of service. Then if flagged as misuse, a human will manually review it. You can also opt out of this too though. Now that we know our data is safe, let's work with an example dataset. There are a few different ways to do this. I created an Azure storage account with a CSV of fruit prices. The data looks like this. We have our fruit, our form, and the retail price. The rest of the data we're not going to really concern ourselves with. Once that's in a storage account, we can go ahead and connect it to an Azure search instance. Let's check that out now. If you're going to do this yourself, just make sure you're using a basic Azure search service and delete it when you're done. The basic tier is $70 a month, with the default standard being over $200 a month. We'll need to create an index, a data source, and an indexer. For this example, we are going to use the import data button. Next we're going to look through and find our data source. After a few seconds, we'll notice that it did find our data and sampled it. So we're going to go ahead and skip the cognitive skills for this. Go ahead and allow it to use the default, have it use the default for the index. Submit that. And we'll notice up here, it'll eventually pop up and say it succeeded. Now we can go to Azure OpenAI Studio and use the index we just created. We'll go to chat, add our data, add data source. We used AI Search, search service, the index we just created, acknowledged that we might incur some fees. Keep search type to keyword, save and close. Now let's ask it: Find me all unique entries ordered by fruit. And we'll notice it starts generating it based on the fruit column. It is a little ugly. If we had a bigger window to work in, it would be a little nicer to look at, but that's awesome. So, let's go ahead and try a different query to see what we can do. Let's sort fruits by retail price per pound in increasing price like the following. And then we can do shift enter, oop, if we want to do a new line and we're going to do fruit, and this is me showing it, here's kind of the data structure I wanted back. Because some of them are per pint, we're going to also tell it to skip the ones that are per pint. And you notice our data coming back is now in the format of fruit and then price per pound. Now we have a table of each fruit in increasing order. Grab a data set, search index, and get to prompting.