Identify Language
What is it?
- NeuralSeek provides a service that would analyze and identify the language of a given text.
Why is it important?
- Any application that would need to understand which language a given text is can now use NeuralSeek to do it, rather than relying on other external services.
How does it work?
- Language identification is provided as REST API, and can be tested on NeuralSeek API documentation. Message payload is in
text/plain
format, and containstext
in certain languages. An example message would look something like this:
- NeuralSeek would then identify what language this is in, and returns the language code and the confidence score:
Specifying a Language
If you would like to specify a certain target language that you want NeuralSeek to generate answers into, you can do so by specifying a language code (e.g. es) in the request when you are invoking Seek
.
The same can be achieved when you are invoking Seek
using REST API. You can specify the language under the options > language
.
Cross-language support for KBs
NeuralSeek offers robust multi-language support, allowing users to interact with a knowledge base (KB) in a different language than the one the KB is written in. This is particularly useful in scenarios where the knowledge base is in one language (e.g., English), but users need to query it in another language (e.g., Spanish).
How It Works
When a user queries the knowledge base in a different language, NeuralSeek handles the translation process seamlessly:
- User Query in Native Language: The user asks a question in their native language (e.g., Spanish).
- Translation to KB Language: NeuralSeek translates the user's question into the language of the knowledge base (e.g., English).
- Querying the KB: The translated question is used to search the knowledge base.
- Retrieving the Answer: NeuralSeek retrieves the answer from the LLM in their native language.
- Delivering the Response: The user receives the response in their native language.
Example Scenario
Question in Spanish, KB in English
- User Query: "¿Cuál es la capital de Francia?"
- Translate to English: "What is the capital of France?"
- Query the English KB: The system searches for "What is the capital of France?" in the English knowledge base.
- Retrieve Answer from the LLM in Spanish: "La capital de Francia es París."
- Deliver Response: "La capital de Francia es París."
To configure NeuralSeek for multi-language support, follow these steps:
Step 1: Configure the Knowledge Base Language
- Navigate to the Configure Tab: Access the configuration settings of NeuralSeek.
- Select the Language of Your Knowledge Base: Choose the language your knowledge base is written in (English, in this case).
- Save the Configuration: Ensure that your settings are saved properly to apply the changes.
Step 2: Testing Multi-Language Queries
- Go to the Seek Tab: Access the query interface of NeuralSeek.
- Enter a Question in Spanish: Test the configuration by entering a question in Spanish, such as "¿Cuál es la capital de Francia?"
- Observe the Response: NeuralSeek should translate the question, query the English knowledge base, and return the response in the desired language: "La capital de Francia es París."