Pranit PatilMumbai IST
All work

AI product · Nov 2025

DataBot

Ask a Postgres database questions in plain English, get charts back.

01The problem

The people who need answers from a database usually can't write SQL, so every question becomes a ticket for someone who can. DataBot does that analyst's loop itself: read the schema, write the query, check the result, pick the chart.

02What I built

  1. 01

    Schema introspection on connect: tables, columns, comments, row counts and sample rows, so the model knows what the data means and not only its shape.

  2. 02

    A multi-step agent on the Vercel AI SDK that writes SQL, runs it, reads the error when a query fails and corrects itself.

  3. 03

    Read-only by design. Only SELECT queries run, writes and DDL are blocked before they reach the database, and connections are per session and expire after an hour.

  4. 04

    14 chart types, from bar and line to heatmaps, small multiples and slope charts, with the model choosing the one that fits the answer.

  • Next.js 16
  • React 19
  • Vercel AI SDK
  • OpenAI
  • PostgreSQL
  • Recharts

03Outcome

A working analytics chat over any Postgres database: a plain-English question in, the SQL, a chart and a written explanation out.

Next projectUncachedA spin-the-reel game that turns team learning into a habit