Translator agent affecting KB query
# 🤝help
e
Hello everyone! Quick question: I have a knowledge base table which contains links with descriptions. The links are in multiple languages and it is clearly defined in the table. I am giving a query KB card instructions to provide the right link and also passing it the user's written question. It's task is also to provide the link in the correct language, corresponding to the user's language. The question is, when does translator agent start translating, which variables/parts does it have access to? - does it translate the users query to English before I am passing it onto the query KB card? If it does, then the query card can't know what language it is and I'd have to pass the language variable set by the translator agent? Passing it is no problem, but for the future, it would be very helpful if someone could explain in 2-3 sentences, how is the translator agent programmed to work, what does it have access to and when does it start translating so I can be sure it does not interrupt my system. Thank you very much in advance!
s
Hi, I can't answer for Botpress, but in general, everything is performed in English and only translated to the proper language for the user. What I do is I mainly focus on doing everything in English and, in the end, send the proper response to the user. In the case of KB, it uses English, so before it hits the KB, the request will be translated into English (as far as I know). Regarding intention, I also have a problem that in different languages, answering anything, as a simple example "Yes", by the user will work only if he does it in English. Here is a simple test. I tested: 1) TA set to en: answering in English - WORKS 2) TA set to es: answering in English - WORKS 3) TA set to es: answering in Spanish - DOESN'T WORK As you can see, everything must be in English and only translated when sent to the user. https://cdn.discordapp.com/attachments/1247091637352529981/1247117857884602418/WhatsApp_Image_2024-06-03_at_11.15.47_5a192925.jpg?ex=665edc83&is=665d8b03&hm=a63957379321282a8f9a1cc9ead17651e5d601e0e6481c2427110c006d7ce660& https://cdn.discordapp.com/attachments/1247091637352529981/1247117858186461204/WhatsApp_Image_2024-06-03_at_11.17.18_e6e9e9c8.jpg?ex=665edc83&is=665d8b03&hm=8a19d9815160d3a3fdce8353d5765fab93438b5624b42996473c06c5a1b72221& https://cdn.discordapp.com/attachments/1247091637352529981/1247117858597765120/WhatsApp_Image_2024-06-03_at_11.16.39_ed3bc9d3.jpg?ex=665edc83&is=665d8b03&hm=2bcb5b37b1f97befe7a181f6851599febc406992a7a84aa64cb559802cebcde7&
e
Hey, thanks a lot for the reply. I discovered some things. My knowledge agent has links in the knowledge base. Next to each link is defined the link language. I only pass the query card the actual user message (event.preview) and a prompt that tells the bot to give the link in the user language, and it has worked well so far, meaning it has not translated event.preview. My tanslator agent is enabled, maybe botpress has some back system that also gives the query card language info or something along the lines.
Another thing, if it helps you, I made intents work in multiple languages. I took the phrases I had in english and let gpt4 translate them into other many other languages and pasted them into the intent. Im not sure if its supposed to be like that but worked for me 🙂
s
Yes, I know, but it takes additional work, and it should be automatic, in my humble opinion 😉
e
Absolutely. Do you know if there is a way to pass the translator agent language variable to a capture card which has KB answering enabled. Or is it already passed there? It works with manual query KB cards because you can literally give the variable, but with query KB cards corefrence resolution didn't work for me so I have to use capture cards with KB answering enabled for main convo.
s
Hi, I haven't seen an option like that to specify capture card language. I've been told that everything gets translated to EN, but as you can see, intents are not translated, so I don't know how this will work. It's unclear, and there are some inconsistencies in behavior. Some things are translated, and some are not.
3 Views