Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 QueryMind

AI-Powered Natural Language to SQL Engine

Python Streamlit SQLite Groq License


📌 Overview

QueryMind is an AI-powered Text-to-SQL engine that enables users to query databases using natural language.

Instead of writing SQL manually, simply ask questions in English such as:

Which customers generated the highest revenue?

QueryMind converts the request into optimized SQL using Groq LLM, validates the generated query, automatically fixes SQL errors using a self-healing pipeline, executes it on SQLite, and visualizes the results with interactive Plotly charts.


✨ Features

  • 🧠 Natural Language → SQL Conversion
  • ⚡ Powered by Groq LLM
  • 🔄 Self-Healing SQL Correction
  • 📊 Automatic Chart Generation
  • 📁 Upload Your Own CSV Files
  • 🗃️ SQLite Database Support
  • 📈 Interactive Plotly Dashboards
  • 🌐 Streamlit Web Interface
  • ⚡ Fast Query Execution

🏗 System Architecture


┌────────────────────┐
│ Natural Language   │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Groq LLM │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ SQL Generation │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ SQL Validation │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Self-Healing Loop │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ SQLite Database │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Plotly Charts │
└────────────────────┘


📂 Project Structure

QueryMind
│
├── app.py
│
├── src
│   ├── sql_engine.py
│   ├── db_loader.py
│
├── data
│   └── ecommerce.db
│
├── assets
│   ├── screenshots
│   ├── architecture.png
│   └── workflow.gif
│
├── requirements.txt
│
└── README.md

⚙ Installation

Clone Repository

git clone https://github.com/PRATHAM10805/Query_Converter.git
cd Query_Converter

Install Dependencies

pip install -r requirements.txt

Create Groq API Key

Visit:

https://console.groq.com/keys

Create an API Key.

Set it inside your environment.

GROQ_API_KEY=your_api_key

Run Application

streamlit run app.py

💬 Example Queries

Show top 10 customers

Monthly revenue

Highest selling category

Cancelled orders last month

Average delivery time

Products with highest profit

Top sellers

📊 Workflow

Natural Language

↓

Groq AI

↓

SQL Generation

↓

Validation

↓

Self-Healing

↓

SQLite

↓

Plotly Dashboard


About

AI-powered Natural Language to SQL engine using Groq LLM, Streamlit and SQLite with self-healing query generation and interactive data visualization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages