Skip to content

This SQL AI RAG application generates SQL queries from natural language, eliminating the need for manual coding. Simply provide database credentials, and the AI takes care of the rest. Built with Flask, React.js, Langchain, Gemini Pro, and SQLite, it streamlines database interactions for both developers and non-technical users.

Notifications You must be signed in to change notification settings

IkkiOcean/SQL-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL AI RAG Application

This project is an AI-powered Retrieval-Augmented Generation (RAG) application that enables users to generate SQL queries from natural language input. The application simplifies database interaction by eliminating the need for writing manual SQL queries. Users can provide the necessary database credentials, and the AI handles the rest.

Features

  • Natural Language to SQL: Generate SQL queries using natural language, no SQL knowledge required.
  • Seamless Database Connection: Simply input your database credentials to connect and start querying.
  • Real-time Query Generation: Get SQL queries in real-time for efficient data retrieval and manipulation.
  • User-Friendly Interface: Built with React.js for an intuitive, responsive frontend.
  • Secure and Reliable: Only the necessary credentials are required to securely connect to the database.

Tech Stack

  • Backend: Flask
  • Frontend: React.js
  • Natural Language Processing: Langchain
  • AI Models: Gemini Pro
  • Database: SQLite

Installation

  1. Clone the repository:

    git clone https://github.com/IkkiOcesn/SQL-AI.git
  2. Navigate to the project directory:

    cd SQL-AI
  3. Backend Setup:

    • Navigate to the backend directory:
      cd backend
    • Create a virtual environment:
      python3 -m venv venv
      source venv/bin/activate  # for Linux/macOS
      venv\Scripts\activate  # for Windows
    • Install the required Python dependencies:
      pip install -r requirements.txt
  4. Frontend Setup:

    • Navigate to the frontend directory:
      cd frontend
    • Install the necessary dependencies:
      npm install

Usage

  1. Start the Backend:

    cd backend
    python run.py
  2. Start the Frontend:

    cd frontend
    npm start
  3. Access the Application:

    • Once both backend and frontend are running, open your browser and navigate to:
      http://localhost:3000
      
  4. Provide Database Credentials:

    • Input the necessary credentials for your database (e.g., SQLite connection) and start generating SQL queries using natural language.

Example

  • Input: "Show me all the orders from customers in California"

Contributing

Feel free to submit issues or pull requests. All contributions are welcome!

License

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

About

This SQL AI RAG application generates SQL queries from natural language, eliminating the need for manual coding. Simply provide database credentials, and the AI takes care of the rest. Built with Flask, React.js, Langchain, Gemini Pro, and SQLite, it streamlines database interactions for both developers and non-technical users.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published