Back to Proof of Work
FastAPIVanna.aiChromaDBPostgreSQLSQLGlotOpenAI

Natural Language to SQL Query & Analytics Engine

Empowering non-technical teams to query relational databases directly using plain English.

5sMax Statement Timeout
100%Automation Rate

The Friction

Business stakeholders need constant, ad-hoc reports and data summaries from relational databases. Relying on engineering or analytics teams to write SQL queries creates a multi-day delay for simple questions, slowing down operational decision-making.

The Neural Architecture

We deployed a Dockerized Text-to-SQL API utilizing the Vanna.ai framework (OpenAI GPT-4o-mini + ChromaDB). The system dynamically extracts schema metadata to train a semantic query index, translates English questions into PostgreSQL queries, and parses the SQL using SQLGlot to ensure only safe SELECT statements execute.

Tech Stack Deployed

FastAPIVanna.aiChromaDBPostgreSQLSQLGlotOpenAI

Impact Report

  • Allowed business users to retrieve live report data in under 2 seconds.
  • Eliminated 100% of engineering backlog for simple ad-hoc data requests.
  • Implemented strict guardrails (read-only DB role, SELECT statement parsing, automatic LIMIT injection) preventing SQL injection or data mutation.
  • Designed a sandbox mode for developers to preview generated SQL query structures before execution.