Knowledge Base Language
# 🤝help
l
I am working on a bot for a German city. I use the knowledge base web search to fill in the information. Sometimes the answer is correctly in German, but sometimes it translates in English (same question - sometimes German sometimes English). Is there a way to force a German answer to a question?
b
same problem here!
a
Hey @loud-tiger-92573 are you using the translation agent?
e
I have the same problem @acceptable-kangaroo-64719. I have them choose a hard coded language in the beginning, but when it comes "raw input" and taking information from the knowledge base, then it switches over to ENG. Is there a workaround for this?
a
You can try passing the knowledge answer through an AI task that explicitly asks for it to be translated to that language.
e
I have a single choice in the beginning where they can choose between 5 languages, so how would that work?
a
This tutorial covers how to pass a knowledge base answer to an AI task
you would also pass the user's selected language
and prompt the AI to translate
e
How do i pass the user's language over (when it's in the beginning of a sequence) without having them choose language one more time?
a
pass {{user.TranslatorAgent.language}} into the AI task input
e
It does not work. Is there a way to save the answer from the single choice and pass it on to a later node?
a
yes, make or select a variable from this dropdown menu and then you can use that variable with either
@variableName
or
{{workflow.variableName}}
throughout the flow

https://cdn.discordapp.com/attachments/1125411267155345440/1139145335692865598/image.png

5 Views