Search SharePoint and OneDrive with Power Virtual Agent

Search SharePoint and OneDrive with Power Virtual Agent

Today we are going to talk about the three new AI capabilities that Power Virtual Agent has:

  • Boosted Conversation
  • Generative Answers
  • Generative Actions

Watch my video if you want to follow along to build a bot.

Boosted Conversation is now part of Generative Answers. You still plug it in at Bot Creation, which you can also modify under Settings – AI Capabilities in the Bot later. It is slightly different than Generative Answers in the topic because you can only have up to two levels in the URL.

Generative Answers is a newly released AI capability, which is like Boosted Conversation, but you can add inside a topic at any node you like. It supports up to 4 public URLs and 4 internal Microsoft URLs.

Generative Actions is announced but not released yet as of May 2023. It enables the Bot to automatically search any existing connectors or flows to use in the Bot, without you building into the Bot. It looks wild!

During Microsoft Build May 2023, the AI team has released an article talking about these new features. In this tutorial, we will put them into actions.

Now since these are very new AI capabilities, the test results are not perfect. But we believe it will progress into maturity over time very soon.

Support Multiple Internal and External Data Source

Not long ago, Microsoft has added Boosted Conversation to Power Virtual Agent. You can link an external website and the Bot will start generating answers if it couldn't find any relevant topics.

Now, the improved version supports up to 4 public websites and 4 internal Microsoft websites (SharePoint sites and OneDrive).

Here is a quick comparison chart:

No alt text provided for this image

As you can see, it is actually using Graph to search SharePoint and OneDrive. To make the Bot working with internal data source, we need to:

  • Turn on Bot Authentication
  • Configure Enterprise Application with Sharepoint and OneDrive permissions

Let's get it started:

Preparation

We need to configure a user authentication with Enterprise App so the Bot could use it to access internal resources. Follow this link in Azure portal.

Now this article wasn't addressing the specific scenario we are working on here. When you configure the API permissions, in step 4, make sure you also add:

  • Files.Read.All
  • Sites.Read.All

Boosted Conversation

Create your bot and plug in the first SharePoint site as Boosted Conversation

No alt text provided for this image

Once created, in theory, you should be able to ask bot questions without creating any topics. Because the boosted conversation goes into the system fallback topics and if the bot couldn't find any relevant topic, it will use the fallback.

Generative Answers

This is the newly released feature that you can now add Generative Answers inside a topic, to any node as you see fit.

Here you can see that I created a topic, grabbed user's response as a variable. In the next step, click plus sign - Advanced - Generative Answers.

No alt text provided for this image

Basically it is like boosted conversation but inside a node.

No alt text provided for this image

I do not know how many of these you can have inside a bot but I guess you want to keep it lean and tidy.

Generative Actions

Generative Actions in Power Virtual Agents offer advanced capabilities for creating AI assistants. It allows chatbots to dynamically generate personalized responses and perform actions based on user inputs and backend data, enhancing the interactive experience and versatility of virtual agents.

It is not available yet but you can get a glimpse of this video.

Potentially it extends PVA furthermore to interact with different connectors and flows within the Power Platform.

Troubleshooting

To make sure the bot works, we need to make sure the Graph search is working.

Log in to Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph and you can use the below request body to confirm the search outcome from Graph Explorer.

{
? "requests": [
? ? {
? ? ? "entityTypes": [
? ? ? ? "driveItem",
? ? ? ? "listItem"
? ? ? ],
? ? ? "query": {
? ? ? ? "queryString": "SEARCH TERMS filetype:docx OR filetype:aspx path:\"DOMAIN.sharepoint.com/sites/SITENAME"
? ? ? },
? ? ? "from": 0,
? ? ? "size": 3,
? ? ? "QueryAlterationOptions": {
? ? ? ? "EnableModification": true,
? ? ? ? "EnableSuggestion": true
? ? ? }
? ? }
? ]
}        

If you get a hit, that means the Graph search is working fine and you might want to log a ticket for the bot.

If this is the first time you use Graph, make sure you get the permission right.

Go to Azure Enterprise Application and select Graph Explorer, Permissions

No alt text provided for this image

Consent on behalf of your users.

No alt text provided for this image

Now go back to Graph Explorer and log in as user (don't use GA). Once you run the query, expect to get a hit on the returned result.

No alt text provided for this image


Jeremy Becker

Helping Companies Realize Their Automation and AI Goals

1 年

Thanks Leo. This was an eye opening exercise. I spent a little bit of time stumbling with the Sharepoint integration but in the end I think it was size of the one document I was trying to work with (> 1MB?) that was the issue. Or it's just not happy with the PDF or something. Anyway, solved that and proved it could work and couldn't be happier. Thanks for the guidance here.

回复

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

Leo Wang的更多文章

社区洞察

其他会员也浏览了