Language Detection
Language detection is a necessary first step for businesses that deal with multilingual user bases. Whether you are working with a single multi-lingual model or a multi-model environment, understanding the language of a request (e.g. query, input) is paramount to a good user experience.
Detect Language API identifies the language used in each of the provided texts. For each input, the API will come back with the following:
language_name- the full name of the language the input is in.language_code- the ISO code of the language. For example, the language code for English isen.
Use Cases
Section titled “Use Cases”Single Model Environment
Section titled “Single Model Environment”Use a single multilingual model to handle both English and non-English queries. Identify the language of an incoming query and filter your results by matching languages for monolingual retrieval with a multilingual model - in addition, you can specify which languages you want to filter for in a cross-lingual retrieval setup.
Multi Model Environment
Section titled “Multi Model Environment”Use multiple models for English and non-English embeddings. Identify a query in its respective language and route the request to different models depending on your setup. For example, if a query is in identified as English, route it to our default English embed model, if not, route it to our multilingual embed model.