-
-
The landing page immediately communicates the app's purpose and invites users to engage with prominent call-to-action buttons.
-
QueryBot's core intelligence: effortlessly translating a complex natural language request—including joins and aggregations—into an SQL query
-
QueryBot simplifies data analysis, requires no SQL knowledge, and provides instant, visual insights
-
The Tech Stack
-
A friendly and engaging call-to-action at the bottom of the page encourages users to take the final step
-
Users can choose between the domains for easier understanding and focus on the type of questions they want to be answered.
-
The main chat interface is clean and focused. After selecting a data domain, users can use voice or use the sample queries on the left
-
Transparency is key. The moment a user asks a question, QueryBot instantly translates it into an accurate SQL query and displays it.
-
With a single click, users can transform results into interactive visualizations like this line chart, making it easy to spot patterns
-
The results are returned in a clean, easy-to-read table, presenting the data in a structured format for immediate analysis
-
To build trust and aid understanding, an AI-generated explanation breaks down the SQL query in simple English terms
-
The QueryBot 'About' page starts with a powerful statement, defining its role as a GenAI SQL Chatbot and summarizing its core function.
-
Powerful capabilities of QueryBot: seamless voice-to-text querying, versatile data visualization options including charts and CSV downloads.
-
The 'How It Works' simplifies the process into four steps, while table provides examples of the AI's ability to convert NL requests into SQL
Inspiration
In today's data-driven world, a vast "data divide" exists. While companies collect massive amounts of valuable data, only a small fraction of their team—the data analysts and engineers—possess the SQL skills needed to access it. This creates a significant bottleneck, where business teams have urgent questions but face long delays waiting for reports.
Our inspiration came from wanting to bridge this gap. We saw the incredible advancements in Large Language Models and realized we could build a conversational bridge, allowing anyone to talk to their database directly and democratize access to data-driven insights.
What it does
QueryBot is a streamlined, production-ready platform that enables users to query an Azure SQL database using plain English. It transforms the complex task of data analysis into a simple conversation.
- Natural Language Querying: Ask questions in plain English, either by typing or using your voice.
- AI-Powered Translation: Uses Azure OpenAI (GPT-4) to instantly translate questions into executable SQL statements.
- Rich Results: Executes queries and returns neatly formatted results as interactive tables.
- Instant Visualization: With a single click, users can view results as bar, line, or pie charts.
- Full Transparency: Displays the generated SQL code alongside results to build trust and aid learning.
- Data Exploration: Built-in schema explorer and intelligent query suggestions guide users in understanding their data.
How we built it
QueryBot is a full-stack application built with a modern, scalable tech stack:
- Frontend: Responsive interface with React and Material-UI (MUI).
- Backend: High-performance API built with Python and FastAPI.
- AI Core: Azure OpenAI (GPT-4) with schema-aware prompt engineering for accurate SQL generation.
- Database: Azure SQL Database as the primary structured data source.
- Voice-to-Text: Real-time voice querying via Azure Speech Services.
- Deployment: Fully deployed on Vercel for scalability and ease of use.
Challenges we ran into
- Ensuring SQL Accuracy: Preventing hallucinated or incorrect SQL required schema injection and few-shot examples.
- Security and Safeguards: Restricted AI execution to read-only
SELECTqueries and implemented prompt-injection defenses. - Real-time Performance: Coordinated multiple APIs (Speech, OpenAI, Database) with FastAPI’s async features for smooth responsiveness.
Accomplishments that we're proud of
- Built a complete, production-ready system that goes beyond proof-of-concept.
- Integrated text, voice, querying, and visualization into one seamless interface.
- Delivered transparency by displaying generated SQL, building trust and doubling as a SQL learning tool.
What we learned
- Prompt Engineering Matters: Success depends on precise context injection for text-to-SQL.
- Full-Stack Integration: Combined React frontend, FastAPI backend, and Azure services into a smooth workflow.
- User-Centric AI Design: Trust, clarity, and simplicity are as important as raw functionality.
What's next for QueryBot
Our roadmap includes:
- Support for More Databases: PostgreSQL, MySQL, Snowflake, and more.
- Conversational Drill-Down: Multi-turn conversations to refine previous queries (e.g., "Filter that by department").
- Proactive Insights: AI-powered suggestions for trends and anomalies.
- Dashboard Creation: Save and combine favorite queries and visualizations into shareable dashboards.
Log in or sign up for Devpost to join the conversation.