NL2SQL, narrative report generation, anomaly detection, BI dashboard copilots and a data-security posture — so any teammate can ask a warehouse question and get a chart and explanation.
Updated Aug 16, 2026 · Start building free →"How did retention change for users acquired via podcast ads last quarter?" — a great growth question that took three Slack replies, one dbt run and a Looker export to answer. NL2SQL pipelines collapse that into one prompt and one chart. The challenge is doing it without letting the model invent or leak data: schema-grounded generation + read-only credentials + result verification is what separates a demo from a production copilot.
curl https://api.dr-ai.top/v1/chat/completions \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"temperature": 0,
"response_format": {"type": "json_object"},
"messages": [
{"role": "system", "content": "Translate the user question to SELECT-only SQL using the schema provided. Reply JSON: {sql, chart_type, columns}."},
{"role": "user", "content": "Question: \"Weekly revenue by region, last 8 weeks, excluding returns\"\n\nSchema:\nCREATE TABLE orders(id, region, gross_revenue, refunded_at, created_at);"}
]
}'user > Top 5 declining SKUs by unit sales, last 30 days vs prior 30 days
assistant >
sql
WITH cur AS (SELECT sku, SUM(units) AS u FROM sales WHERE day >= now() - interval '30' day GROUP BY sku),
prev AS (SELECT sku, SUM(units) AS u FROM sales WHERE day BETWEEN now() - interval '60' day AND now() - interval '30' day GROUP BY sku)
SELECT cur.sku, cur.u AS cur_units, prev.u AS prev_units, prev.u - cur.u AS drop_units
FROM cur JOIN prev USING(sku) ORDER BY drop_units DESC LIMIT 5;
narrative
SKU 78520 fell from 12,400 → 3,100 units (-75%). Confirm inventory status before reordering — this may be a stockout rather than demand drop.SELECT-only role, no DDL/DML, with a 30-second hard timeout and a 50k-row cap.| Metric | BI ticket queue | Self-serve copilot |
|---|---|---|
| Time to answer (median) | > 2 days | ~6 sec |
| Analyst hours / week / team | 60 | 14 |
| Questions answered / week | ~40 | ~220 |
| Stakeholder satisfaction | avg 3.4/5 | avg 4.6/5 |
| Wrong-data events (90-day) | 3 | 0 |
A medium-sized product org typically spends $480k/year on BI analyst headcount to answer self-serve questions. The same team, augmented with an NL2SQL copilot, supports 5× the question volume at ~$2k/month DrAI subscription cost — and analysts pivot to higher-value strategic work.
Deep-dive from the DrAI blog — practical implementation and ROI analysis.
Deep-dive from the DrAI blog — practical implementation and ROI analysis.
Deep-dive from the DrAI blog — practical implementation and ROI analysis.
Deep-dive from the DrAI blog — practical implementation and ROI analysis.
Stop queueing questions for analysts. Open an NL2SQL copilot behind your warehouse and ship answers in seconds.
Get Started — freeRead the Quickstart