Optimize ReAct Generation: Remove Implicit "continue" and Directly Append "Thought:" #7132

Closed
opened 2026-02-21 18:19:04 -05:00 by yindo · 1 comment
Owner

Originally created by @cc4414 on GitHub (Dec 10, 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.

Current Behavior

<|im_start|>system
xxx
<|im_end|>
<|im_start|>user
xxx
<|im_end|>
<|im_start|>assistant
Thought: xxx
Action: xxx
Observation: xxx
<|im_end|>
<|im_start|>user
continue
<|im_end|>
<|im_start|>assistant

Proposed Change

<|im_start|>system
xxx
<|im_end|>
<|im_start|>user
xxx
<|im_end|>
<|im_start|>assistant
Thought: xxx
Action: xxx
Observation: xxx
Thought:

When the model is small and the conversation is long, the current behavior response may not know what the user's continue means.
Instead of inserting "continue," directly append "Thought:" to the output after "Observation" and continue the generation seamlessly.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @cc4414 on GitHub (Dec 10, 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. **Current Behavior** ``` <|im_start|>system xxx <|im_end|> <|im_start|>user xxx <|im_end|> <|im_start|>assistant Thought: xxx Action: xxx Observation: xxx <|im_end|> <|im_start|>user continue <|im_end|> <|im_start|>assistant ``` **Proposed Change** ``` <|im_start|>system xxx <|im_end|> <|im_start|>user xxx <|im_end|> <|im_start|>assistant Thought: xxx Action: xxx Observation: xxx Thought: ``` When the model is small and the conversation is long, the current behavior response may not know what the user's continue means. Instead of inserting "continue," directly append "Thought:" to the output after "Observation" and continue the generation seamlessly. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 18:19:04 -05:00
yindo closed this issue 2026-02-21 18:19:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 10, 2025):

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

Issue Summary

  • Proposal to optimize ReAct generation by removing the implicit "continue" command.
  • Suggestion to append "Thought:" directly after "Observation" in responses.
  • Aimed at improving performance in long conversations and with smaller models.
  • No further comments or activities have been made on this issue.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 10, 2025): Hi, @cc4414. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary** - Proposal to optimize ReAct generation by removing the implicit "continue" command. - Suggestion to append "Thought:" directly after "Observation" in responses. - Aimed at improving performance in long conversations and with smaller models. - No further comments or activities have been made on this issue. **Next Steps** - Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here. - If there is no further activity, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7132