/NLDBQuery

LLM Project to interact with database using plain english

Primary LanguageJupyter Notebook

NLDBQuery

Welcome to the Gemini Pro Large Language Model (LLM) NLP project! This project aims to facilitate interaction with a database using plain English queries through Google's free Gemini Pro LLM. Various frameworks such as Lang Chain and Hugging Face were employed to enhance model accuracy using few-shot learning techniques. Additionally, vector databases(ChromaDB) were utilized in the process to further refine the results.

Image description

Installation

To get started with the project, follow these steps:

  1. Clone the repository:
git clone https://github.com/OmSDeshmukh/NLDBQuery
  1. Navigate to directory:
cd NLDBQuery
  1. Create a virtual environment:
python3 -m venv .venv
  1. Activate the virtual environment:
# On Windows
venv\Scripts\activate

# On macOS/Linux
source venv/bin/activate
  1. Download Dependencies:
pip install -r requirements.txt
  1. Create database:
# Login
mysql -u username -p password

# Create Database
CREATE DATABASE atliq_tshirts < db_creation_atliq_t_shirts.sql;
  1. Configure .env files accordingly with the required API keys and password of the database

Usage

To run inference and interact with the database, follow these instructions:

Ensure you're in the project directory and the virtual environment is activated.

Run the following script:

streamlit run main.py

Aknowledgement

Special thanks to Codebasics whose YouTube video provided valuable insights and guidance in creating this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Feel free to customize it further according to your project's specific details and requirements.