This repository provides a chat bot assistant using the gemma-2b model powered by Streamlit. Follow the instructions below to set up and run the application.
- meals.csv file contains 11 sample records for different types of meals offered by one of the Airline - Air Astana. Records are retrieved from special-meals and structured into csv format.
- These csv documents are parsed and convert to text-embeddings using
Sentence Transformer
library. - These embeddings are stored in the chromadb in the form of documents.
- User asks a question about the meal.
- Sentence Transformers convert the Natural Language to embeddings and retreives the most relevant document using vector similarity search from the Chromadb.
- This retrieved document is passed as a
context
to the LLM (SLM-gemma-2b-it
) model along with the user question to generate answer. - Generated answer is displayed in the front end.
- Python 3.7 or higher
- virtualenv
- git
- git-lfs
git clone https://github.com/jivaniyash/meals-bot-using-RAG
virtualenv venv
source venv/bin/activate
sudo apt-get install git-lfs
git clone https://huggingface.co/google/gemma-2b-it
It will ask for authorization if you haven't provided your consent in the Huggingface. Also, It will ask for user_name & password as huggingface token
. Please ensure credentials are correct to download the model files locally.
pip install -r requirements.txt
At first run, it will take time to load the files properly.
streamlit run ./main.py
Some of the sample questions to explore -
- What items are availble for diabetic patients?
- Is vegan meal available?
- Hello. I need veg meals. Can you please provide what food items are available?
- What ages are limited for child meals?