In parallel mode, only one knowledge base will return results. #7532

Closed
opened 2026-02-21 18:21:04 -05:00 by yindo · 4 comments
Owner

Originally created by @JCLoranger on GitHub (Jan 5, 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.13.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I run three knowledge bases in parallel, only one returns a result, and which knowledge base returns the result is completely random. Sometimes it's A, sometimes B, and sometimes C, but the only consistent thing is that only one returns a result. However, when I change them to run serially, all three knowledge bases return results. Additionally, I can get results during recall testing, so I believe this is a bug.
This is my workflow,the knowledge bases in the red box are the ones in parallel mode.
image

✔️ Expected Behavior

I hope these three knowledge bases can return results in the same way as when they run serially.

Actual Behavior

Only one can return results.

Originally created by @JCLoranger on GitHub (Jan 5, 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.13.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I run three knowledge bases in parallel, only one returns a result, and which knowledge base returns the result is completely random. Sometimes it's A, sometimes B, and sometimes C, but the only consistent thing is that only one returns a result. However, when I change them to run serially, all three knowledge bases return results. Additionally, I can get results during recall testing, so I believe this is a bug. This is my workflow,the knowledge bases in the red box are the ones in parallel mode. ![image](https://github.com/user-attachments/assets/1716a113-4b8c-4efd-afc7-3cd782f96290) ### ✔️ Expected Behavior I hope these three knowledge bases can return results in the same way as when they run serially. ### ❌ Actual Behavior Only one can return results.
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:21:04 -05:00
yindo closed this issue 2026-02-21 18:21:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 5, 2025):

Hello @JCLoranger! I'm here to help you with bugs, answer questions, and even guide you on becoming a contributor. Let's work together to solve the issue you're facing.

Dify is designed to query all connected knowledge bases simultaneously in parallel mode, and the results should be consolidated and re-ranked to select the best matches [1][2]. If only one knowledge base is returning results in parallel mode, it might be a bug or a configuration issue.

Here are a few things you can check or try:

  1. Configuration Settings: Ensure that the configuration for parallel execution is correctly set up. There might be settings affecting how results are retrieved or merged.

  2. Rerank Model: Verify if the Rerank model is configured properly. This model is responsible for reordering and selecting the best results from multiple knowledge bases [1][2].

  3. Logs and Debugging: Check the logs for any errors or warnings that might indicate why only one knowledge base is returning results. This can provide insights into potential issues during execution.

  4. Version and Updates: Make sure you are using the latest version of Dify, as updates might contain bug fixes related to parallel execution.

If these steps do not resolve the issue, it might be necessary to investigate further into the specific implementation or report it as a bug for more detailed assistance.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Jan 5, 2025): <!-- Greeting --> Hello @JCLoranger! I'm here to help you with bugs, answer questions, and even guide you on becoming a contributor. Let's work together to solve the issue you're facing. <!-- Answer --> Dify is designed to query all connected knowledge bases simultaneously in parallel mode, and the results should be consolidated and re-ranked to select the best matches <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/extended-reading/retrieval-augment/retrieval.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/learn-more/extended-reading/retrieval-augment/retrieval.md)</sup>. If only one knowledge base is returning results in parallel mode, it might be a bug or a configuration issue. Here are a few things you can check or try: 1. **Configuration Settings**: Ensure that the configuration for parallel execution is correctly set up. There might be settings affecting how results are retrieved or merged. 2. **Rerank Model**: Verify if the Rerank model is configured properly. This model is responsible for reordering and selecting the best results from multiple knowledge bases <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/extended-reading/retrieval-augment/retrieval.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/learn-more/extended-reading/retrieval-augment/retrieval.md)</sup>. 3. **Logs and Debugging**: Check the logs for any errors or warnings that might indicate why only one knowledge base is returning results. This can provide insights into potential issues during execution. 4. **Version and Updates**: Make sure you are using the latest version of Dify, as updates might contain bug fixes related to parallel execution. If these steps do not resolve the issue, it might be necessary to investigate further into the specific implementation or report it as a bug for more detailed assistance. <!-- 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/4bc58d74-81dc-4090-8af7-aac34e7437b1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/4bc58d74-81dc-4090-8af7-aac34e7437b1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/4bc58d74-81dc-4090-8af7-aac34e7437b1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/4bc58d74-81dc-4090-8af7-aac34e7437b1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4bc58d74-81dc-4090-8af7-aac34e7437b1?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/4bc58d74-81dc-4090-8af7-aac34e7437b1?feedback_type=other)</sup>
Author
Owner

@JCLoranger commented on GitHub (Jan 5, 2025):

Thank you. Could you tell me how Dify is set up to return results when running knowledge bases in parallel? From what you're saying, it seems that the results in parallel mode are merged and re-ranked, but I have three knowledge bases, so shouldn't each one return its own results?@dosu

@JCLoranger commented on GitHub (Jan 5, 2025): Thank you. Could you tell me how Dify is set up to return results when running knowledge bases in parallel? From what you're saying, it seems that the results in parallel mode are merged and re-ranked, but I have three knowledge bases, so shouldn't each one return its own results?@dosu
Author
Owner

@dosubot[bot] commented on GitHub (Jan 5, 2025):

Dify uses a multi-path retrieval mode to handle queries from multiple knowledge bases in parallel. This mode queries related text fragments from all connected datasets simultaneously and then merges the results. The merged results are re-ranked using a Rerank model to ensure that the best matches are selected. This approach is designed to improve the precision and quality of the results by leveraging multiple knowledge bases at once, rather than having each knowledge base return its own separate results [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

@dosubot[bot] commented on GitHub (Jan 5, 2025): <!-- Answer --> Dify uses a multi-path retrieval mode to handle queries from multiple knowledge bases in parallel. This mode queries related text fragments from all connected datasets simultaneously and then merges the results. The merged results are re-ranked using a Rerank model to ensure that the best matches are selected. This approach is designed to improve the precision and quality of the results by leveraging multiple knowledge bases at once, rather than having each knowledge base return its own separate results <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/extended-reading/retrieval-augment/retrieval.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/integrate-knowledge-within-application.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/efcc394c-52ad-40be-9d06-1b201405387e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/efcc394c-52ad-40be-9d06-1b201405387e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/efcc394c-52ad-40be-9d06-1b201405387e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/efcc394c-52ad-40be-9d06-1b201405387e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/efcc394c-52ad-40be-9d06-1b201405387e?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/efcc394c-52ad-40be-9d06-1b201405387e?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Jan 6, 2025):

Please try to upgrade to v0.14.2 to see if this persists.

@crazywoola commented on GitHub (Jan 6, 2025): Please try to upgrade to v0.14.2 to see if this persists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7532