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
51.64k stars 7.47k forks source link

Normal Q&A is possible, but RAG cannot run #10711

Closed bamhill closed 6 hours ago

bamhill commented 7 hours ago

Self Checks

Dify version

Version 0.9.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image When the question involves the content in the knowledge base, it will report: 1 validation error for documentcontext score input should be a valid number [type=float_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.8/v/float_type

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 6 hours ago

Hey @bamhill! I'm here to help you with bugs, questions, and becoming a contributor. Let's tackle this issue together while we wait for a human maintainer.

The error you're encountering, "1 validation error for documentcontext score input should be a valid number," suggests that the documentcontext score is expected to be a numerical value, but it is currently None. This can happen if the score is missing in the metadata when creating DocumentContext objects or if the index_node_id is not found in the document_score_list [1].

To resolve this issue, ensure that the score is correctly retrieved and assigned a valid numerical value in the metadata or document score list. You might need to check the data source or logic that populates these scores to ensure they are not missing or incorrectly set to None.

To continue talking to Dosu, mention @dosu.

crazywoola commented 6 hours ago

Duplicated

Fixed