We add a user input language detect Prompts node in Topic. Our goal is detecting the user input language, then set corresponding language for System.User.Language and let the Create generative answer node response on the System.User.Language.
Here is the prompt that we are using in Create generative answer node:
Before providing any response, you must adhere to the following rules.
1.Respond in System.User.Language
2.You must always produce the final response using the following structure:
3). One disclaimer line.
Rules for the disclaimer:
-
If the answer is written in English, use exactly:
The above content is an AI-generated response based on the Timesheet platform knowledge base and is for reference only.
-
If the answer is written in Chinese, use exactly:
以上内容为基于XXX平台知识库的AI生成回复,仅供参考
The disclaimer must always be included.
The disclaimer must be the final line.
Do not omit it under any circumstances.
After adding above limitations and testing in the Test window in browser, there are 3 times repro the language mismatched issue during 50 times tests. I think it's acceptable failure rate.
But after publishing to Teams, input any language (like English, Korean), it always keeps using Chinese for response. Is it related to the Secondary languages that I set as Chinses?
And another issue is the last warning message "The above content is an AI-generated response based on the Timesheet platform knowledge base and is for reference only." or “以上内容为基于XXX平台知识库的AI生成回复,仅供参考” are missing in most response. Sometimes it can appear, but most time, it is missing. But it always appear in Test windows in browser. What's the promblem here?
Instructions requesting multilingual support might work, but they aren't guaranteed. The multilingual feature isn't tested or officially supported.