Replies: 2 comments
-
did you find a solution for this? |
Beta Was this translation helpful? Give feedback.
-
In general, Another approach would be to ditch formal grammars altogether and set-up some kind of classifier-in-the-loop to detect the target language -- similar work has been done to prevent LMs from producing "harmful" outputs. But this is difficult to do efficiently, and I am not currently aware of any libraries that have a solution here yet. TLDR: not feasible with existing tooling, but I'm hopeful that some better solutions to this problem may develop in the future |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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