/Na2SQL

Welcome to the Natural Language to SQL demo project using LlamaIndex! This application is designed to demonstrate the innovative use of Large Language Models (LLMs) in translating natural language queries into SQL queries, and fetching meaningful insights from a database.

Primary LanguagePython

Natural Language to SQL(Na2SQL): Extracting Insights from Databases using OpenaAI GPT3.5 and Llamaindex

Welcome to the Natural Language to SQL demo project using LlamaIndex! This application is designed to demonstrate the innovative use of Large Language Models (LLMs) in translating natural language queries into SQL queries, and fetching meaningful insights from a database.

Demo Features

  • Natural Language Understanding: Converts user-inputted natural language queries into accurate SQL queries.
  • Data Retrieval and Analysis: Retrieves results from the database and interprets them to provide meaningful insights.
  • Accessibility: Designed for users with no SQL background to easily interact with and extract insights from databases.

Potential Enhancements

  • Expansion to include more diverse data sources and databases.
  • Advanced natural language processing for more intricate query handling.

Tools and Technologies Used

  • LLM: OpenAI's GPT-3.5
  • LLM Orchestration: LlamaIndex
  • Data Management: SQLDatabase with SQLite
  • UI Framework: Streamlit

Project Structure

  • app.py: The main application script for the Streamlit app.
  • requirements.txt: Lists the Python packages required for this project.
  • storage/: Directory contains the database file and related resources.

Setup and Usage

Clone the Repository

git clone https://github.com/YourGitHubUsername/your-repository-name

Install Required Packages

pip install -r requirements.txt

Run the Streamlit App

streamlit run app.py

Feedback and Contributions

Feel free to raise issues or submit pull requests if you think something can be improved or added. Your feedback is highly appreciated!

Developed by Harshad Suryawanshi

If you find this project useful, consider giving it a ⭐ on GitHub!