langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
49.47k stars 7.08k forks source link

When I use the knowledge retrieval node and configure two external knowledge bases, the second configured knowledge base will definitely be invoked twice. #9500

Open kkjinping opened 1 week ago

kkjinping commented 1 week ago

Self Checks

Dify version

0.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I use the knowledge retrieval node and configure two external knowledge bases, the second configured knowledge base will definitely be invoked twice.

DDL: Test.zip

✔️ Expected Behavior

invoked once

❌ Actual Behavior

invoked twice

dosubot[bot] commented 1 week ago

There isn't specific information available in the Dify documentation or codebase about a known issue where the second configured external knowledge base is invoked twice during a single retrieval process. However, this could potentially be a bug or an unintended behavior in the system.

To address this issue, you might want to:

  1. Check the Configuration: Ensure that the configuration settings for both knowledge bases are correct and consistent. Sometimes, misconfigurations can lead to unexpected behavior.

  2. Review the Code: If you have access to the code, review the logic in the _fetch_dataset_retriever method within the KnowledgeRetrievalNode class. This part of the code is responsible for handling external knowledge bases and might provide insights into why the second knowledge base is being invoked twice [1].

  3. Debugging: Add logging or debugging statements in the relevant parts of the code to trace the invocation process and identify where the duplication occurs.

  4. Update or Patch: Ensure that you are using the latest version of Dify, as updates might contain bug fixes related to this issue.

If the problem persists, consider reporting it as a bug in the Dify repository, providing detailed information and any relevant logs or traces to help the maintainers diagnose the issue.

To continue talking to Dosu, mention @dosu.