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
52.4k stars 7.64k forks source link

Chat workflow, reference function is invalid #10316

Open Dongnc1017 opened 2 weeks ago

Dongnc1017 commented 2 weeks ago

Self Checks

Dify version

0.10.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Use the workflow orchestration of the chat assistant and turn on citation and attribution, but nothing happens. But it is useful only when the chat assistant is turned on.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 2 weeks ago

Hello @Dongnc1017! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together!

I found a similar issue regarding the citation and attribution feature not working as expected. The problem might be related to your prompt configuration or retrieval settings. Here are some steps you can take to resolve the issue:

  1. Verify Retrieval Settings:

    • Ensure that the retrieval method and parameters (such as the TopK value and recall threshold) are correctly configured. These settings affect the recall of relevant segments from the knowledge base.
  2. Test Retrieval:

    • Use the retrieval testing feature to confirm that the knowledge base is correctly recalling relevant segments for common user questions.
  3. Check Prompt Configuration:

    • Make sure your prompt is designed to encourage the chatbot to cite sources. It should explicitly instruct the chatbot to include citations from the knowledge base.
  4. Enable Citation and Attribution:

    • Go to Workspace -- Add Function -- Citation and Attribution to enable the feature. After enabling, you should see specific citation information below the response content.
  5. Debugging Tools:

    • Review interaction logs to identify where the attribution may have gone wrong and enable citation attribution debugging to view specific citation details.

These steps should help improve the likelihood of the chatbot citing sources from your knowledge base [1].

To continue talking to Dosu, mention @dosu.