Skip to content
Live · LLM · Analytics

Text-to-SQL

Ask a business question in plain English about a small sample sales database (customers, products, orders). The LLM writes a SQL query, which is validated as read-only and executed live — you see both the generated SQL and the real result rows.

The LLM writes the SQL on CPU — expect 8–20 s. Only read-only SELECTs are executed.

Try one

Database schema

Loading…

How it works

01

Schema prompt

The table schema and relationships are given to the model along with your question.

02

Generate SQL

The LLM writes a single SELECT, joining tables when the needed columns live elsewhere.

03

Validate

The query is checked: read-only SELECT only, no writes, no multiple statements.

04

Execute

It runs against an in-memory SQLite database and returns the rows.

05

Guardrails

Anything that is not a safe single SELECT is rejected before it touches the database.

06

Production swap

Point at your warehouse, add row-level security and Claude/GPT — same validate-then-execute flow.

Want this over your real warehouse?

We build governed text-to-SQL with schema-aware prompting, read-only guardrails, row-level security, and human review for sensitive queries — over Snowflake, BigQuery, or Postgres.

Ready to start

Turn one AI use case into measurable production value.

Book a 30-minute consultation. We will walk through the use case, sketch the value case, and tell you honestly whether we can help.