Azure, Power Platform and Everything cloud

This post will be more focused into the integration between Power Virtual Agents and Azure Open AI. This article here has a very detail tutorial on setting up azure open ai with a custom dataset:

https://techcommunity.microsoft.com/t5/educator-developer-blog/bring-your-own-data-to-azure-openai-step-by-step-guide/ba-p/3905212

The tutorial has great detail until the Power Virtual Agent part, which is a little unfinished, so I’ll pick from there and expand some more.

First, (to this date) to deploy an Azure Open AI model to Power Virtual Agents, this feature only works when you set a data source up.

Notice the deploy button is not available until you add a data source:

When you add a data source:

Once you deploy to a new power virtual agent, you should see this success message:

When you click “Create”, the BOT is generated and if you open the “System” tab, you should see a topic “Conversational Boost”. This topic has an Azure Open AI data source pointing to the Azure Open AI service that you created.

If you click on “Data sources / edit” under “create generative answers” you should see the “connection properties” in the right side.

That automatically pulls this information from the Azure Open AI model:

The deployment seems to work well when using Azure Open AI with GPT-3 but not when using GPT-4. I have managed to set it with a GPT-4 model by first deploying a GPT-3 and replacing the Data source connection properties with the values of a GPT-4 setup.

So, why and when to use Open AI with Power Virtual Agents?

So far, the effectiveness of Power Virtual Agents has been closely tied to the level of effort invested in crafting a comprehensive Q&A setup. This involves painstakingly identifying, cataloging, and anticipating every conceivable variation of a particular question, all while formulating a corresponding answer.

Take this question for example:

This was the answer of a brand new PVA Bot without a specific flow for the question “Who is the best football player of all times?”

After we add a flow for that question:

The flow works (#3) when the question matches the flow question (#1)(#2). A variation of the same question is enough to confuse the flow. The solution is to try to list any imaginable way to ask the same question.

“By enabling the inclusion of your own data in Azure Open AI, this task can be significantly more streamlined. Nonetheless, it is imperative to dedicate time to testing in order to ascertain that the generative AI doesn’t generate inappropriate or misleading content.”

The example below is using the “conversational boost” flow that is linked to an Azure Open AI service. It was able to understand a very different variation of the same question (for who doesn’t know, GOAT is a short got “greatest of all times”):

Incorporating your own data can help keep OpenAI from straying too far from ideal answers, but it’s crucial to also consider Responsible AI practices. For instance, let’s take the question, ‘Who is the best football player of all time?’—a topic open to debate. Pele is a fair answer but not necessarily a precise answer to some audiences. Before jumping into composing your datasets and creating Open AI bots, read this article about “Responsible AI”:

https://learn.microsoft.com/en-us/legal/cognitive-services/openai/overview

The above is using a GPT-4 data model:

By changing to a GPT-3 model, the answer is now a little bit different.

Settings like “temperature can make it vary.”

Setting “temperature” toward 1 will make outputs more random and diverse. Random and diverse does not really sound like ideal if you need sharp and precise answers, but, nevertheless, try and test it.

If you want to create other routes to avoid one generic topic that will use Open AI whenever other topics fail, you can disable the “Conversational Boost” topic and create a topic that will allow you to route only specific questions to the Open AI Service.

To invoke Azure Open AI on your own custom topic, select “advanced” and “generative answers.”

The challenge (to this date) is, you need to manually fill the parameters for the connection.

Another interesting setting is the “Create Generative Answers” task even offers other source types like (#1) websites and (#2) SharePoint. So, you should be able to balance these features to create something simpler than an endless collection of static topics.

I hope this quick post helped a little whoever is looking specifically into this combination of PVA and Open AI. For more info: https://powervirtualagents.microsoft.com/en-us/blog/create-generative-ai-solutions-with-power-virtual-agents-and-azure-openai-services/

Leave a Reply

Discover more from Bruno Lucas Azure Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading