NLP to SQL: An Agentic AI Tool
Overview
Engineered a Streamlit web application that translates natural language queries into SQL, executes them on uploaded datasets, and generates relevant visualizations using the SmolAgents Framework powered by Google’s Gemini.
Key Features
- Natural Language to SQL Translation: Converts plain English questions into SQL queries
- Query Execution: Runs the generated SQL on uploaded datasets
- Automated Visualization: Creates appropriate charts and graphs based on query results
- Multi-Agent Architecture: Uses SmolAgents framework to coordinate specialized AI agents
- User-Friendly Interface: Simple Streamlit UI for easy interaction
Technical Details
This project leverages several cutting-edge technologies:
- Streamlit: For the web application framework
- SmolAgents: A lightweight multi-agent orchestration framework
- Gemini API: Google’s powerful language model for natural language understanding
- SQL Parser/Executor: For translating and running database queries
- Data Visualization Libraries: For creating meaningful visual representations of data
Workflow
- User uploads a dataset
- User enters a question in natural language
- The NL agent translates the question to SQL
- The SQL executor runs the query against the dataset
- The visualization agent determines and generates the most appropriate visualization
- Results are displayed to the user in an intuitive format
GitHub Repository
View the source code and documentation on GitHub.
Project Timeline
March 2025 - Present
Future Enhancements
- Support for more complex SQL queries
- Additional visualization options
- Query optimization suggestions
- Integration with database systems beyond uploaded files
Contact
For a demonstration or to discuss potential applications, please reach out via email.