Skip to content

jivaniyash/Meals-Bot-using-RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meals Bot using RAG

Demo

demo-gif

Usage

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.

Overview

  1. 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.
  2. These csv documents are parsed and convert to text-embeddings using Sentence Transformer library.
  3. These embeddings are stored in the chromadb in the form of documents.
  4. User asks a question about the meal.
  5. Sentence Transformers convert the Natural Language to embeddings and retreives the most relevant document using vector similarity search from the Chromadb.
  6. This retrieved document is passed as a context to the LLM (SLM-gemma-2b-it) model along with the user question to generate answer.
  7. Generated answer is displayed in the front end.

Requirements

  • Python 3.7 or higher
  • virtualenv
  • git
  • git-lfs

Steps to Start the App

1. Clone the Repository

git clone https://github.com/jivaniyash/meals-bot-using-RAG

2. Set up a Virtual Environment

virtualenv venv
source venv/bin/activate

3. Install Git LFS & Download Model

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.

4. Install Python Requirements

pip install -r requirements.txt

5. Run the App

At first run, it will take time to load the files properly.

streamlit run ./main.py

Some of the sample questions to explore -

  1. What items are availble for diabetic patients?
  2. Is vegan meal available?
  3. Hello. I need veg meals. Can you please provide what food items are available?
  4. What ages are limited for child meals?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages