The questions generated by Follow-up are sometimes in Chinese , sometimes in English and sometimes a mixture of Chinese and English #6555

Closed
opened 2026-02-21 18:16:17 -05:00 by yindo · 3 comments
Owner

Originally created by @wangyingle666 on GitHub (Nov 5, 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 report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Provide a description of requested docs changes

first. add Stduio -> Create from Blank -> add Chatbot
second. Features Enabled -> add Manager -> turn on Follow-up
image
Then. Talk to Bot "如何学习英文"
last. you can see it
image

please tell me how to solve the promble

Originally created by @wangyingle666 on GitHub (Nov 5, 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 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. ### Provide a description of requested docs changes first. add Stduio -> Create from Blank -> add Chatbot second. Features Enabled -> add Manager -> turn on Follow-up ![image](https://github.com/user-attachments/assets/1f723649-1905-4a9c-9689-bf9d4665df24) Then. Talk to Bot "如何学习英文" last. you can see it ![image](https://github.com/user-attachments/assets/89e6b8fb-b588-419f-837d-1b79e5077f3a) please tell me how to solve the promble
yindo added the 🐞 bug label 2026-02-21 18:16:17 -05:00
yindo closed this issue 2026-02-21 18:16:17 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 5, 2024):

To address the issue of Follow-up generating questions in a mixture of Chinese and English, you can ensure that the output language matches the language of the Assistant's latest response. This can be achieved by using the SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT:

SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT = (
    "Please help me predict the three most likely questions that human would ask, "
    "and keeping each question under 20 characters.\n"
    "MAKE SURE your output is the SAME language as the Assistant's latest response"
    "The output must be an array in JSON format following the specified schema:\n"
    '["question1","question2","question3"]\n'
)

This prompt ensures that the follow-up questions are generated in the same language as the Assistant's latest response, thereby preventing a mixture of languages in the output [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 5, 2024): <!-- Answer --> To address the issue of Follow-up generating questions in a mixture of Chinese and English, you can ensure that the output language matches the language of the Assistant's latest response. This can be achieved by using the `SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT`: ```python SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT = ( "Please help me predict the three most likely questions that human would ask, " "and keeping each question under 20 characters.\n" "MAKE SURE your output is the SAME language as the Assistant's latest response" "The output must be an array in JSON format following the specified schema:\n" '["question1","question2","question3"]\n' ) ``` This prompt ensures that the follow-up questions are generated in the same language as the Assistant's latest response, thereby preventing a mixture of languages in the output <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/llm_generator/prompts.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@wangyingle666 commented on GitHub (Nov 5, 2024):

To address the issue of Follow-up generating questions in a mixture of Chinese and English, you can ensure that the output language matches the language of the Assistant's latest response. This can be achieved by using the SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT:

SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT = (
    "Please help me predict the three most likely questions that human would ask, "
    "and keeping each question under 20 characters.\n"
    "MAKE SURE your output is the SAME language as the Assistant's latest response"
    "The output must be an array in JSON format following the specified schema:\n"
    '["question1","question2","question3"]\n'
)

This prompt ensures that the follow-up questions are generated in the same language as the Assistant's latest response, thereby preventing a mixture of languages in the output [1].

To continue talking to Dosu, mention @dosu.

What I mean is that by turning on "follow-up", the questions generated by association will sometimes be in English.

@wangyingle666 commented on GitHub (Nov 5, 2024): > To address the issue of Follow-up generating questions in a mixture of Chinese and English, you can ensure that the output language matches the language of the Assistant's latest response. This can be achieved by using the `SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT`: > > ```python > SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT = ( > "Please help me predict the three most likely questions that human would ask, " > "and keeping each question under 20 characters.\n" > "MAKE SURE your output is the SAME language as the Assistant's latest response" > "The output must be an array in JSON format following the specified schema:\n" > '["question1","question2","question3"]\n' > ) > ``` > > This prompt ensures that the follow-up questions are generated in the same language as the Assistant's latest response, thereby preventing a mixture of languages in the output [[1]](https://github.com/langgenius/dify/blob/main/api/core/llm_generator/prompts.py). > > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._ What I mean is that by turning on "follow-up", the questions generated by association will sometimes be in English.
Author
Owner

@crazywoola commented on GitHub (Nov 5, 2024):

Duplicated

@crazywoola commented on GitHub (Nov 5, 2024): Duplicated
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6555