The reg can retrieve the knowledge base, but the knowledge base does not return content #12099

Closed
opened 2026-02-21 19:05:46 -05:00 by yindo · 2 comments
Owner

Originally created by @yop97i on GitHub (Mar 25, 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

1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

ImageThe reg can retrieve the knowledge base, but the knowledge base does not return content

✔️ Expected Behavior

The reg can retrieve the knowledge base, but the knowledge base does not return content

Image

Actual Behavior

No response

Originally created by @yop97i on GitHub (Mar 25, 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 1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/c384fba9-1b61-43db-8765-39642eb8ee1c)The reg can retrieve the knowledge base, but the knowledge base does not return content ### ✔️ Expected Behavior The reg can retrieve the knowledge base, but the knowledge base does not return content ![Image](https://github.com/user-attachments/assets/ae230c0c-d2aa-4e97-81ba-bbcfabe3d22c) ### ❌ Actual Behavior _No response_
yindo added the 🤔 cant-reproduce label 2026-02-21 19:05:46 -05:00
yindo closed this issue 2026-02-21 19:05:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 25, 2025):

I found some similar discussions that might be relevant to your issue:

  1. Why is my output empty - This discussion is still open and might provide insights into why the output is empty when querying the knowledge base [1].

  2. Why cannot find required text from knowledge base in Dify? - This is another open discussion that addresses issues with retrieving content from the knowledge base [2].

Regarding your issue, there are several potential reasons why the knowledge base might not return content:

  1. The external knowledge base API response might not be following Dify's required JSON structure, which must include 'records' containing metadata, score, title, and content fields, even though it returns a 200 status code [3].

  2. In Dify v0.15.3, there was a bug where the rerank model switch would automatically enable itself in the 'Recall Settings', causing empty results during retrieval testing. This issue was fixed in a later update [3].

  3. If the retrieval test returns 0 records, this indicates a problem with either the knowledge base configuration or the query not matching any content in the knowledge base. Additionally, the error 'cannot access local variable retrieval_resource_list' typically occurs when no matching documents are found during retrieval [4].

  4. In Dify version 0.15, when using a knowledge base with a parent-child retrieval model, the retrieval may fail in the agent context due to the agent treating the knowledge base as a tool. This requires refined knowledge base descriptions specifically for agent usage, unlike in workflow and chatflow contexts where such refinement is not necessary [5].

  5. If a knowledge base stops working after creating a new one in Dify, try renaming the affected knowledge base. This has been shown to restore the knowledge base's functionality, allowing it to be correctly referenced and queried again [6].

You might want to check these aspects to troubleshoot the issue further.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Mar 25, 2025): <!-- Answer --> I found some similar discussions that might be relevant to your issue: 1. [Why is my output empty](https://github.com/langgenius/dify/discussions/14030) - This discussion is still open and might provide insights into why the output is empty when querying the knowledge base <sup>[[1]](https://github.com/langgenius/dify/discussions/14030)</sup>. 2. [Why cannot find required text from knowledge base in Dify?](https://github.com/langgenius/dify/discussions/10459) - This is another open discussion that addresses issues with retrieving content from the knowledge base <sup>[[2]](https://github.com/langgenius/dify/discussions/10459)</sup>. Regarding your issue, there are several potential reasons why the knowledge base might not return content: 1. The external knowledge base API response might not be following Dify's required JSON structure, which must include 'records' containing metadata, score, title, and content fields, even though it returns a 200 status code <sup>[[3]](https://github.com/langgenius/dify/issues/14215)</sup>. 2. In Dify v0.15.3, there was a bug where the rerank model switch would automatically enable itself in the 'Recall Settings', causing empty results during retrieval testing. This issue was fixed in a later update <sup>[[3]](https://github.com/langgenius/dify/issues/14215)</sup>. 3. If the retrieval test returns 0 records, this indicates a problem with either the knowledge base configuration or the query not matching any content in the knowledge base. Additionally, the error 'cannot access local variable retrieval_resource_list' typically occurs when no matching documents are found during retrieval <sup>[[4]](https://github.com/langgenius/dify/issues/14691)</sup>. 4. In Dify version 0.15, when using a knowledge base with a parent-child retrieval model, the retrieval may fail in the agent context due to the agent treating the knowledge base as a tool. This requires refined knowledge base descriptions specifically for agent usage, unlike in workflow and chatflow contexts where such refinement is not necessary <sup>[[5]](https://github.com/langgenius/dify/issues/12645)</sup>. 5. If a knowledge base stops working after creating a new one in Dify, try renaming the affected knowledge base. This has been shown to restore the knowledge base's functionality, allowing it to be correctly referenced and queried again <sup>[[6]](https://github.com/langgenius/dify-docs/issues/501)</sup>. You might want to check these aspects to troubleshoot the issue further. <!-- 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/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/05fddb39-d28c-41ff-8cbd-ec9f43bdcaa3?feedback_type=other)</sup>
Author
Owner
@crazywoola commented on GitHub (Mar 25, 2025): https://github.com/langgenius/dify/blob/41dff175b3f9a98c5bf795315b5937de074a41ed/CONTRIBUTING.md#L23-L33
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12099