Skip to content

rahulsharma00/Natural-Language-to-SQL-Query-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Natural Language to SQL Query Engine

A lightweight pipeline using LangChain, OpenAI, and MySQL (Chinook DB). Users can ask questions in plain English, and the system automatically:

  1. Fetches the database schema
  2. Generates the correct SQL query
  3. Executes it on MySQL
  4. Returns a natural language answer

Features

  • Automatic SQL generation based on live schema
  • Executes queries directly on MySQL
  • Natural-language final responses
  • Modular LangChain-based pipeline

Example

result = full_chain.invoke({
    "question": "how many albums are there?"
})

About

A simple Natural Language to SQL pipeline built with LangChain, OpenAI, and MySQL. It takes plain-English questions, converts them into SQL queries using the database schema, executes them on MySQL, and returns clear natural language answers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors