<aside>
On this page:
</aside>
<aside>
🧠 Product Docs
🤖 Prompting Tips
💻 Use Cases
📚 Resources
🍄 About Expanse
</aside>
At Expanse, we are excited to serve people from around the world. We know a lot of our users are multilingual, and we want to give them the best experience. While AI is not yet 100% fluent in all languages, here are some tips and tricks to getting the most out of AI no matter what language you are using. Expanse makes this easy, but you can use the ideas here in any AI system you want!
<aside> 💡
When working with non-English languages in LLMs, linguistic and cultural diversity creates unique challenges. While high-resource languages perform well, there are several prompting strategies that can help overcome limitations for non-English languages:
Trying multiple LLMs will help you find the best model for your language/style. You can easily compare answers in Expanse by using the regenerate feature.
Here are our LLM recommendations for language translation:
Language translation is as much about taste as accuracy; adjusting the temperature setting can help create more relevant translations.
Lower temperature will tend to create more direct translations, while higher temperatures will tend to create more abstract translations with added nuances. Learn more about how to use Temperature in Expanse here.
Translation is not just linguistic but cultural. For languages with significant cultural nuances/hierarchy, you should include context about the speaker-audience relationship. To enhance the specificity of a translation style, provide additional context such as glossaries, dialect specifications, and cultural nuances in the Role or Prompt.
Examples of specific Prompts:
“Translate this text from English to Simplified Chinese, focusing on business terminology."
"Translate this colloquial English phrase to colloquial French: [phrase]. Note that this is an informal expression used among friends."
"Translate this sentence from English to Japanese, where the speaker is addressing their boss."
<aside> 💡
Use the example Translator Roles and Prompts from below as a quick start.
</aside>
https://share.expanse.com/thread/GFJN7K
Translation with LLMs can be costly, especially for non-English languages, due to token-based pricing. To optimize, translate in smaller chunks so that no tokens are wasted if the translation seems to be completely inaccurate.
Therefore it is better to translate in smaller segments to manage context windows, improving accuracy for long texts.
<aside> 💡
Save the prompt to summarize and start new Threads
</aside>
Back Translation is a strategy where you translate a text into the target language, then translate the result back to make sure it makes sense. This is a useful way to test the accuracy of an LLM or Prompt.
<aside> 💡
Here is an example of how Back-Translation can be used to compare the accuracy of translations
</aside>
https://share.expanse.com/thread/3201MI
Below is are some Translator Roles the team at Expanse have crafted. Note that the type of Role will change depending on the text that needs to be translated. For example, texts that are more abstract in nature (eg. poems), require more detailed nuanced prompts as shown below.