Feature request: Runtime filtering/scoping for Generative Answers (uploaded files + SharePoint) by metadata (e.g., file name, category, tags)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- ai
Research direction
No repository files, tests, or entry points are named. Start by reviewing the Copilot Studio Generative Answers behavior and the linked Power Platform Community discussion; completion would require an agreed implementation scope for runtime metadata filters across uploaded files and SharePoint sources.
Written by the indexing model from the issue text.
Description
Title
Feature request: Runtime filtering/scoping for Generative Answers (uploaded files + SharePoint) by metadata (e.g., file name, category, tags)
Description
Is your feature request related to a problem? Please describe.
In Copilot Studio, Generative Answers can use knowledge from uploaded files (PDF/DOCX) and SharePoint sources. However, there is no reliable way to dynamically scope or filter the retrieval at runtime (per conversation turn) based on metadata such as category, file name, document ID, tags, or customer context.
This becomes a blocker for scenarios with hundreds/thousands of documents where users first select a category or where the bot determines a category via NLU and then should answer only from the relevant subset of documents.
Workarounds like adding “file name” into the search query are not deterministic and often return chunks from other documents. Creating separate static knowledge sources/scopes for every case (e.g., 1000 categories/doc groups) is not manageable.
Describe the solution you'd like
Add a runtime filtering/scoping capability for Generative Answers retrieval, for both:
- Uploaded files (local uploads) and
- SharePoint-based knowledge sources (optional)
Examples of desired capabilities:
-
Metadata-based filter parameters (at runtime), e.g.:
fileName eq 'ABC-123.pdf'category in ('IT', 'HR')tags contains 'refund'customerId eq 'C-1007'
-
A way to attach metadata to uploaded files (or reuse existing metadata like file name) and then filter on it in the Generative Answers node.
-
A Generative Answers node option like:
- “Restrict retrieval to documents matching filter”
- “Use only these document IDs / file names”
-
Ideally usable via variables (Power Fx), e.g.:
FilterExpression = Global.SelectedCategoryAllowedFiles = Global.FileList
Describe alternatives you've considered
- Embedding the file name into the user query (e.g.,
"ABC-123.pdf " + question) – improves relevance sometimes but is not reliable and not a true filter. - Creating many separate knowledge sources/scopes (one per folder/category) – not scalable for many categories/doc groups.
- Using Azure AI Search with filterable metadata – works but adds significant operational overhead and complexity compared to built-in Generative Answers knowledge (indexing pipeline, schema, enrichment, etc.).
- Custom Data input – requires extracting full text content externally; difficult for PDFs and defeats the benefit of built-in ingestion/indexing.
Additional context
Use case: Customer service agent selects a category (or the bot infers it). The answer must be grounded only in the documents for that category (e.g., “Returns Policy – EU”, “Warranty – Product X”, “Contract Type Y”). Documents are mostly PDFs; they may be uploaded directly to Copilot Studio or stored in SharePoint.
We need deterministic runtime filtering/scoping to avoid answers grounded from unrelated documents and to keep governance manageable.
References / related discussions
Power Platform Community: “Generative answers with filtering documents / knowledge bases”
https://community.powerplatform.com/forums/thread/details/?threadid=fedcdc55-5967-4293-8417-c163e99f440f
- Dominant language
- TypeScript
- Stars
- 797
- Forks
- 491
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/CopilotStudioSamples
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
SharePointSSOComponent
microsoft/CopilotStudioSamples#537 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/CopilotStudioSamples#532 · 1 comment ·
-
Unable to Deploy SPFx Agent to a Single SharePoint Site (Works Only with Tenant-Wide Deployment) Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/CopilotStudioSamples#531 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in microsoft/CopilotStudioSamples
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100