Create your own Copilot that uses your own data with an Azure OpenAI Service Model

Create your own Copilot that uses your own data with an Azure OpenAI Service Model

In a world of constant innovation and change, it is crucial for businesses to leverage the power of artificial intelligence to stay ahead. By creating your own copilot that uses your own data with an Azure OpenAI service model, you can overcome the limitations of standardized copilot systems and gain a competitive edge.

By tailoring the copilot to your specific needs, you can optimize your driving operations, enhance safety, and pave the way for a future of autonomous driving.

So, embark on this exciting journey and create your custom copilot to unlock the full potential of this technology.

  1. Overview:
  2. Prerequisites
  3. Demo
    1. Create an AI Project and configure the chat model:
    2. Deploy and test a chat model without your data:
    3. Add your data
    4. Test the model with your data
    5. Deploy your web app
      1. Configure web app authentication
      2. Use the web app
  4. Conclusion:
  5. References:

Overview:

In this post, we will see how to deploy a chat web app that uses your own data with an Azure OpenAI Service model. Details to configure the chat model using the GPT model is provided in the previous post (getting started with AI Studio)

Below are the steps used:

  1. Create an AI Project and configure Chat Model using chat gpt
  2. Deploy and test a chat model without your data
  3. Add your data
  4. Test the model with your data
  5. Deploy your web app

Prerequisites

Demo

Let’s follow the step-by-step process:

Create an AI Project and configure the chat model:

Deploy and test a chat model without your data:

Select Build from the top menu and then select Deployments > Create > Real-time endpoint.

Select a model:

On the deployment details page from the previous step, select Open in playground.

Now, In the chat session pane, enter the following question: “How much are the TrailWalker hiking shoes”.

You will see the result as highlighted below.

The assistant replies that it doesn’t know the answer. This is because the model doesn’t have access to product information about the TrailWalker hiking shoes.

Add your data

We saw above that Chat assistance is not able to answer the specific question. We will now see how to add your data to the playground, and it will help the assistant answer questions about your products.

Before you Add the data, you need to create a Search Service and Search Index.

Azure OpenAI needs both a storage resource and a search resource to access and index your data. Your data is stored securely in your Azure subscription.

Create a Search Service:

Go to Azure portal and create a Search Service.

Index is created:

Test the model with your data

Go to the playground, select Build from the top menu and then select Playground from the collapsible left menu.

On the Assistant setup pane, select Add your data (preview) > + Add a data source.

In the Select or add data source page that appears, select Upload files from the Select data source dropdown.

Upload the data.

Review and Finish.

Now on the Assistant setup pane, you can see that your data ingestion is in progress. Before proceeding, wait until you see the data source and index name in place of the status.

You can now chat with the model asking the same question as before (“How much are the TrailWalker hiking shoes”), and this time it uses information from your data to construct the response. You can expand the references button to see the data that was used.

Pause
There is another way to Evaluate your input.

Go to Evaluation and enter your question:

You can view the results.

Deploy your web app

Once you’re satisfied with the experience in Azure AI Studio, you can deploy the model as a standalone web application.

In this post, the web app is deployed to the same resource group as your Azure AI hub resource

Select Deploy > A new web app.

Check status:

Configure web app authentication

By default, the web app will only be accessible to you.

In this post, you add authentication to restrict access to the app to members of your Azure tenant.

Users are asked to sign in with their Microsoft Entra account to be able to access your app. You can follow a similar process to add another identity provider if you prefer.

Use the web app

You’re almost there! Now you can test the web app.

  1. Wait 10 minutes or so for the authentication settings to take effect.
  2. Return to the browser tab containing the Playground page in Azure AI Studio.
  3. Select Launch to launch the deployed web app. If prompted, accept the permissions request

Wrapping up !

Conclusion:

In conclusion, this example has demonstrated how to create and implement a Copilot chat assistant using Azure AI Studio, Chatgpt, and Azure services. With these skills, you can now build your own Copilot and deploy it within your web application, providing valuable assistance to your users.

Stay tuned for future posts on AI as we continue to explore this exciting field.

Happy learning!

References:

https://learn.microsoft.com/en-us/azure/ai-studio/tutorials/deploy-chat-web-app

https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/use-your-data?tabs=ai-search

https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search

This blog is part of Microsoft Copilot Week! Find more similar blogs on our Microsoft Copilot Landing page here.

About the author:

Rajeev Singh

Rajeev Singh

Cloud Solutions Architect | Microsoft Azure | Cloud Migration, App Modernization, Cloud Native Development, Integration, DevOps, AI, GenAI, ML

Reference:

Singh, R. (2024) Create your own Copilot that uses your own data with an Azure OpenAI Service Model. Available at: Create your own Copilot that uses your own data with an Azure OpenAI Service Model – Rajeev Singh | Coder, Blogger, YouTuber (singhrajeev.com) [Accessed on 23/04/2024]

Share this on...

Rate this Post:

Share: