[DOCS]:How to perform paragraph-level metadata tagging? #267

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

Originally created by @liutong-eeo on GitHub (Nov 11, 2025).

Type of Documentation Change

Other

Documentation Page URL or Path

https://docs.dify.ai/zh-hans/guides/knowledge-base/metadata

Current Content

We are already using document-level metadata, but our requirement is to perform paragraph-level filtering when retrieving segments. I wonder if Dify has this functionality.

Suggested Changes

no

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 @liutong-eeo on GitHub (Nov 11, 2025). ### Type of Documentation Change Other ### Documentation Page URL or Path https://docs.dify.ai/zh-hans/guides/knowledge-base/metadata ### Current Content We are already using document-level metadata, but our requirement is to perform paragraph-level filtering when retrieving segments. I wonder if Dify has this functionality. ### Suggested Changes no ### 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:40 -05:00
yindo closed this issue 2026-02-16 05:19:40 -05:00
Author
Owner

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

Hi @liutong-eeo! I'm Dosu and I’m helping the dify-docs team.

Dify does not currently support paragraph-level (segment-level) metadata tagging or filtering—metadata can only be defined and filtered at the document level. While the codebase structures allow for metadata to be attached to individual chunks or segments, there is no built-in way to filter or retrieve segments based on their own metadata during search or retrieval operations. This limitation is confirmed in both the documentation and open feature requests from other users who want more granular filtering capabilities at the segment level (reference).

If you need fine-grained filtering, a common workaround is to split your content into smaller documents, each with its own metadata, or organize your knowledge base by metadata type. True paragraph-level metadata filtering would require architectural changes and is not available out of the box.

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 (Nov 11, 2025): <!-- Greeting --> Hi @liutong-eeo! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-docs team. <!-- Answer --> Dify does not currently support paragraph-level (segment-level) metadata tagging or filtering—metadata can only be defined and filtered at the document level. While the codebase structures allow for metadata to be attached to individual chunks or segments, there is no built-in way to filter or retrieve segments based on their own metadata during search or retrieval operations. This limitation is confirmed in both the documentation and open feature requests from other users who want more granular filtering capabilities at the segment level [(reference)](https://github.com/langgenius/dify/issues/21129). If you need fine-grained filtering, a common workaround is to split your content into smaller documents, each with its own metadata, or organize your knowledge base by metadata type. True paragraph-level metadata filtering would require architectural changes and is not available out of the box. <!-- 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/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/406b8d31-b3bd-41f1-9a98-aaa2b2fea763?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/516)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#267