A lightweight pipeline using LangChain, OpenAI, and MySQL (Chinook DB). Users can ask questions in plain English, and the system automatically:
- Fetches the database schema
- Generates the correct SQL query
- Executes it on MySQL
- Returns a natural language answer
- Automatic SQL generation based on live schema
- Executes queries directly on MySQL
- Natural-language final responses
- Modular LangChain-based pipeline
result = full_chain.invoke({
"question": "how many albums are there?"
})