How to Add SharePoint Document Libraries and Folders to Copilot Studio Knowledge for Improved RAG Accuracy

I heard that you can now specify SharePoint document libraries and folders as data sources for Copilot Studio’s generative answers, so I decided to test how this new feature works.

スポンサーリンク

Generative Answers Knowledge

Copilot Studio has always allowed you to set an entire SharePoint site as a knowledge source (data source) for generative answers.

*For more details, see here:
How to Use SharePoint Knowledge Base in Copilot Studio for RAG Implementation
As I begin learning about Copilot Studio, I'm documenting my findings.In this article, I'll explain how to generate resp...
Now, you can specify document libraries and even folders at a granular level. I tried out this new functionality right away.
Screenshot of the new SharePoint library selection in Copilot Studio

Preparation: Setting up the SharePoint Site for Knowledge

For this demonstration, I created a new SharePoint site to use as the knowledge source, and prepared two document libraries.
SharePoint site with two document libraries created
In one of the document libraries, I uploaded information related to Mr. Ichiro Tanaka.
Document library storing information about Mr. Ichiro Tanaka
In the other library, I placed information about Mr. Ichiro Sato in PDF format.
Document library with PDF information about Mr. Ichiro Sato

Experiment 1: Setting the Entire Site as Knowledge

First, let’s set the entire SharePoint site as knowledge and check how it works.

From [Add knowledge],
Knowledge addition screen
select SharePoint,
Select SharePoint as data source
enter the site URL, and click [Add].
Input SharePoint site URL
Provide a description and click [Add]. The knowledge source has now been added.
Add description for knowledge
Specify the site you just added as the knowledge source in the [Create Generative Answers] node,
Select knowledge source node
and when you ask about Mr. Ichiro, information related to Mr. Ichiro Tanaka appears.
Result showing Ichiro Tanaka's information

However, it doesn’t retrieve information about Mr. Ichiro Sato, possibly because it’s prioritized by the document library name. Next, let’s try specifying the second document library directly as knowledge.

Experiment 2: Setting a Document Library as Knowledge

As before, select SharePoint,
Select SharePoint as data source
This time, choose [Browse files].
Select 'Browse files' option
From Quick Access or another location, select the target document library, then click [Review selection].
Select document library and review selection
Enter a description and click [Add]. The document library is now added as knowledge.
Add description and complete knowledge addition
Now, specify only the newly added library as knowledge and ask the same question. This time, the information about “Mr. Sato” is retrieved successfully.
Successfully retrieved information about Mr. Sato

Experiment 3: Setting a Folder as Knowledge

Finally, let’s try specifying a folder as knowledge.

Add a folder to the previously used document library,
Adding a folder to the document library
and place information about “Ichiro Suzuki” inside the folder.
Placing Ichiro Suzuki's information into the folder
Return to Copilot Studio, select the folder you just created when adding knowledge, and click [Review selection].
Selecting the folder in Copilot Studio
When you ask the same question, only the information for Mr. Suzuki that was added appears as expected.
Only information about Ichiro Suzuki is retrieved

This demonstrates that you can now specify SharePoint document libraries or even individual folders as knowledge sources.

By carefully managing and limiting the search scope for RAG-on a per agent or topic basis-you can greatly improve the accuracy of generated answers.

Related Articles

コメント

Copied title and URL