knowledge bases
# 🤝help
s
I have created a chatbot for land administration, I would like to know the language is used to train the bot uploaded in the KBS on cloud studio editor #1111009377525186570
c
HI there, I am not entirely sure if this answers your question but here we go: - the language of your KB depends on whatever you put in. The LLM is capable of translating different languages at the same time (although not advised). - by default Botpress uses the english language but you can set it to any other lannguage using the 'translator agent' . Even if your KB are english the translator agent would still respond in whatever language you set it to .
g
Hi. Thanks for the response. @cold-jewelry-54343 I am having a challenge. I set the bot to automatically detect the users language then respond in starting the conversation. In my assumption I feel that this should control all the outputs of the chat henceforth. But the challenge is the knowledge base doesn't translate to the detected language. It always outputs in english. For instance. My bot starts out with requesting the user to type in their chosen language for detection. This input is stored in a user.lang variable. The AI task checks input in user.lang the conversation history, and passes the detected language to the language's ISO stored in a variable called userlangISO Then using and execute code card, we pass the detected ISO in userlangISO to the translator which then changes its response language based on language detected, and responds on that detected language. This flow Is correct for the bot response. But it doesn't work for the output of the knowledge base. I know I have something wrong somewhere and I was hoping If there Is a known way to fix this.?
c
g
hi. i am just seeing this. I thought the agent can only detect language by ISO. or does it mean that if the user types english the agent will match the ISO automatically. Please pardon the question if it sounds too basic
c
I actually thought the same but it turns out it recognizes semantic keywords like "Italian" or "french" 🙂 try it out and let us know !
g
Oh. Great. Im hopping on it. I'll give feedback ASAP
while we're on this i have a question. does botpress support uploading a json file as a knowledge base. the reason i am asking is because i am building an app that requires retrieving bible text at random. this was why i downloaded the bible in json format. can you assist in how i may get this done.? thanks @cold-jewelry-54343
c
Yes you can put it inside a plain text and upload it directly in the Knowledbe Base. Alternatively you can parse the JSON into a CSV and import that as a table but this does require some tooling/3th party (or code it yourself with GPT)
g
But if I copy it as text into a knowledge base. How will I code it to know when to pick one verse at a time.
Can you also recommend any third party tool ?
c
you can use the QueryKnowledgeBase node to search for the verse. This can be a symantic search like " Im looking for Book 2: verse 5". Additionally you can use an AI Task Card to construct a better search query e.g.: - if a customer asks "Hey im looking for verse 2 from John chapter 2 " , then the AI node can analyze this message and output : "John Chapter 2, verse 2".
g
thanks buddy
c
no problem Richard. I actually received a bible today 🙏
g
Great!
3 Views