Chat with Your Data Azure and Unlock AI Insights

Author

Posted Oct 29, 2024

Reads 319

Abstract visualization of data analytics with graphs and charts showing dynamic growth.
Credit: pexels.com, Abstract visualization of data analytics with graphs and charts showing dynamic growth.

Azure provides a scalable and secure platform for storing and processing vast amounts of data.

With Azure, you can create a data lake to store and manage your data, allowing you to easily access and analyze it.

This makes it easier to integrate your data with various Azure services, such as Azure Machine Learning, to unlock AI insights.

Azure Machine Learning allows you to build, train, and deploy machine learning models, enabling you to make predictions and gain valuable insights from your data.

Deploying Azure AI

To deploy Azure AI, you'll need to start by opening Azure AI Studio from your browser using your Azure admin account credentials. This will allow you to access the necessary tools and resources.

Next, select your Azure Subscription and click Create Resource to begin the deployment process. You'll then need to complete the necessary parameters in the Create Azure OpenAI Resource blade, including Azure Subscription, Existing or New Azure Resource Group, Azure Region of choice, and a Unique Name for the Azure OpenAI Resource.

Credit: youtube.com, How to use Microsoft Azure AI Studio and Azure OpenAI models

The Pricing Tier should be set to Standard S0, as the Free Basic tier won't allow you to use the necessary Cognitive Search later on. Wait for the Azure OpenAI Resource to get deployed, and then navigate to the resource once it's ready.

To summarize the deployment process, here are the key steps:

  • Open Azure AI Studio using your Azure admin account credentials.
  • Select your Azure Subscription and click Create Resource.
  • Complete the necessary parameters in the Create Azure OpenAI Resource blade.
  • Set the Pricing Tier to Standard S0.
  • Wait for the Azure OpenAI Resource to get deployed.

Once the deployment is complete, you can navigate back to Azure OpenAI Studio to select your Azure AI Resource and continue with the next steps.

The Configuration Wizard

The configuration wizard in Azure OpenAI Studio is a game-changer for getting started with Azure AI. It assists you in making requests to Azure OpenAI while specifying a data source.

You can choose from three options: "Azure Cognitive Search", "Azure Blob Storage", and "Upload files". Each option has its own set of requirements and steps.

Here are the specifics for each option:

  • “Azure Cognitive Search” requires an active Azure Cognitive Search service. You'll need to select the index you want to use and choose the embedding model for vector search.
  • “Azure Blob Storage” assumes you have data stored in Azure Blob Storage, but not an Azure Search Service. You'll need to select the existing storage container and create a new Azure Cognitive Search service.
  • “Upload files” allows you to explore the “use your own data” feature without setting up Azure Blob Storage or Azure Cognitive Search. You'll need to create both and have the option to upload sample files for testing.

The Azure Cognitive Search service will host the index, but the document count may not reflect the exact number of files in the storage account. This is because the product uses a data preparation script to add data to Cognitive Search, where chunking takes place.

Deploying Azure AI

Credit: youtube.com, How to use Microsoft Azure AI Studio and Azure OpenAI models

Deploying Azure AI involves several steps, and the first part is deploying Azure AI Chat Playground using Azure AI Studio.

To start, you'll need to open Azure AI Studio from your browser using your Azure admin account credentials. This will allow you to select your Azure Subscription and click Create Resource.

You'll then need to complete the necessary parameters in the Create Azure OpenAI Resource blade, including Azure Subscription, Existing or New Azure Resource Group, Azure Region of choice, Unique Name for the Azure OpenAI Resource, and Pricing Tier. Be sure to select Standard S0, as the Free Basic tier won't allow you to use the necessary Cognitive Search later on.

The deployment process will take some time, so be patient and wait for the Azure OpenAI Resource to get deployed. Once it's ready, navigate to the resource.

After deploying the Azure OpenAI Resource, navigate back to Azure OpenAI Studio and select your Azure AI Resource created earlier. This will allow you to access the Chat Playground feature.

To set up the Chat Playground, select it from the Get Started options in Azure OpenAI Studio. You'll then need to create the AI model needed for the Cognitive Search later on, which involves completing the necessary settings, including Model: gpt-35-turbo and Model Version: Auto-update-to-default.

Data Sources and Validation

Credit: youtube.com, Learn Azure OpenAI - Chat and Code with Your Own Data!

To add your own data sources to the Azure AI Chat Playground, you'll need to specify the necessary settings and parameters, including Azure Subscription, Azure Blob Storage Account, and Azure Blob Storage Account container. You'll also need to create an Azure Cognitive Search resource to read the actual content of the blobs.

