Selected work, 2026, in progress

AskData: plain-English analytics on PostgreSQL

Type
Personal project
Status
Core pipeline, demo datasets and tests work. Benchmark results and a hosted demo are next
Stack
Python, FastAPI, Next.js, TypeScript, PostgreSQL, OpenAI API
Data
Two demo databases (pagila, retail_ops), or any PostgreSQL connection
AskData answer view showing a 10-row result table and the validated SQL query
Each answer comes with the result table and the validated SQL behind it.

What it does

You ask a question in plain English. AskData writes a read-only SQL query, runs it on PostgreSQL and answers with a sentence, a table and, when the result suits one, a bar or line chart.

How a question is answered

  • Retrieve the relevant schema context.
  • Plan and generate the SQL.
  • Validate it as read-only, then execute it.
  • Repair the query once if it fails.
  • Summarise the result and suggest a chart.

Testing and next steps

The backend has 13 test files, from SQL validation to the query pipeline. A benchmark script with three sets of 10 questions is ready; its results will go here, with the limits found, when the run is done.

Architecture diagram: Next.js frontend, FastAPI layer, a seven-step query pipeline calling OpenAI and PostgreSQL, and a structured response back to the user
Architecture, from the project README.