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.84k stars 7.52k forks source link

Suggestion to Add Custom Multi-turn Dialogues for Few-shot Learning in Chatbot and Agent Apps #8707

Closed neotize closed 1 week ago

neotize commented 1 month ago

Self Checks

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I suggest adding a feature similar to the 'Add Message' option in the LLM node of workflows to Chatbot and Agent type apps (customizable multi-turn USER and ASSISTANT dialogues) to achieve a few-shot effect. QQ截图20240924105629

2. Additional context or comments

No response

3. Can you help us with this feature?

crazywoola commented 1 month ago

Can you tell us why you need this separate component, too fine-grained components will lead to increased maintenance costs, so are there any special use cases

neotize commented 1 month ago

Can you tell us why you need this separate component, too fine-grained components will lead to increased maintenance costs, so are there any special use cases

In our company's practice, we found that most models can be effectively guided in terms of speaking style through a few simple USER and ASSISTANT dialogue examples. By using the 'Add Message' feature in the LLM node of Dify workflows, we achieved great results. However, this feature is not supported in Chatbot or Agent type apps. Therefore, we hope that the Agent node can support the 'Add Message' feature, or as mentioned in another issue (https://github.com/langgenius/dify/issues/7470), support the Agent node in workflows to achieve the desired effect.