How to Build RAG in Copilot Studio: Adding SharePoint as a Knowledge Source

As I begin learning about Copilot Studio, I’m documenting my findings. In this article, I’ll explain how to add SharePoint as a knowledge source to your agent.

スポンサーリンク

Important Considerations When Adding SharePoint as a Knowledge Source

When adding SharePoint as a knowledge source, keep these important points in mind:

  • It’s recommended to omit https:// from URLs. Only SharePoint URLs with sharepoint.com domains are recognized.
  • Classic ASPX pages in SharePoint are not used for response generation.
  • To enhance SharePoint search results and support files up to 200 MB, enable [Enhanced Search Results] with a Microsoft 365 Copilot license in the same tenant as your agent.
  • Without a Microsoft 365 Copilot license in the same tenant, generative responses can only use files under 7MB. Consider splitting larger files.
  • SharePoint sites using accordion navigation menus or custom CSS are not used for response generation.
  • When using dynamic SharePoint URLs with Power Fx formulas, you must use the classic data options available in the generative response node properties.

Adding SharePoint as a Knowledge Source

For this demonstration, we’ll use this site containing information about “cats.”
Screenshot showing SharePoint site with cat information
First, select [Add knowledge],
Screenshot showing Add knowledge option
Choose SharePoint,
Screenshot showing SharePoint selection
Enter the URL without “https://”,
Screenshot showing URL configuration
Click [Add].
Screenshot showing Add button
From the […] menu, select [Edit],
Screenshot showing edit option
Set the knowledge description and save. Note: For agents with generative AI enabled, this [Description] is used to determine whether the agent should utilize this knowledge source.
Screenshot showing description configuration

This completes the configuration process.

Testing the Implementation

First, when using an agent with generative AI enabled (set to “English”),
Screenshot showing agent with generative AI enabled
We can verify through the activity map that the knowledge source is being utilized.
Screenshot showing knowledge source usage in activity map
Then, when using an agent with generative AI turned OFF,
Screenshot showing agent with generative AI disabled
We can confirm that the knowledge is being accessed through Conversational boosting.
Screenshot showing knowledge access through Conversational boosting

Behavior Differences Based on SharePoint Sharing Settings

The target site used in this demonstration hasn’t been shared with anyone else yet.
Screenshot showing SharePoint site sharing settings
When asking questions to the agent using my account that has access to the SharePoint site, it provides answers using the SharePoint knowledge base.
Screenshot showing response with SharePoint access
However, when a test user account without site access asks questions, the agent provides responses without using the SharePoint information.
Screenshot showing response without SharePoint access

This demonstrates that the agent properly considers site sharing permissions (access rights) when utilizing knowledge sources.

Related Articles

コメント

Copied title and URL