ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search - Part 2
Artwork by Midjourney V5

ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search - Part 2

Introduction

Not long ago, Microsoft Mechanics YouTube channel showcased a ChatGPT-like application that can be built using Azure Cognitive Services and integrated with internal corporate data. Intrigued by this, I've been working on implementing it with my own data.

This solution offers several benefits compared to the Power Virtual Agent (PVA) we developed last week. Powered by OpenAI, it provides an authentic ChatGPT experience, offering not only answers but also source links.

By ingesting and converting data into vectors using ML techniques like Cosine Similarity, it delivers highly accurate Semantic Search. This approach outperforms PVA's Generative Answers, which rely on Graph Search, resembling traditional keyword searches.

Another advantage is that your data remains within your Azure tenant when deploying your own Azure OpenAI model, ensuring data privacy and security.

Thanks to Microsoft's support, deploying this solution on Azure is quick and straightforward, allowing us to get it up and running within minutes. In Part 1, I was not able to replace the sample data with my own. In Part 2, we are taking a slightly different approach and able to use our own data.

Preparation:

If you have never done an Azure deployment, follow the below steps:

NodeJS

Go to https://nodejs.org/ to install NodeJS LTS version.

Once completed, open cmd and type npm -v to see the version that got installed.

Azure CLI for Windows

Open up Power Shell as Administrator and run the winget to install Azure CLI

winget install -e --id Microsoft.AzureCLI        
No alt text provided for this image

Restart PowerShell and type Az to see it is now installed.

Azure Tools for VS Code

Next, install Azure Tools extension in VS Code.

No alt text provided for this image

Azure Deployment

Now you have your runtime in place, we can follow this GitHub page to deploy.

No alt text provided for this image

Clone the repository

  1. Click the Code and copy the HTTPS address

No alt text provided for this image

2. Open VSCode, click Explorer, Clone Repository, paste in the URL

No alt text provided for this image

3. You should now have all the required files in the VSCode.

No alt text provided for this image

Project Project Initialization

  1. Create a new folder (mine is called "InternalDocs") and switch to the new folder.
  2. Run "azd auth login" to log in to Azure portal.

No alt text provided for this image

3. Run?"azd init -t azure-search-openai-demo", create a new environment name.

No alt text provided for this image

4. Now you see all the files have initialized again under your folder. Open data folder and replace with your own files.

No alt text provided for this image

App Deployment - Start from scratch

  1. Run "azd up" to provision all the required resouces. You will need to

  • Select your subscription that has Azure OpenAI enabled
  • Select East US only, otherwise you need to modify the script

2. If you receive the following confirmation, then the app is deployed correctly.

No alt text provided for this image

3. To test out, simply click the Endpoint and start chatting with your own data!

No alt text provided for this image


Huy Ngo

Developer at Alacrity Solutions

1 年

Thank you! But can we upload Word or other kinds of documents rather than PDF?

回复
Ajit Ananthram

Technical Specialist at Microsoft | Data & AI

1 年

Thanks Leo. Great to hear the repo came in handy!

Rémi Dyon

Principal Solution Architect | Microsoft Copilot Studio | Power CAT

1 年

Always love your articles! Well written, clear and great use cases!

要查看或添加评论,请登录

Leo Wang的更多文章

社区洞察

其他会员也浏览了