Node re-run and iteration judgment termination #5647

Closed
opened 2026-02-21 18:12:01 -05:00 by yindo · 5 comments
Owner

Originally created by @suwubee on GitHub (Sep 16, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

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

LLM always generates the content we specify at one time, but in the long process, there may be a problem in a certain step in the middle, or we need to readjust the prompt word or regenerate it according to the middle part. The iteration function is indeed good for long processes, but it lacks the output after judging the conditions.
I found a similar function in coze, which can insert questions and answers in the loop to interact with the user and terminate the loop separately. But there is a problem here. If new auxiliary prompt words can be added when looping again, that is, the user gives new suggestions from the question and answer, so that LLM can regenerate.
image

2. Additional context or comments

I saw this mentioned as early as a year ago, but no one seems to be paying attention to this feature.

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @suwubee on GitHub (Sep 16, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. LLM always generates the content we specify at one time, but in the long process, there may be a problem in a certain step in the middle, or we need to readjust the prompt word or regenerate it according to the middle part. The iteration function is indeed good for long processes, but it lacks the output after judging the conditions. I found a similar function in coze, which can insert questions and answers in the loop to interact with the user and terminate the loop separately. But there is a problem here. If new auxiliary prompt words can be added when looping again, that is, the user gives new suggestions from the question and answer, so that LLM can regenerate. ![image](https://github.com/user-attachments/assets/4064f8e4-0003-4b1c-8f4b-b63bec675f1d) ### 2. Additional context or comments I saw this mentioned as early as a year ago, but no one seems to be paying attention to this feature. ### 3. Can you help us with this feature? - [X] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 18:12:01 -05:00
yindo closed this issue 2026-02-21 18:12:01 -05:00
Author
Owner

@laipz8200 commented on GitHub (Sep 17, 2024):

I've outlined your request as follows:

  1. A node similar to the Answer Node that offers the user multiple choices.
  2. A break function in the Iteration Node.

Please let me know if this aligns with your needs!

@laipz8200 commented on GitHub (Sep 17, 2024): I've outlined your request as follows: 1. A node similar to the Answer Node that offers the user multiple choices. 2. A `break` function in the Iteration Node. Please let me know if this aligns with your needs!
Author
Owner

@suwubee commented on GitHub (Sep 18, 2024):

I've outlined your request as follows:

  1. A node similar to the Answer Node that offers the user multiple choices.
  2. A break function in the Iteration Node.

Please let me know if this aligns with your needs!

1, yes
2, not only break, with matching conditions require restarting the node.

What I hope to achieve is that at each key node, the user can decide whether to continue or whether to re-run the node. This will generate higher quality and more in line with the logic of interaction, instead of generating everything according to the established process like now, with no room for adjustment.

I create with coze workflow, but unfortunately, when the loop is restarted, the subsequent conversation records are not introduced, but only the variables are introduced.
image

@suwubee commented on GitHub (Sep 18, 2024): > I've outlined your request as follows: > > 1. A node similar to the Answer Node that offers the user multiple choices. > 2. A `break` function in the Iteration Node. > > Please let me know if this aligns with your needs! 1, yes 2, not only break, with matching conditions require restarting the node. What I hope to achieve is that at each key node, the user can decide whether to continue or whether to re-run the node. This will generate higher quality and more in line with the logic of interaction, instead of generating everything according to the established process like now, with no room for adjustment. I create with coze workflow, but unfortunately, when the loop is restarted, the subsequent conversation records are not introduced, but only the variables are introduced. ![image](https://github.com/user-attachments/assets/8728d454-85d2-4dd9-ae16-2f046081bf45)
Author
Owner

@suwubee commented on GitHub (Sep 30, 2024):

@laipz8200 flowith create a new Oracle model, that is what I need.

@suwubee commented on GitHub (Sep 30, 2024): @laipz8200 flowith create a new Oracle model, that is what I need.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 31, 2024):

Hi, @suwubee! I'm helping the Dify team manage their backlog and am marking this issue as stale.

Your request for an enhancement to the iteration function in LLM processes highlights the need for users to insert new prompts and regenerate outputs based on feedback. You and user laipz8200 discussed a potential solution involving a new node for user choices and a break function, with you emphasizing the importance of flexibility in the workflow to enhance interaction quality.

Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep the discussion active. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you!

@dosubot[bot] commented on GitHub (Oct 31, 2024): Hi, @suwubee! I'm helping the Dify team manage their backlog and am marking this issue as stale. Your request for an enhancement to the iteration function in LLM processes highlights the need for users to insert new prompts and regenerate outputs based on feedback. You and user laipz8200 discussed a potential solution involving a new node for user choices and a `break` function, with you emphasizing the importance of flexibility in the workflow to enhance interaction quality. Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep the discussion active. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you!
Author
Owner

@laipz8200 commented on GitHub (Nov 7, 2024):

We added the error handle function in the Iteration node on 0.11.0, welcome to try and feedback.

@laipz8200 commented on GitHub (Nov 7, 2024): We added the error handle function in the Iteration node on 0.11.0, welcome to try and feedback.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5647