GenQuery 2.0: Simplifying SQL for Everyone with AI-Powered Natural Language Queries and Seamless Data Visualization.
Welcome to GenQuery! This project aims to simplify data access and manipulation in SQL databases through natural language commands, educational examples, and powerful AI integration.
Features
1. Natural Language SQL Query Generation
- Query Simplification: Generate SQL queries by simply typing your request in plain language.
- Output Understanding: Receive explanations for each query, breaking down the syntax and logic used.
2. SQL Formatter
- Code Organization: Format and clean up your SQL code for better readability and maintenance.
3. Query Explainer
- Detailed Breakdown: Analyze complex SQL queries with explanations for each component, making them easier to understand.
4. Data Analysis & Visualization
- Visual Insights: Generate charts and visualizations directly from your queries to better understand your data.
Built With
- Languages: Python
- Frameworks: Streamlit
- Cloud Services: Google Cloud Platform (GCP)
- Databases: SQLite
- APIs: Gemini 1.5 Pro API
- Data Visualization: Plotly Express
- AI & NLP: Google’s Generative AI tools
Project Architecture
- Frontend: Built with Streamlit for a user-friendly interface.
- Backend: Powered by Python and integrated with the Gemini 1.5 Pro API for AI capabilities.
- Database: Managed with SQLite, ensuring lightweight and efficient data management.
Setup Instructions
-
Clone the Repository:
git clone https://github.com/aniketandhale08/GenQuery_2
cd GenQuery_2
-
Install the required libraries:
pip install -r requirements.txt
-
Set Up SQLite Database:
- No additional setup is required for SQLite; it is lightweight and runs locally by default.
-
Environment Variables:
export GOOGLE_API_KEY=your_google_api_key
-
Run the Application:
streamlit run app.py
Testing Instructions
- Access the Application: Follow the setup instructions to run the application locally.
- Database Connection: Ensure that SQLite is correctly configured and accessible.
- Run Queries: Input natural language commands and observe the generated SQL queries and their explanations.
- Test Features: Use the SQL Formatter and Query Explainer to test formatting and query explanation functionalities.
Challenges and Learnings
- Integration: Successfully integrated SQLite with the AI-powered GenQuery to manage data efficiently.
- User Experience: Focused on making the tool beginner-friendly while maintaining powerful features for advanced users.
Future Enhancements
- User Feedback Integration: Gather user feedback to further improve the tool.
- Expanded Features: Plan to add more data visualization options and AI-driven insights.