PIXELOR
CODE
Get in touch
← All work

AI · RAG · Data

DB Narrator.

AI Database Analytics

Year

2026

Duration

9 weeks

Category

AI · RAG · Data

Live

Visit site ↗

DB Narrator — AI Database Analytics

Overview

The brief

A RAG-powered analytics platform that turns plain-English questions into SQL, executes them, and visualizes the results as interactive dashboards — so non-technical teams can query production databases directly.

The problem

Data teams were bottlenecked writing ad-hoc SQL for stakeholders. Existing 'AI SQL' tools hallucinated columns and produced broken queries because they lacked schema context.

Our role

  • Schema extraction pipeline
  • Vector embeddings + Qdrant retrieval
  • Natural-language → SQL agent
  • Safe query execution & guardrails
  • Interactive dashboard rendering

Outcomes

Results that moved the number.

96%

Query accuracy

< 4s

Question → chart

PG + MySQL

Databases supported

0

SQL written by users

How we built it

Process.

01

Schema-aware retrieval

Table and column metadata is embedded into Qdrant so every prompt is grounded in the real database — no hallucinated fields.

02

Constrained SQL generation

The agent generates read-only SQL against a whitelisted schema, with automatic parameterization and query timeouts.

03

Chart auto-selection

Result shape drives visualization — categorical → bar, temporal → line, single value → KPI — with editable overrides.

04

Explainable answers

Every answer shows the generated SQL and the reasoning, so analysts trust and can audit what the model did.

Highlights

What makes it stand out.

  • Plain-English to production SQL with 96% accuracy
  • Qdrant-backed schema retrieval prevents hallucinations
  • Auto-selected charts with editable overrides
  • Every answer is auditable — SQL and reasoning shown

Stack

  • Next.js
  • Qdrant
  • OpenAI
  • Postgres
  • Recharts
  • RAG
Visit live site

Have a similar project?

Let's build the version your team actually wants.

Start a project