Agentic Multi-Dialect SQL Assistant
A natural-language-to-SQL agent that reasons over your schema and generates correct, executable queries across multiple SQL dialects.
Technical Information
Project Type
NLP to SQLAgentic AssistantMulti-Dialect
Tech Stack
PythonFlaskMistral AIPhiDataPrompt EngineeringRDBMSSQLiteMySQLPostgreSQLOracleSQL ServerAmazon Aurora
Topics / Modules
Schema ReasoningQuery GenerationOrder of ExecutionAgentic Workflow
Links
Project Summary
An agentic assistant that converts plain-English questions into accurate SQL across SQLite, MySQL, PostgreSQL, Oracle, SQL Server and Amazon Aurora. Upload a database or schema, ask a question, and the agent reasons about tables and relationships before generating and executing the query.
Skills Demonstrated
NL-to-SQLAgentic AIPrompt EngineeringSchema UnderstandingQuery ValidationMulti-Dialect SQL
Solution
A Mistral-powered agent built on PhiData inspects the uploaded schema and sample data, picks the right dialect, then drafts, validates and runs the SQL – returning both the result set and the query's order of execution for learning.
Approach
- Ingest: Accept an uploaded database/schema and surface tables, columns and sample rows.
- Understand: Let the agent reason about relationships and the target SQL dialect.
- Generate: Draft dialect-correct SQL from the natural-language question.
- Execute: Run the query safely and return results with the order of execution.
- Explain: Show the generated SQL and step-by-step execution for transparency.
- Deploy: Ship as a Flask app on DigitalOcean.