MySQL-RAG is an advanced SQL chatbot application that combines the power of Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs) to enable natural language interaction with MySQL databases. Built with a Python Flask backend and utilizing the meta-llama/Llama-4-Scout-17B-16E-Instruct model, this chatbot allows users to analyze, visualize, and manage database records using conversational queriesβeliminating the need to write SQL manually.
π€ LLM-Powered Chatbot:
meta-llama/Llama-4-Scout-17B-16E-Instruct
model for advanced SQL reasoning.π Flask Backend:
π RAG Architecture:
π οΈ Database Operations:
SELECT
, UPDATE
, DELETE
, and other SQL operations through chat.π Easy Deployment:
vercel.json
for config).git clone https://github.com/YUGESHKARAN/MySQL-RAG.git cd MySQL-RAG
It is recommended to use a Python virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
app.py
.python app.py
The Flask application should now be running (default: http://127.0.0.1:5000/
). You can interact with the chatbot via the provided API endpoints or connect with your frontend.
To run test scripts:
python test.py
π£οΈ Natural Language Query:
π₯ Chatbot Output:
βοΈ Database Modification:
I have deployed the application on Render, and the MySQL database is hosted on AWS RDS.
Contributions are welcome! Submit issues or pull requests for improvements or bug fixes.
For questions or support, contact Yugeshkaran.