Add Metadata-Based Filtering to the Knowledge Base UI #20714

Closed
opened 2026-02-21 20:08:35 -05:00 by yindo · 1 comment
Owner

Originally created by @kennsongyou on GitHub (Dec 1, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

In enterprise-level RAG scenarios, we rely heavily on metadata (e.g., customer_id, business_id, document_type, product_line, channel, year, etc.) to control retrieval scopes. Although Dify already supports metadata-based filtering during retrieval, the Knowledge Base UI does not provide any way to view, search, or filter documents by metadata.

This becomes a challenge when the Knowledge Base grows large.
For example:

  • It is hard to verify which documents belong to a specific business domain.

  • Operators cannot easily locate documents for a specific customer or product line.

  • Debugging retrieval behavior becomes difficult since we cannot visually inspect metadata distributions.

  • Multi-business-unit scenarios require metadata filtering to avoid mixing knowledge accidentally, but the UI does not provide such tools.

Without metadata filtering in the KB page, managing documents becomes inefficient and error-prone, especially for teams handling hundreds or thousands of documents.

2. Additional context or comments

I would like the Knowledge Base UI to have a metadata filter panel, allowing users to:

  • Filter documents (or chunks) by metadata key/value pairs

  • Combine multiple metadata conditions (e.g., type=faq + product_line=app)

  • Automatically detect metadata keys used in the KB and show them as filter options

  • Support text, dropdown, or free-form input depending on metadata type

This improvement would help with:

  • Enterprise data governance

  • Retrieval debugging

  • Content lifecycle management

  • Large-scale KB operations

Adding metadata filtering would align the UI with Dify’s existing retrieval capabilities and significantly improve the usability of Knowledge Base management

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @kennsongyou on GitHub (Dec 1, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. In enterprise-level RAG scenarios, we rely heavily on metadata (e.g., customer_id, business_id, document_type, product_line, channel, year, etc.) to control retrieval scopes. Although Dify already supports metadata-based filtering during retrieval, the Knowledge Base UI does not provide any way to view, search, or filter documents by metadata. This becomes a challenge when the Knowledge Base grows large. For example: - It is hard to verify which documents belong to a specific business domain. - Operators cannot easily locate documents for a specific customer or product line. - Debugging retrieval behavior becomes difficult since we cannot visually inspect metadata distributions. - Multi-business-unit scenarios require metadata filtering to avoid mixing knowledge accidentally, but the UI does not provide such tools. Without metadata filtering in the KB page, managing documents becomes inefficient and error-prone, especially for teams handling hundreds or thousands of documents. ### 2. Additional context or comments I would like the Knowledge Base UI to have a metadata filter panel, allowing users to: - Filter documents (or chunks) by metadata key/value pairs - Combine multiple metadata conditions (e.g., type=faq + product_line=app) - Automatically detect metadata keys used in the KB and show them as filter options - Support text, dropdown, or free-form input depending on metadata type This improvement would help with: - Enterprise data governance - Retrieval debugging - Content lifecycle management - Large-scale KB operations Adding metadata filtering would align the UI with Dify’s existing retrieval capabilities and significantly improve the usability of Knowledge Base management ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 20:08:35 -05:00
yindo closed this issue 2026-02-21 20:08:35 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 1, 2026):

Hi, @kennsongyou. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested enhancing the Knowledge Base UI with metadata-based filtering for better handling of large-scale documents.
  • Proposed features include filtering by metadata key/value pairs, combining multiple conditions, and auto-detecting metadata keys.
  • The goal is to improve data governance and retrieval debugging, aligning the UI with current retrieval capabilities.
  • There has been no further activity or contributions on this issue so far.

Next Steps:

  • Please let me know if this feature request is still relevant to the latest version of Dify by commenting on this issue.
  • If I do not hear back within 15 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 1, 2026): Hi, @kennsongyou. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested enhancing the Knowledge Base UI with metadata-based filtering for better handling of large-scale documents. - Proposed features include filtering by metadata key/value pairs, combining multiple conditions, and auto-detecting metadata keys. - The goal is to improve data governance and retrieval debugging, aligning the UI with current retrieval capabilities. - There has been no further activity or contributions on this issue so far. **Next Steps:** - Please let me know if this feature request is still relevant to the latest version of Dify by commenting on this issue. - If I do not hear back within 15 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20714