From the Chat Playground, select Add your data (preview) and follow the prompts to complete the necessary settings. Note how it asks for an Azure Cognitive Search resource, which you'll need to create separately. The process should only take a few minutes.

Once you've added your data, you can validate its content and response using the Chat Session. Enter a basic question in the your message field and see how the chat bot responds. You can also test how it handles broader questions with multiple possible results, as the chat bot will provide a summary overview of the different sources.

Here are the necessary parameters for creating an Azure Cognitive Search Resource:

  • Azure Subscription
  • Azure Resource Group
  • Location (make sure this matches the previous settings for the Azure OpenAI resource)
  • Service Name: unique name for the search service
  • Pricing Tier: Basic
  • Scale / Replica: 1/1

Adding Custom Data Sources

Credit: youtube.com, 2.3 - Using Custom Data Sources in Your AIs

Adding custom data sources is a crucial step in validating the accuracy of your chat bot's responses. This involves selecting Azure Blob Storage as the data source and specifying the storage container and Azure Cognitive Search resource created earlier.

To start, you'll need to select the "Add your data" tab and click the "Add a data source" button. From there, choose Azure Blob Storage and fill out the necessary settings, including the storage container and Azure Cognitive Search resource.

Note that you'll also need to create an Azure Cognitive Search resource, which will allow you to read the actual content of the blobs, such as Word documents and PDF files. To do this, click the "Create a new Azure Cognitive Search Resource" link and enter the necessary parameters, including the Azure Subscription, Azure Resource Group, Location, Service Name, Pricing Tier, and Scale/Replica.

Once you've completed these steps, navigate back to the Chat Playground and repeat the process to add your data source. This time, the Cognitive Search will be recognized as a service in the Add Data Source step.

Credit: youtube.com, NetBox Custom Scripts and Reports, plus Remote Data Sources

Here's a quick checklist of the necessary settings:

  • Azure Subscription
  • Azure Blob Storage Account
  • Azure Blob Storage Account container
  • Azure Cognitive Search resource (created separately)
  • Service Name: unique name for the search service
  • Pricing Tier: Basic
  • Scale/Replica: 1/1

By following these steps, you'll be able to add custom data sources to your chat bot and validate its accuracy.

Validating Data with Sessions

You can validate data content and response using a chat session. From the Chat Playground blade, navigate to Chat session and enter a basic question in the your message field.

To test the chat bot's ability to find multiple results, ask a broader question that includes a keyword related to the demo scenarios, such as "retail application".

The chat bot will provide a summary overview of the different sources, which is more than convincing of the power of Azure AI.

Here's a step-by-step guide to deploying the chat bot to Azure App Service:

  • Complete the necessary parameters for the Azure App Service to be created, including App Service Name, Azure Subscription, Azure Resource Group, Location, and Pricing Plan.
  • After waiting about 5 minutes, the chat bot will ask for Azure AD credentials to authenticate.
  • Once authenticated, the chat bot is ready to be used.

Note that a new App Registration and Service Principal gets created during the deployment process, granting only the admin user access.

Chatting with the Data

You can enter a query in the Chat session section of Azure OpenAI Studio. The response will be displayed along with links to the original .pdf document.

Credit: youtube.com, Chat with your data using Azure OpenAI

To get started, you can ask a question in the chat session, and the Azure AI will respond with an accurate answer, providing a brief description of the actual demo steps from the guide, as well as a link to the actual source markdown-file in Blob Storage.

If you want to get multiple results back, you can ask a broader question, using a keyword like "retail application" as an example. The Azure AI will find the different sources and provide a nice summary overview.

One of the advantages of Azure OpenAI's "use your data" feature is that you only need to include the dataSources variable block in your Azure OpenAI ChatCompletion API call. This will automatically ground the prompt and prepare the data for search.

You can start asking questions about the data once it has been added to Azure Cognitive Search. If you want to limit the chat to only your data, ensure that Limit Responses to your data content is checked.

Here's a quick rundown of the steps to get started:

  • Enter a query in the Chat session section of Azure OpenAI Studio
  • Ask a question and get an accurate answer
  • Use a broader question to get multiple results
  • Add data to Azure Cognitive Search
  • Limit responses to your data content (if desired)

By following these simple steps, you can start chatting with your data using Azure OpenAI.

Katrina Sanford

Writer

Katrina Sanford is a seasoned writer with a knack for crafting compelling content on a wide range of topics. Her expertise spans the realm of important issues, where she delves into thought-provoking subjects that resonate with readers. Her ability to distill complex concepts into engaging narratives has earned her a reputation as a versatile and reliable writer.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.