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
45.07k stars 6.33k forks source link

The score of all results retrieved from the knowledge base is null #7468

Open Bulua opened 3 weeks ago

Bulua commented 3 weeks ago

Self Checks

Dify version

0.7.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 3 weeks ago

@Bulua Hello there! I'm here to assist you with bug fixes, questions, and contributions while waiting for a human maintainer. Let's tackle this together!

The score of all results retrieved from the knowledge base is null in version 0.7.1 of the self-hosted (Docker) Dify because the retrieval mode might not be properly configured. Specifically, if the knowledge base is using the "Economical" index mode, it does not support the "Weight Score" configuration and requires enabling the Rerank model to ensure content retrieval quality.

To resolve this issue, you should switch the knowledge base to the "High Quality" index mode or enable the Rerank model in the "Model Provider" settings [1].

To enable the Rerank model in the "Model Provider" settings, follow these steps:

  1. Navigate to the "Model Providers -> Cohere" page.
  2. Enter the API Key for the Rerank model (such as Cohere, Jina, etc.) [2].

To continue talking to Dosu, mention @dosu.

Bulua commented 3 weeks ago

image This is the setting of my knowledge base, and the score in the search results is still null

dosubot[bot] commented 3 weeks ago

The score in the search results might still be null despite configuring the knowledge base with the "bge-large-zh-v1.5" embedding model and "bge-reranker-large" rerank model because the embedding models used in the multiple referenced knowledge bases might be inconsistent. This inconsistency can prompt a notification to avoid conflicts in retrieval content. It is advisable to set and enable the Rerank model in the "Model Provider" or unify the retrieval settings of the knowledge bases [1][2].

Additionally, ensure that the retrieval settings are correctly configured. In high-quality indexing mode, Dify offers three retrieval options: Vector Search, Full-Text Search, and Hybrid Search. Each of these methods has specific configurations such as TopK, Score Threshold, and Rerank Model settings that need to be properly set up. Incorrect configurations could result in null scores in the search results [1].

To continue talking to Dosu, mention @dosu.

crazywoola commented 3 weeks ago

Are you referring to the knowledge API?