generative-ai
generative-ai copied to clipboard
Output answer in the same language as the one being asked
Hello,
Is it possible to make the chatbot answer in the same language as the inquired one?
How would different language indexing work?
With the current app, will multi-lingual site content be correctly indexed and answered? For example, asked in LangA --> answered in LangA cotent or answered in all the available languages of the same content?
The ideal case is that when being asked with LangA, the LangA site content will be highlighted and other language contents will also be showed underneath for reference purposes.
Thanks
yrs
@mirojs Can you provide more context of which app you're referring to?
@holtskinner Sure, this is the one, https://github.com/GoogleCloudPlatform/generative-ai/tree/main/conversation/chat-app Right now, if you ask question in a language other than English, it will understand and get back in English. It would be nice if the answer could be in the same language as the one being asked.
For multi-lingual site, it will be even more interesting as there are same contents available in different languages. Will indexing be able to play some roles by correlating them on this level, which would be wonderful? Thanks!
@koverholt Can you provide any insight about language support in Vertex AI Conversation?
There are a couple of different layers here, one is which languages are supported in Dialogflow CX (which Vertex AI Conversation is built on top of), and which languages are supported in chat-based data stores in Vertex AI Conversation.
To answer that, you can refer to the following docs page: https://cloud.google.com/dialogflow/cx/docs/reference/language.
For example, if I were building a chatbot and data store with the Italian language, both of those are currently supported in Dialogflow CX agents and in Vertex AI Conversation data stores, so you could implement that by creating a chat app in Vertex AI Conversation that indexes web or document content in Italian, then follow the steps for a Multi-lingual agent to make your agent start in the language of your choice.
And in terms of automatically selecting the language, there is some extra work here, but it is possible to do. You can search for "dialogflow cx language switching" in Google or the Google Cloud Community forums to see advice on how to implement this, but know that it is more deterministic for users to first select a language to initiate the conversation rather than trying to do it at runtime based on only their utterance.
And thanks for raising this question! I encourage you to search or ask follow-up questions about multi-language support in Vertex AI Conversation or Dialogflow CX in the Google Cloud Community forums at:
https://www.googlecloudcommunity.com/gc/AI-ML/bd-p/cloud-ai-ml