web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Runtime Knowledge Sour...
Copilot Studio
Suggested Answer

Runtime Knowledge Source scoping without indexing delay

(0) ShareShare
ReportReport
Posted on by 2

Problem Summary

I'm trying to build a Copilot Studio agent that allows users to provide any SharePoint/Teams folder path and then interact exclusively with the documents in that folder. The agent should answer questions, create summaries, and extract information using semantic search - but strictly limited to the documents in the user-specified folder.

Key Requirements:

  • User provides a dynamic folder path (can be from any Team or SharePoint site)

  • Strict isolation: Only documents from the specified folder may be used (no information mixing)

  • Semantic search capability is mandatory

  • Up to 25 documents per folder (PDF, Word, PowerPoint - no Excel needed)

  • Integration into a multi-topic agent structure with potential sub-agents

My Environment

  • Valid Copilot license

  • Generative Orchestration enabled

  • Model: GPT-5

  • System prompt is not unusually long

Approaches I've Already Tried

I've explored both different methodological approaches (how to architect the solution) and different technical implementations (which tools/features to use).

Methodological Approaches

Approach A: Flow-Based Extraction with Caching Strategy

The idea was to process documents at runtime and persist results for subsequent queries:

  1. User provides folder path

  2. Agent Flow iterates through all files, analyzes each document via AI Builder prompts

  3. First call: Return extracted content as variable to the Copilot Studio topic

  4. For follow-up queries: Store combined results in a text file to avoid re-processing all documents with multiple prompts each time

Result: Context window overflow with error message:

"The request results in too much data needing to be processed. Review the amount of data being returned by your actions."

Even with summarization attempts, 25 documents exceed the available context.

Approach B: Staging Folder with Native Indexing + Dynamic Filtering

The idea was to leverage Copilot Studio's built-in indexing while maintaining document isolation:

  1. Configure a fixed SharePoint folder as Knowledge Source in the agent

  2. Copy user's files to this staging folder

  3. Append unique GUID to each filename for identification

  4. Use GUID as dynamic filter in Knowledge Source to scope retrieval to the current session's documents

Result: Indexing latency defeats the use case. New files take too long to become searchable, making real-time dynamic folder selection impractical.

Technical Implementations Tried

Implementation 1: SharePoint Knowledge Sources (Both Configuration Methods)

Tested both available methods for adding SharePoint as a knowledge source in Copilot Studio:

  • Method A: Direct file upload to agent knowledge

  • Method B: SharePoint site/library integration via the knowledge configuration panel

Result: Either files are not found at runtime, or the same indexing delay issues occur as in Approach B.

Implementation 2: Runtime File Retrieval via Tools and MCP

Attempted to bypass indexing entirely by retrieving file contents programmatically:

  • Built-in "Get File Content" connector actions

  • Microsoft SharePoint and OneDrive MCP (Model Context Protocol) connector

Result: Connector output size limits with error message:

"The output returned by the connector was too large to be processed by the agent. Reduce the size by using the available connector filters or reducing the number of configured action outputs."

No viable way to retrieve multiple document contents without exceeding limits.

Additional Context

  • Document sizes: Typical business documents, 100 KB to 5 MB per file

  • Document count: Up to 25 documents per folder

  • Document types: PDF, Word (.docx), PowerPoint (.pptx)

The Core Dilemma

I seem to be stuck between two fundamental constraints:

  1. Pre-indexed Knowledge Sources provide semantic search but require indexing time that makes dynamic folder selection impractical

  2. Runtime document retrieval (via flows/tools) allows dynamic folder paths but hits context window limits and lacks true semantic search across all documents simultaneously

What I'm Looking For

Has anyone successfully implemented a pattern for dynamic, user-specified document interaction in Copilot Studio that:

  • Works with arbitrary SharePoint/Teams folder paths provided at runtime

  • Maintains strict document isolation (no cross-contamination from other sources)

  • Provides semantic search capability across the folder contents

  • Handles up to 25 documents without context overflow

  • Responds within acceptable timeframes (not waiting for indexing)

After spending many hours exploring these approaches, I'm running out of ideas. I'm open to architectural alternatives, workarounds, or even confirmation that this use case isn't currently feasible with Copilot Studio's capabilities.

Any insights, experiences, or even a "this isn't possible yet" would be greatly appreciated.

Best regards

I have the same question (0)
  • Suggested answer
    Nivedipa-MSFT Profile Picture
    Microsoft Employee on at
    Hello @,

    Currently, Copilot Studio does not support this use case out-of-the-box. Dynamic, real-time semantic search across various SharePoint or Teams folders—especially with up to 25 large documents—is limited by several factors:

    • Knowledge Sources have indexing delays and are not real-time
    • There are limits on the context window and connector output during retrieval
    • There is no built-in option for dynamic, isolated semantic search at runtime

    Some possible, though less than ideal, workarounds include:

    • Reducing the number or size of documents per session
    • Pre-staging and indexing folders in advance, which isn’t truly dynamic
    • Developing a custom external semantic search service and integrating it with Copilot Studio, which requires substantial engineering effort

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard