Question Classifcation function in workflow maybe abnormal #8430
Replies: 3 comments 4 replies
-
In addition, I replaced the Question Classifcation module with a general large model + prompt, and it operates quite smoothly with a high accuracy rate. 👍 Another idea I have is to collect bad cases using a knowledge base approach to create a mapping from questions to classifications. Therefore, this issue is not too urgent. |
Beta Was this translation helpful? Give feedback.
-
Perhaps it's time to enhance this classifier, as it currently seems very poorly functioning to me, with most of the time allocating randomly. |
Beta Was this translation helpful? Give feedback.
-
Ultimately, I did not continue using this feature because the accuracy of intent recognition in real business scenarios is likely to be higher than what a prompt engineering solution can achieve. It is recommended to fine-tune Tiny-BERT for multi-class classification, and the training examples can be entirely generated by a large model based on classification keywords. Additionally, in the actual workflow, the HTTP service may be called multiple times, so it is advisable to build the model service using Flask + Gunicorn. |
Beta Was this translation helpful? Give feedback.
-
Self Checks
Dify version
v0.7.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Hello experts, I conducted a comparison test in version v0.7.3.
On the left is the regular model invocation, and on the right is the issue classification within the workflow.
The green box represents the same prompt, the yellow box is the test question and the response, and the red box on the right indicates potential issues.
In this code(https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/question_classifier/template_prompts.py), it seems that some prompt words were not cleaned up and removed, which might be the reason for the inaccurate classification. Please check this issue.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
Beta Was this translation helpful? Give feedback.
All reactions