Dify+RAGFlow #20240

Closed
opened 2026-02-21 20:06:25 -05:00 by yindo · 4 comments
Owner

Originally created by @lhxxrds on GitHub (Nov 10, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • 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.

Dify version

1.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After integrating RAGFlow as an external knowledge base in Dify, is it true that Dify cannot utilize the metadata from RAGFlow—specifically, the dataset-level or document-level metadata?

✔️ Expected Behavior

After integrating RAGFlow as an external knowledge base in Dify, is it true that Dify cannot utilize the metadata from RAGFlow—specifically, the dataset-level or document-level metadata?After integrating RAGFlow as an external knowledge base in Dify, is it true that Dify cannot utilize the metadata from RAGFlow—specifically, the dataset-level or document-level metadata?

Actual Behavior

No response

Originally created by @lhxxrds on GitHub (Nov 10, 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] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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. ### Dify version 1.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After integrating RAGFlow as an external knowledge base in Dify, is it true that Dify cannot utilize the metadata from RAGFlow—specifically, the dataset-level or document-level metadata? ### ✔️ Expected Behavior After integrating RAGFlow as an external knowledge base in Dify, is it true that Dify cannot utilize the metadata from RAGFlow—specifically, the dataset-level or document-level metadata?After integrating RAGFlow as an external knowledge base in Dify, is it true that Dify cannot utilize the metadata from RAGFlow—specifically, the dataset-level or document-level metadata? ### ❌ Actual Behavior _No response_
yindo added the 🙋‍♂️ question label 2026-02-21 20:06:25 -05:00
yindo closed this issue 2026-02-21 20:06:25 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 10, 2025):

Dify does not currently support utilizing dataset-level or document-level metadata from RAGFlow when integrated as an external knowledge base. The integration only allows high-level configuration like retrieval parameters, name, and description. There is no code or UI logic for importing, mapping, or using metadata from external knowledge bases for retrieval or workflow processing, and backend services will reject attempts to transform external datasets into RAG pipelines with metadata usage. This limitation is consistent across the codebase and UI components, with no hidden or alternative pathways for metadata usage found.
Source 1
Source 2

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Nov 10, 2025): <!-- Answer --> Dify does not currently support utilizing dataset-level or document-level metadata from RAGFlow when integrated as an external knowledge base. The integration only allows high-level configuration like retrieval parameters, name, and description. There is no code or UI logic for importing, mapping, or using metadata from external knowledge bases for retrieval or workflow processing, and backend services will reject attempts to transform external datasets into RAG pipelines with metadata usage. This limitation is consistent across the codebase and UI components, with no hidden or alternative pathways for metadata usage found. [Source 1](https://github.com/langgenius/dify/blob/b9bc48d8dd4251ee8782d4c9f5b37555f2665c01/api/services/rag_pipeline/rag_pipeline_transform_service.py#L25-L386) [Source 2](https://github.com/langgenius/dify/blob/b9bc48d8dd4251ee8782d4c9f5b37555f2665c01/api/services/rag_pipeline/rag_pipeline.py#L89-L1418) <!-- 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/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cebf5265-0d45-49bf-b774-2c7a293a65b9?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/issues/28050)
Author
Owner

@lhxxrds commented on GitHub (Nov 10, 2025):

When using Dify with an external RAGFlow knowledge base, I'd like to implement metadata-based filtering—for example, when retrieving content related to Shanxi Province, I want to avoid accidentally retrieving documents about Shandong Province. To achieve this, I plan to use metadata to strictly filter and return only documents associated with Shanxi Province. How can this be implemented?on @dosu.

@lhxxrds commented on GitHub (Nov 10, 2025): When using Dify with an external RAGFlow knowledge base, I'd like to implement metadata-based filtering—for example, when retrieving content related to Shanxi Province, I want to avoid accidentally retrieving documents about Shandong Province. To achieve this, I plan to use metadata to strictly filter and return only documents associated with Shanxi Province. How can this be implemented?on [@dosu](https://go.dosu.dev/dosubot).
Author
Owner

@dosubot[bot] commented on GitHub (Nov 10, 2025):

Dify does not currently support metadata-based filtering for external knowledge bases like RAGFlow. When you use an external KB, Dify forwards the metadata_condition parameter to the external API, but it does not apply or enforce the filter itself—the filtering depends entirely on whether RAGFlow's API supports and correctly interprets the metadata_condition you send. If you find that all documents are returned regardless of your filter, it's likely that RAGFlow is not processing the filter as expected, or there is a mismatch in field names or data types between Dify and RAGFlow. You can verify this by testing the same filter directly against RAGFlow's API and checking the request payload Dify sends out.

As a workaround, you can use internal knowledge bases for strict metadata filtering, or organize your documents into separate internal KBs by metadata type. If you need advanced filtering with RAGFlow, consider using Dify's HTTP node to call RAGFlow's API directly with custom filters. Metadata filtering for external KBs is a known limitation and is planned for future releases, but there is no timeline yet for this feature being natively supported in Dify.
Reference 1 | Reference 2

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Nov 10, 2025): <!-- Answer --> Dify does not currently support metadata-based filtering for external knowledge bases like RAGFlow. When you use an external KB, Dify forwards the metadata_condition parameter to the external API, but it does not apply or enforce the filter itself—the filtering depends entirely on whether RAGFlow's API supports and correctly interprets the metadata_condition you send. If you find that all documents are returned regardless of your filter, it's likely that RAGFlow is not processing the filter as expected, or there is a mismatch in field names or data types between Dify and RAGFlow. You can verify this by testing the same filter directly against RAGFlow's API and checking the request payload Dify sends out. As a workaround, you can use internal knowledge bases for strict metadata filtering, or organize your documents into separate internal KBs by metadata type. If you need advanced filtering with RAGFlow, consider using Dify's HTTP node to call RAGFlow's API directly with custom filters. Metadata filtering for external KBs is a known limitation and is planned for future releases, but there is no timeline yet for this feature being natively supported in Dify. [Reference 1](https://github.com/langgenius/dify/issues/21070) | [Reference 2](https://github.com/langgenius/dify/issues/25259) <!-- 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/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1ef99c61-e16a-47ce-ad1c-64c2856e763c?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/issues/28050)
Author
Owner

@crazywoola commented on GitHub (Nov 10, 2025):

This is only for bug report, if you would like to ask a question, please head to Discussions.

@crazywoola commented on GitHub (Nov 10, 2025): This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20240