Knowledge Base with Parent-Child segment mode not support in Agent #8228

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

Originally created by @leslie2046 on GitHub (Feb 13, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. Add a kb with parent child segment mode to an agent
  2. Query a question

✔️ Expected Behavior

support parent-child mode kb in agent as well

Actual Behavior

  1. result by nothing after retrieving
    Image
  2. result in hittest is ok
    Image
  3. result in chatbot app is ok
    Image
Originally created by @leslie2046 on GitHub (Feb 13, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1. Add a kb with parent child segment mode to an agent 2. Query a question ### ✔️ Expected Behavior support parent-child mode kb in agent as well ### ❌ Actual Behavior 1. result by nothing after retrieving ![Image](https://github.com/user-attachments/assets/cab4a987-2d52-4e79-aad5-c0de3ae0eb0d) 2. result in hittest is ok ![Image](https://github.com/user-attachments/assets/ea2853c2-ee7d-4529-a4e2-52dcb5d54e42) 3. result in chatbot app is ok ![Image](https://github.com/user-attachments/assets/1429cfa8-27fe-4632-809b-3024ea37b681)
yindo added the 🐞 bug label 2026-02-21 18:24:35 -05:00
yindo closed this issue 2026-02-21 18:24:35 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 13, 2025):

The issue you're experiencing with the Knowledge Base using Parent-Child segment mode not supporting retrieval in the Agent is due to the agent's requirement for a simpler structure for effective retrieval. The Parent-Child mode uses a two-tier data structure that may not align with the agent's capabilities. To resolve this, consider using the General Mode for the knowledge base when working with the agent, as it divides content into independent chunks that are more suitable for the agent's retrieval process [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report

@dosubot[bot] commented on GitHub (Feb 13, 2025): <!-- Answer --> The issue you're experiencing with the Knowledge Base using Parent-Child segment mode not supporting retrieval in the Agent is due to the agent's requirement for a simpler structure for effective retrieval. The Parent-Child mode uses a two-tier data structure that may not align with the agent's capabilities. To resolve this, consider using the General Mode for the knowledge base when working with the agent, as it divides content into independent chunks that are more suitable for the agent's retrieval process <sup>[[1]](https://github.com/langgenius/dify/issues/12645)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/create-knowledge-and-upload-documents/2.-choose-a-chunk-mode.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=other) | [Bug Report](https://app.dosu.dev/response-feedback/14001282-144f-4794-8abd-5b024e142fd4?feedback_type=bug_report)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8228