Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external knowledge retrival empty because of document table is empty #9349

Closed
5 tasks done
dajianguo opened this issue Oct 15, 2024 · 3 comments
Closed
5 tasks done
Labels
🐞 bug Something isn't working

Comments

@dajianguo
Copy link
Contributor

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.9.1

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

I use a external knowledge,but in the chatflow, but don't retrival anything.
Because of the document table is empty when use the external data
333
set.

✔️ Expected Behavior

knowledge can retrival results

❌ Actual Behavior

knowledge retrival empty

Copy link

dosubot bot commented Oct 15, 2024

Hey @dajianguo! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's squash those bugs together!

The issue you're experiencing with external knowledge retrieval being empty when the document table is empty in the self-hosted Dify version 0.9.1 is due to how the _fetch_dataset_retriever method operates. This method relies on the presence of documents in the Document table to determine available datasets. It uses a subquery to count the number of available documents for each dataset, and only datasets with a non-zero document count are considered for retrieval. If the document table is empty, the subquery will not find any datasets with available documents, resulting in an empty retrieval result [1].

To resolve this, ensure that there are documents in the Document table or adjust the logic to handle cases where the document table might be empty but external datasets should still be considered.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Oct 15, 2024
@dajianguo
Copy link
Contributor Author

Sorry I think it has been resovled in #9241 ; please close this question.

@sepa85
Copy link

sepa85 commented Oct 15, 2024

Not sure if the same problem, but with cloud version 0.9.2 I also have empty result even if the knowledge test retrieves results.

Screenshot_20241015-171020.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants