You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on a project involving LLMs and have a specific requirement regarding the output language. I am looking to restrict the LLM's output to a specific language, preferably English, even if the input prompt is in a different language.
For instance, my prompt is:
Frage: Roger hat 5 Tennisbälle. Er kauft noch 2 Dosen Tennisbälle. In jeder Dose sind 3 Tennisbälle. Wie viele Tennisbälle hat er jetzt?
Let's think step by step.
Here, I asked a math reasoning question in German, and I provided an English Chain of Thought (CoT) prompting, expecting the LLM to respond in English. However, in practice, I have noticed that the language of the response can be random.
My questions are as follows:
Does Guidance currently support restricting the LLM's output language? If so, any example code?
If this feature is not supported at the moment, are there any plans to include it in the future?
If Guidance does not support this feature, are there any other library that implement this functionality?
Any suggestions would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently working on a project involving LLMs and have a specific requirement regarding the output language. I am looking to restrict the LLM's output to a specific language, preferably English, even if the input prompt is in a different language.
For instance, my prompt is:
Here, I asked a math reasoning question in German, and I provided an English Chain of Thought (CoT) prompting, expecting the LLM to respond in English. However, in practice, I have noticed that the language of the response can be random.
My questions are as follows:
Any suggestions would be greatly appreciated.
Best wishes to Guidance team.
Beta Was this translation helpful? Give feedback.
All reactions