Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add output language #315

Open
ItzCrazyKns opened this issue Aug 15, 2024 · 12 comments
Open

Add output language #315

ItzCrazyKns opened this issue Aug 15, 2024 · 12 comments

Comments

@ItzCrazyKns
Copy link
Owner

          @ItzCrazyKns I think this request is a bit different from #72. That issue is about system prompts for various tasks, but the preferred output language is a separate thing. Adding a setting for this would be super user-friendly and helpful, as we could support many common languages directly.

Thanks for considering it!

Originally posted by @PeterDaveHello in #296 (comment)

@ItzCrazyKns
Copy link
Owner Author

The issue is, some models (actually most of the models) don't support all languages now if we add output language preference people would open more issues that it is not replying etc..

@ItzCrazyKns ItzCrazyKns self-assigned this Aug 15, 2024
@MeinDeutschkurs
Copy link

MeinDeutschkurs commented Aug 15, 2024

Call it "preferred output language (the model must support it):", followed by an empty text box, where users can input whatever. And if a user defined value is set (for instance 'German'), it could lead to a prompt-addition at the final output prompt like '\n\nPlease write your text in German.'. An empty value could simply lead to not adding the addition.

@PeterDaveHello
Copy link

While supporting every single language might not be feasible, providing support for the most commonly used languages would still substantially improve the current situation where only English is supported. Even if we can't cover all languages, enabling users to interact in a few major languages would significantly enhance the user experience.

@Zirgite
Copy link

Zirgite commented Aug 19, 2024

Meanwhile, just add in the prompt the output language and the model should respond if the model is able to. I mean not in the system prompt but just when asking perplexica.
Some people would ask to custom prompt something else without touching the code. So it can be implemented as in lm studio as empty window in the settings where you can add custom additional prompts the language being one of them.

@MeinDeutschkurs
Copy link

Meanwhile, just add in the prompt the output language and the model should respond if the model is able to. I mean not in the system prompt but just when asking perplexica.

Some people would ask to custom prompt something else without touching the code. So it can be implemented as in lm studio as empty window in the settings where you can add custom additional prompts the language being one of them.

No, you can't. The research is influenced by the written and requested language. Finally the search results are dependent on a special language. That's a sensitive thing. And yes, you could edit the system prompt for the final output manually, but this is hacky and has to be re-done after each update.

@ItzCrazyKns
Copy link
Owner Author

I need to take a little bit of time to benchmark the results. The language can affect the quality of the actual output and the search results.

@MeinDeutschkurs
Copy link

I need to take a little bit of time to benchmark the results. The language can affect the quality of the actual output and the search results.

And that's why it is important to affect the final output only.

Alternatively maybe some kind of translation process after the final output could be more practicable in case of perplexica. This would add an optional further step at the final end.

Prompting is really sophisticated. The simultaneous step could break the rest. Maybe the additional step "Translate the following markdown to German: ‘’’{final_reply}’’’" could be better, if activated.

@PeterDaveHello
Copy link

Perhaps providing users with two separate options—one for the search language and another for the output language—could be quite helpful. This might allow for more precise search results and flexible output, enhancing the overall user experience while also reducing the need for manual translation.

@RazeBerry
Copy link

I think the biggest problem would not be the SearxNG part nor the Claude 3.5 Sonnet part but the small embedding model which is specialized for English language and probably collapses under other smaller languages such as Albanian. Maybe a long term goal of this project is to either locally run more powerful embedding models or have online embedding API as a part of the pipeline.

@MeinDeutschkurs
Copy link

MeinDeutschkurs commented Aug 20, 2024

Perhaps providing users with two separate options—one for the search language and another for the output language—could be quite helpful. This might allow for more precise search results and flexible output, enhancing the overall user experience while also reducing the need for manual translation.

Indeed. But I think this is more complex:

  • input (situation) language
  • research content/document language(s)
  • language to save/cache info
  • output/display (summary) language

It seems to be unnecessary if you think in classical (google) search terms, but imagine to ask something like "Georgian, Armenian, English and German. Find documents/discussions/news articles about unemployment for each language between 1990 and 2000, 2000 and 2010, as well as 2010 and 2020. Output a table, describing the main discourses/discussions as well as a description of the major tonus/mindset by time span and language. And please describe the differences between all of this afterwards."

I hope that my example was easy to follow. I'd felt more comfortable to write this in German.

@papiche
Copy link

papiche commented Sep 10, 2024

I succeed to make open-webui always answer in french by adding in command prompt.
"Tu es un assistant qui maîtrise de nombreuses langues, mais tu effectueras ta réponse finale toujours en français"

may be this could be a dynamic adapted to web "browser language" or App language parameter ?

@MeinDeutschkurs
Copy link

I succeed to make open-webui always answer in french by adding in command prompt.

"Tu es un assistant qui maîtrise de nombreuses langues, mais tu effectueras ta réponse finale toujours en français"

may be this could be a dynamic adapted to web "browser language" or App language parameter ?

I believe that this is more complex, to get proper results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants