Skip to content

sujalmh/NL2SQL-AI-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 NL2SQL AI Assistant

A powerful AI-driven platform that converts natural language (NL) into SQL queries, executes them on structured data sources (JSON, CSV, MySQL, SQLite), and provides rich visualizations and automated reports/presentations. The system features voice input, an autonomous AI agent, and a clean Next.js frontend for seamless interaction.


πŸ“Έ Screenshots

Chat View AI Chat Flow Report Generation
Home Page Discover Datasets Workspace
User Profile Normalized Tables - 1 Normalized Tables - 2

πŸš€ Features

  • πŸ—£οΈ Natural Language to SQL Conversion
    Convert plain English questions into accurate SQL queries using LLMs and agents.

  • πŸ“Š Auto Visualizations
    Generate bar, line, pie, or tabular visualizations based on SQL query results.

  • 🧾 PDF Report / Presentation Generation
    Export query results and visualizations as downloadable PDFs or slide decks.

  • πŸŽ™οΈ Voice Input Support
    Interact with the assistant via voice commands for hands-free querying.

  • 🧠 AI Agent Framework
    Handles query generation, error retries, validation, and follow-up suggestions.

  • πŸ’Ύ Multi-format Data Support
    Load data from:

    • JSON
    • CSV
    • SQLite
    • MySQL
  • πŸ› οΈ Built-in Tools

    • Load DB: Upload and manage structured datasets.
    • Generate Query: Automatically generate SQL from natural language.
    • Load Query: View, run, and edit previously generated queries.
    • Retry on Error: Automatic query rewriting if an error occurs.

πŸ§‘β€πŸ’» Tech Stack

  • Frontend: Next.js
  • Backend: FastAPI & Flask
  • Database Support: MySQL, SQLite, CSV, JSON
  • AI Stack: OpenAI / Gemini (customizable), LangChain (Agentic execution)
  • Visualization: Plotly, Matplotlib, Seaborn
  • PDF/PPT Export: Python-PPTX
  • Voice Recognition: Whisper

🧠 AI Agent Flow

  1. Receive NL input (text/voice)
  2. Generate SQL using an LLM
  3. Validate SQL – retry on errors
  4. Run query on selected DB
  5. Generate visualization based on result type
  6. Export (optional) as PDF/PPT
  7. Suggest follow-up questions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published