Inspiration
There are many geographical regions in the world, where more than one language is generally spoken. India is one such multilingual country, where a number of languages are spoken, and a mere 10% are English literate. Here, a single common language is adopted in the community for proper communication. But this can cause one language to be dominant over others, and can be a disadvantage to the speakers of other languages. This can also result in the disappearance of a language, its distinctive culture and a way of thinking. For national / international companies here, having their business / marketing content in multiple languages is an expensive option, hence majority of them stick to one language of commerce – English, which could also mean losing opportunity to better connect with local audiences and thus losing potential customers. While there is nothing wrong with using English, those who are not conversant in that language are left out of the mainstream commerce.
What it does
Our idea is to bridge this gap. People should be allowed to express themselves, ask their queries in their own language. We propose a solution that Let people ask queries in local language, use LLMs to understand and get information in English and translate this back into local language. We harness the power of Large Language Models for two uses – one to translate from local language to English and vice-versa, find most similar query in our database, if not then to answer his query via base LLM. This solution intends to let people query and get their queries answered in their own local language. This will only be applicable to those languages that are supported by the underlying LLM. This will not only help businesses especially banks reach out wider population but to get benefits of banking reach the common man and help him improve his financial prospects.
How we built it
We have used:
- Gradio is used to build the front-end of the app. Gradio
- Databricks was used for Coding. All the framework is designed in Databricks Databricks
- We have used LLAMA-2 70b chat as the chosen Large Language Model. MosaicML inferencing was used to get the chat completion output from the prompt. MosaicML
- Embeddings were done using Instructor-xl model HuggingFace Embedding
- The Embeddings were stored in the ChromaDb vector database. Chromadb
- Langchain and MLflow were used for the framework and pipeline of the app. Langchain and MLflow
Challenges we ran into
- Setting up the resource for Databricks notebooks
- Loading Higher Memory Models into the Databricks environment
- Fine-Tuning of high memory models
Accomplishments that we're proud of
- Implementing RAG for a local language
- Use of a Very High Memory LLM
- Be able to work with MLflow and MosaicML- Which are very new concepts
- Make a custom data in a local language
What we learned
Prompt Engineering must be done to get good and relevant solutions fine-tuning such models requires significant computational resources, including memory and processing power. This can be a limiting factor, especially when the cost of fine-tuning outweighs the benefits for a particular use case. In such instances, employing vector embeddings that leverage LLMs can be a more efficient and effective alternative. Additionally, when retrieval-based models (RAGs) provide incorrect answers, it is possible to cross-check the context of the response, allowing for easier identification and correction of errors. In contrast, fine-tuned LLMs can be more challenging to interpret and correct, making prompt engineering a crucial step in harnessing their power for natural language processing tasks.
What's next for सखा- भाषा अब कोई बाधा नहीं है
- Currently for demo purpose, we have built the solution for hindi language. The Same to be Scaled for different regional languages.
- Fine-Tuning Llama 70b chat model with the hindi custom data
- Fine-Tuning the model with other local native languages
- Scaling the solution for different organizations
Built With
- databricks
- gradio
- llama2-70b-chat
- mlflow
- mosaicml
- rag
Log in or sign up for Devpost to join the conversation.