[DOCS]: When I add multiple knowledge bases to my agent, why can't I add metadata filtering? #237

Closed
opened 2026-02-16 05:19:31 -05:00 by yindo · 1 comment
Owner

Originally created by @huangxttttt on GitHub (Sep 4, 2025).

Type of Documentation Change

Error/Typo fix

Documentation Page URL or Path

No response

Current Content

No response

Suggested Changes

Image When I add multiple knowledge bases, metadata filtering is not possible, and each knowledge base has corresponding metadata parameters? How should I filter it?

Reason for Change

No response

Code of Conduct

  • I agree to follow Dify's documentation contribution guidelines
  • 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.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.
Originally created by @huangxttttt on GitHub (Sep 4, 2025). ### Type of Documentation Change Error/Typo fix ### Documentation Page URL or Path _No response_ ### Current Content _No response_ ### Suggested Changes <img width="914" height="220" alt="Image" src="https://github.com/user-attachments/assets/18f6d8db-642f-4c79-8d99-2fe28a75ce42" /> When I add multiple knowledge bases, metadata filtering is not possible, and each knowledge base has corresponding metadata parameters? How should I filter it? ### Reason for Change _No response_ ### Code of Conduct - [x] I agree to follow Dify's documentation [contribution guidelines](https://github.com/langgenius/dify/blob/0277a37fcad5ad86aeb239485c27fffd5cd90043/CONTRIBUTING.md) - [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] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields.
yindo added the documentationquestion labels 2026-02-16 05:19:31 -05:00
yindo closed this issue 2026-02-16 05:19:31 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 4, 2025):

When you add multiple knowledge bases to an agent in Dify, metadata filtering is only possible if all selected knowledge bases share the same metadata fields. The UI computes the intersection of metadata fields across your selected knowledge bases—if there are no common fields, the metadata filter option is disabled, which can be confusing if you expect to filter by fields unique to each knowledge base. This is a current product limitation: you can only filter on metadata fields present in every selected knowledge base, not individually per source. If you need distinct filters, the recommended workaround is to organize your documents into separate knowledge bases by type or metadata structure. Metadata filtering for multiple knowledge bases is planned for future releases, but there is no timeline yet. More details are available in this issue and this discussion.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 4, 2025): <!-- Answer --> When you add multiple knowledge bases to an agent in Dify, metadata filtering is only possible if all selected knowledge bases share the same metadata fields. The UI computes the intersection of metadata fields across your selected knowledge bases—if there are no common fields, the metadata filter option is disabled, which can be confusing if you expect to filter by fields unique to each knowledge base. This is a current product limitation: you can only filter on metadata fields present in every selected knowledge base, not individually per source. If you need distinct filters, the recommended workaround is to organize your documents into separate knowledge bases by type or metadata structure. Metadata filtering for multiple knowledge bases is planned for future releases, but there is no timeline yet. More details are available in [this issue](https://github.com/langgenius/dify/issues/18676) and [this discussion](https://github.com/langgenius/dify/issues/14972). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/56d89a61-981d-4255-b3a1-5d2a0cf902de?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-docs/issues/447)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#237